From 3630c6b7627b632baa4c14fe09493092a3d53368 Mon Sep 17 00:00:00 2001 From: Isabelle Date: Thu, 19 Nov 2026 14:31:40 -0800 Subject: [PATCH 01/11] Migrate azure-storage-blob code generation from AutoRest to TypeSpec - Regenerate azure-storage-blob from the BlobStorage TypeSpec with the Java emitter; swagger/ is replaced by customization/ (BlobStorageCustomizations). - Rewire the hand-written clients onto the generated layer, map generated errors to BlobStorageException, and stream download and query bodies. - Range operations send the standard Range header; tests and mocks updated. - Update blob-batch and dependents' tests for the new Accept and Range headers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../blob/batch/BlobBatchAsyncClient.java | 49 +- .../storage/blob/batch/BlobBatchHelper.java | 9 +- .../storage/blob/batch/BlobBatchTestBase.java | 3 +- .../BlobChunkedDownloaderTests.java | 6 + .../EncryptedBlockBlobApiTests.java | 2 +- .../EncryptedBlockBlobAsyncApiTests.java | 2 +- .../storage/blob/nio/BlobNioTestBase.java | 4 +- sdk/storage/azure-storage-blob/CHANGELOG.md | 10 + .../checkstyle-suppressions.xml | 5 +- .../{swagger => customization}/pom.xml | 10 +- .../main/java/BlobStorageCustomizations.java | 766 + .../blob/BlobContainerAsyncClient.java | 154 +- .../storage/blob/BlobContainerClient.java | 169 +- .../storage/blob/BlobServiceAsyncClient.java | 93 +- .../azure/storage/blob/BlobServiceClient.java | 97 +- .../AppendBlobAsyncClientInternal.java | 1389 ++ .../AppendBlobClientInternal.java | 1376 ++ .../blob/implementation/AppendBlobsImpl.java | 4125 +--- .../implementation/AzureBlobStorageImpl.java | 73 +- .../AzureBlobStorageImplBuilder.java | 279 - .../BlobAsyncClientInternal.java | 5505 ++++++ .../implementation/BlobClientInternal.java | 5446 ++++++ .../BlobContainerAsyncClientInternal.java | 3186 ++++ .../BlobContainerClientInternal.java | 3144 ++++ .../BlobServiceAsyncClientInternal.java | 1175 ++ .../BlobServiceClientInternal.java | 1165 ++ .../blob/implementation/BlobsImpl.java | 15512 ++++------------ .../BlockBlobAsyncClientInternal.java | 2306 +++ .../BlockBlobClientInternal.java | 2291 +++ .../blob/implementation/BlockBlobsImpl.java | 6904 ++----- .../blob/implementation/ContainersImpl.java | 10376 +++-------- .../PageBlobAsyncClientInternal.java | 2670 +++ .../PageBlobClientInternal.java | 2647 +++ .../blob/implementation/PageBlobsImpl.java | 7768 ++------ .../blob/implementation/ServicesImpl.java | 4184 ++--- .../blob/implementation/XmlSerializer.java | 78 + .../XmlSerializerProviders.java | 29 + .../AppendBlobsAppendBlockFromUrlHeaders.java | 333 +- .../models/AppendBlobsAppendBlockHeaders.java | 376 +- .../models/AppendBlobsCreateHeaders.java | 282 +- .../models/AppendBlobsSealHeaders.java | 174 +- ...rrowField.java => ArrowFieldInternal.java} | 102 +- ...va => ArrowTextConfigurationInternal.java} | 76 +- .../models/AuthenticationType.java | 4 +- .../models/BlobContainersSegment.java | 172 +- .../models/BlobCopySourceTags.java | 26 +- .../implementation/models/BlobDeleteType.java | 56 +- .../models/BlobExpiryOptions.java | 12 +- .../models/BlobFlatListSegment.java | 118 - .../models/BlobHierarchyListSegment.java | 66 +- .../models/BlobItemInternal.java | 208 +- .../models/BlobItemPropertiesInternal.java | 685 +- .../models/BlobLayoutEndpoints.java | 26 +- .../BlobLayoutEndpointsEndpointItem.java | 54 +- .../models/BlobLayoutInternal.java | 93 +- .../models/BlobLayoutRanges.java | 26 +- .../models/BlobLayoutRangesRangeItem.java | 71 +- .../blob/implementation/models/BlobName.java | 31 +- .../models/BlobPrefixInternal.java | 40 +- .../BlobPropertiesInternalGetProperties.java | 76 +- ...rapper.java => BlobSignedIdentifiers.java} | 81 +- .../models/BlobStorageError.java | 364 +- ...on.java => BlobStorageErrorException.java} | 18 +- .../models/BlobStorageExceptionInternal.java | 37 - .../blob/implementation/models/BlobTag.java | 63 +- .../blob/implementation/models/BlobTags.java | 47 +- .../models/BlobsAbortCopyFromURLHeaders.java | 157 - .../models/BlobsAbortCopyFromUrlHeaders.java | 105 + .../models/BlobsAcquireLeaseHeaders.java | 174 +- .../models/BlobsBreakLeaseHeaders.java | 180 +- .../models/BlobsChangeLeaseHeaders.java | 176 +- .../models/BlobsCopyFromURLHeaders.java | 423 - .../models/BlobsCopyFromUrlHeaders.java | 252 + .../models/BlobsCreateSnapshotHeaders.java | 226 +- .../models/BlobsDeleteHeaders.java | 118 +- .../BlobsDeleteImmutabilityPolicyHeaders.java | 118 +- .../models/BlobsDownloadHeaders.java | 1373 +- .../models/BlobsGetAccessControlHeaders.java | 252 - .../models/BlobsGetAccountInfoHeaders.java | 212 +- .../models/BlobsGetLayoutHeaders.java | 1537 +- .../models/BlobsGetPropertiesHeaders.java | 1433 +- .../models/BlobsGetTagsHeaders.java | 118 +- .../models/BlobsQueryHeaders.java | 832 +- .../models/BlobsReleaseLeaseHeaders.java | 148 +- .../models/BlobsRenameHeaders.java | 202 - .../models/BlobsRenewLeaseHeaders.java | 174 +- .../models/BlobsSetAccessControlHeaders.java | 152 - .../models/BlobsSetExpiryHeaders.java | 148 +- .../models/BlobsSetHttpHeadersHeaders.java | 180 +- .../BlobsSetImmutabilityPolicyHeaders.java | 192 +- .../models/BlobsSetLegalHoldHeaders.java | 142 +- .../models/BlobsSetMetadataHeaders.java | 252 +- .../models/BlobsSetTagsHeaders.java | 118 +- .../models/BlobsSetTierHeaders.java | 97 +- .../models/BlobsStartCopyFromURLHeaders.java | 326 - .../models/BlobsStartCopyFromUrlHeaders.java | 210 + .../models/BlobsUndeleteHeaders.java | 118 +- .../BlockBlobsCommitBlockListHeaders.java | 312 +- .../models/BlockBlobsGetBlockListHeaders.java | 209 +- .../BlockBlobsPutBlobFromUrlHeaders.java | 430 - .../BlockBlobsStageBlockFromURLHeaders.java | 329 - .../BlockBlobsStageBlockFromUrlHeaders.java | 217 + .../models/BlockBlobsStageBlockHeaders.java | 288 +- .../BlockBlobsUploadBlobFromUrlHeaders.java | 278 + .../models/BlockBlobsUploadHeaders.java | 340 +- .../models/ContainersAcquireLeaseHeaders.java | 186 +- .../models/ContainersBreakLeaseHeaders.java | 196 +- .../models/ContainersChangeLeaseHeaders.java | 186 +- .../models/ContainersCreateHeaders.java | 148 +- .../ContainersCreateSessionHeaders.java | 105 + .../models/ContainersDeleteHeaders.java | 118 +- .../models/ContainersFilterBlobsHeaders.java | 118 +- .../ContainersGetAccessPolicyHeaders.java | 178 +- .../ContainersGetAccountInfoHeaders.java | 210 +- .../ContainersGetPropertiesHeaders.java | 464 +- ...ListBlobFlatSegmentApacheArrowHeaders.java | 186 - .../ContainersListBlobFlatSegmentHeaders.java | 145 +- ...lobHierarchySegmentApacheArrowHeaders.java | 186 - ...ainersListBlobHierarchySegmentHeaders.java | 145 +- .../models/ContainersReleaseLeaseHeaders.java | 148 +- .../models/ContainersRenameHeaders.java | 118 +- .../models/ContainersRenewLeaseHeaders.java | 186 +- .../models/ContainersRestoreHeaders.java | 118 +- .../ContainersSetAccessPolicyHeaders.java | 148 +- .../models/ContainersSetMetadataHeaders.java | 148 +- .../models/ContainersSubmitBatchHeaders.java | 114 - .../models/CreateSessionConfiguration.java | 38 +- .../models/CreateSessionResponse.java | 71 +- .../models/DelimitedTextConfiguration.java | 10 +- .../models/DirectoriesCreateHeaders.java | 202 - .../models/DirectoriesDeleteHeaders.java | 145 - .../DirectoriesGetAccessControlHeaders.java | 252 - .../models/DirectoriesRenameHeaders.java | 227 - .../DirectoriesSetAccessControlHeaders.java | 152 - .../models/DirectoryHttpHeaders.java | 136 - .../implementation/models/DownloadHint.java | 6 +- .../models/EncryptionScope.java | 3 +- .../implementation/models/FilterBlobItem.java | 121 +- .../models/FilterBlobSegment.java | 124 +- .../models/FilterBlobsIncludeItem.java | 8 +- ...ava => JsonTextConfigurationInternal.java} | 42 +- .../models/ListBlobsFlatSegmentResponse.java | 204 +- .../ListBlobsHierarchySegmentResponse.java | 223 +- .../models/PageBlobsClearPagesHeaders.java | 293 +- .../PageBlobsCopyIncrementalHeaders.java | 202 +- .../models/PageBlobsCreateHeaders.java | 282 +- .../PageBlobsGetPageRangesDiffHeaders.java | 180 +- ...PageBlobsGetPageRangesDiffNextHeaders.java | 202 - .../models/PageBlobsGetPageRangesHeaders.java | 180 +- .../PageBlobsGetPageRangesNextHeaders.java | 202 - .../models/PageBlobsResizeHeaders.java | 180 +- .../PageBlobsSetSequenceNumberHeaders.java | 172 + .../PageBlobsUpdateSequenceNumberHeaders.java | 264 - .../PageBlobsUploadPagesFromURLHeaders.java | 407 - .../PageBlobsUploadPagesFromUrlHeaders.java | 284 + .../models/PageBlobsUploadPagesHeaders.java | 344 +- .../models/PageListCollection.java | 137 - .../models/PageListSegment.java | 171 - .../models/ParquetTextConfiguration.java | 79 + .../models/PremiumPageBlobAccessTier.java | 26 +- .../implementation/models/QueryFormat.java | 101 +- .../models/QueryFormatType.java | 12 +- .../implementation/models/QueryRequest.java | 98 +- .../models/QueryRequestType.java | 51 + .../models/QuerySerialization.java | 40 +- .../models/ServicesFilterBlobsHeaders.java | 118 +- .../models/ServicesGetAccountInfoHeaders.java | 210 +- .../models/ServicesGetPropertiesHeaders.java | 97 +- .../models/ServicesGetStatisticsHeaders.java | 118 +- .../ServicesGetUserDelegationKeyHeaders.java | 118 +- ...vicesListBlobContainersSegmentHeaders.java | 114 - ...sListBlobContainersSegmentNextHeaders.java | 114 - .../ServicesListContainersSegmentHeaders.java | 105 + .../models/ServicesSetPropertiesHeaders.java | 97 +- .../models/ServicesSubmitBatchHeaders.java | 114 - .../models/SessionCredentials.java | 36 +- .../implementation/models/StorageError.java | 206 - .../implementation/models/package-info.java | 5 +- .../blob/implementation/package-info.java | 5 +- .../util/ArrowBlobListDeserializer.java | 22 +- .../util/BlobHeadersAndQueryParameters.java | 33 +- .../implementation/util/BlobQueryReader.java | 71 +- .../implementation/util/BuilderHelper.java | 17 + .../blob/implementation/util/ModelHelper.java | 204 +- .../util/RequestOptionsHelper.java | 212 + .../implementation/util/SessionAcquirer.java | 18 +- .../azure/storage/blob/models/AccessTier.java | 38 +- .../storage/blob/models/AccountKind.java | 14 +- .../storage/blob/models/ArchiveStatus.java | 12 +- .../storage/blob/models/BlobAccessPolicy.java | 46 +- .../blob/models/BlobAnalyticsLogging.java | 109 +- .../models/BlobContainerEncryptionScope.java | 3 +- .../blob/models/BlobContainerItem.java | 102 +- .../models/BlobContainerItemProperties.java | 186 +- .../blob/models/BlobCopySourceTagsMode.java | 3 +- .../storage/blob/models/BlobCorsRule.java | 120 +- .../models/BlobDownloadAsyncResponse.java | 3 +- .../blob/models/BlobDownloadHeaders.java | 149 +- .../storage/blob/models/BlobErrorCode.java | 323 +- .../storage/blob/models/BlobHttpHeaders.java | 3 +- .../models/BlobImmutabilityPolicyMode.java | 22 +- .../azure/storage/blob/models/BlobItem.java | 9 +- .../blob/models/BlobItemProperties.java | 2 +- .../storage/blob/models/BlobMetrics.java | 89 +- .../azure/storage/blob/models/BlobPrefix.java | 3 +- .../storage/blob/models/BlobQueryHeaders.java | 98 +- .../blob/models/BlobRetentionPolicy.java | 94 +- .../blob/models/BlobServiceProperties.java | 57 +- .../blob/models/BlobServiceStatistics.java | 20 +- .../blob/models/BlobSignedIdentifier.java | 53 +- .../azure/storage/blob/models/BlobType.java | 10 +- .../com/azure/storage/blob/models/Block.java | 85 +- .../azure/storage/blob/models/BlockList.java | 32 +- .../storage/blob/models/BlockListType.java | 10 +- .../storage/blob/models/BlockLookupList.java | 42 +- .../azure/storage/blob/models/ClearRange.java | 55 +- .../storage/blob/models/CopyStatusType.java | 19 +- .../azure/storage/blob/models/CpkInfo.java | 3 +- .../models/DeleteSnapshotsOptionType.java | 13 +- .../blob/models/EncryptionAlgorithmType.java | 6 +- .../blob/models/FileShareTokenIntent.java | 6 +- .../storage/blob/models/GeoReplication.java | 68 +- .../blob/models/GeoReplicationStatus.java | 10 +- .../azure/storage/blob/models/KeyInfo.java | 66 +- .../blob/models/LeaseDurationType.java | 8 +- .../storage/blob/models/LeaseStateType.java | 14 +- .../storage/blob/models/LeaseStatusType.java | 13 +- .../models/ListBlobContainersIncludeType.java | 10 +- .../blob/models/ListBlobsIncludeItem.java | 24 +- .../azure/storage/blob/models/PageList.java | 24 +- .../azure/storage/blob/models/PageRange.java | 55 +- .../storage/blob/models/PathRenameMode.java | 3 +- .../storage/blob/models/PublicAccessType.java | 12 +- .../blob/models/RehydratePriority.java | 9 +- .../blob/models/SequenceNumberActionType.java | 16 +- .../azure/storage/blob/models/SkuName.java | 20 +- .../storage/blob/models/StaticWebsite.java | 73 +- .../blob/models/SyncCopyStatusType.java | 3 +- .../storage/blob/models/TaggedBlobItem.java | 3 +- .../blob/models/UserDelegationKey.java | 136 +- .../storage/blob/models/package-info.java | 5 +- .../com/azure/storage/blob/package-info.java | 4 +- .../specialized/AppendBlobAsyncClient.java | 96 +- .../blob/specialized/AppendBlobClient.java | 49 +- .../blob/specialized/BlobAsyncClientBase.java | 280 +- .../blob/specialized/BlobClientBase.java | 223 +- .../specialized/BlobLeaseAsyncClient.java | 114 +- .../blob/specialized/BlobLeaseClient.java | 124 +- .../specialized/BlobLeaseClientBuilder.java | 5 +- .../specialized/BlockBlobAsyncClient.java | 145 +- .../blob/specialized/PageBlobAsyncClient.java | 187 +- .../blob/specialized/PageBlobClient.java | 160 +- .../blob/specialized/ReliableDownload.java | 7 +- .../src/main/java/module-info.java | 12 +- .../META-INF/azure-storage-blob_metadata.json | 1 + .../com/azure/storage/blob/BlobApiTests.java | 2 +- .../azure/storage/blob/BlobAsyncApiTests.java | 2 +- ...BlobContentValidationAsyncUploadTests.java | 3 +- .../BlobContentValidationUploadTests.java | 3 +- .../blob/BlobErrorDeserializationTests.java | 91 + .../com/azure/storage/blob/BlobTestBase.java | 10 +- .../azure/storage/blob/ContainerApiTests.java | 34 +- .../storage/blob/ContainerAsyncApiTests.java | 33 +- .../models/BlobHierarchyListSegmentTests.java | 52 + .../util/BlobListArrowGoldenDecodeTests.java | 20 +- .../implementation/util/ModelHelperTests.java | 28 +- .../specialized/BlobAsyncClientBaseTests.java | 18 +- .../blob/specialized/BlobClientBaseTests.java | 12 +- .../BlobDataLocalityDownloadApiTests.java | 2 +- .../blob/specialized/BlockBlobApiTests.java | 9 +- .../specialized/DownloadResponseMockFlux.java | 2 +- .../azure-storage-blob/swagger/README.md | 721 - .../swagger/Update-Codegeneration.ps1 | 1 - .../azure-storage-blob/swagger/package.json | 1 - .../main/java/BlobStorageCustomization.java | 320 - .../azure-storage-blob/tsp-location.yaml | 4 + .../policy/MockRetryRangeResponsePolicy.java | 14 +- .../DataLakeDataLocalityOptionsTests.java | 2 +- .../file/datalake/DataLakeTestBase.java | 3 +- 279 files changed, 56104 insertions(+), 59829 deletions(-) rename sdk/storage/azure-storage-blob/{swagger => customization}/pom.xml (73%) create mode 100644 sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobAsyncClientInternal.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobClientInternal.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImplBuilder.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobAsyncClientInternal.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobClientInternal.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobContainerAsyncClientInternal.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobContainerClientInternal.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobServiceAsyncClientInternal.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobServiceClientInternal.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobAsyncClientInternal.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobClientInternal.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobAsyncClientInternal.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobClientInternal.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/XmlSerializer.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/XmlSerializerProviders.java rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/{ArrowField.java => ArrowFieldInternal.java} (57%) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/{ArrowConfiguration.java => ArrowTextConfigurationInternal.java} (58%) delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobFlatListSegment.java rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/{BlobSignedIdentifierWrapper.java => BlobSignedIdentifiers.java} (50%) rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/{StorageErrorException.java => BlobStorageErrorException.java} (55%) delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobStorageExceptionInternal.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsAbortCopyFromURLHeaders.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsAbortCopyFromUrlHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsCopyFromURLHeaders.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsCopyFromUrlHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccessControlHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsRenameHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetAccessControlHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsStartCopyFromURLHeaders.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsStartCopyFromUrlHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsPutBlobFromUrlHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockFromURLHeaders.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockFromUrlHeaders.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadBlobFromUrlHeaders.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateSessionHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentApacheArrowHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentApacheArrowHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersSubmitBatchHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesCreateHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesDeleteHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesGetAccessControlHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesRenameHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoriesSetAccessControlHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/DirectoryHttpHeaders.java rename sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/{JsonTextConfiguration.java => JsonTextConfigurationInternal.java} (64%) delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffNextHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesNextHeaders.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsSetSequenceNumberHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUpdateSequenceNumberHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesFromURLHeaders.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesFromUrlHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListCollection.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListSegment.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ParquetTextConfiguration.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryRequestType.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListBlobContainersSegmentHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListBlobContainersSegmentNextHeaders.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListContainersSegmentHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesSubmitBatchHeaders.java delete mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/StorageError.java create mode 100644 sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/RequestOptionsHelper.java create mode 100644 sdk/storage/azure-storage-blob/src/main/resources/META-INF/azure-storage-blob_metadata.json create mode 100644 sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobErrorDeserializationTests.java create mode 100644 sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/models/BlobHierarchyListSegmentTests.java delete mode 100644 sdk/storage/azure-storage-blob/swagger/README.md delete mode 100644 sdk/storage/azure-storage-blob/swagger/Update-Codegeneration.ps1 delete mode 100644 sdk/storage/azure-storage-blob/swagger/package.json delete mode 100644 sdk/storage/azure-storage-blob/swagger/src/main/java/BlobStorageCustomization.java create mode 100644 sdk/storage/azure-storage-blob/tsp-location.yaml diff --git a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchAsyncClient.java b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchAsyncClient.java index 64d329162324d..076c539f5235d 100644 --- a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchAsyncClient.java +++ b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchAsyncClient.java @@ -17,8 +17,12 @@ import com.azure.core.util.IterableStream; import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobServiceVersion; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import com.azure.core.util.UrlBuilder; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; -import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; +import com.azure.storage.blob.implementation.util.RequestOptionsHelper; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.DeleteSnapshotsOptionType; @@ -51,14 +55,16 @@ public final class BlobBatchAsyncClient { private final AzureBlobStorageImpl client; private final boolean containerScoped; private final BlobServiceVersion serviceVersion; + // The container-scoped batch URL already names the container. The generated operation has an empty path + // template, so without scoping the request to that path it goes out as "/container/?restype=..." where the + // shipped client sent "/container?restype=...". + private final String containerPath; BlobBatchAsyncClient(String clientUrl, HttpPipeline pipeline, BlobServiceVersion version, boolean containerScoped) { this.serviceVersion = version; - this.client = new AzureBlobStorageImplBuilder().url(clientUrl) - .pipeline(pipeline) - .version(version.getVersion()) - .buildClient(); + this.client = new AzureBlobStorageImpl(pipeline, clientUrl, version); this.containerScoped = containerScoped; + this.containerPath = containerScoped ? UrlBuilder.parse(clientUrl).getPath() : null; } AzureBlobStorageImpl getClient() { @@ -154,20 +160,25 @@ public Mono> submitBatchWithResponse(BlobBatch batch, boolean thr Mono> submitBatchWithResponse(BlobBatch batch, boolean throwOnAnyFailure, Context context) { Context finalContext = context == null ? Context.NONE : context; - return batch.prepareBlobBatchSubmission() - .flatMap(batchOperationInfo -> containerScoped - ? client.getContainers() - .submitBatchWithResponseAsync(null, batchOperationInfo.getContentLength(), - batchOperationInfo.getContentType(), Flux.fromIterable(batchOperationInfo.getBody()), null, - null, finalContext) - .flatMap(response -> BlobBatchHelper.mapBatchResponse(batchOperationInfo, response, - throwOnAnyFailure, LOGGER)) - : client.getServices() - .submitBatchWithResponseAsync(batchOperationInfo.getContentLength(), - batchOperationInfo.getContentType(), Flux.fromIterable(batchOperationInfo.getBody()), null, - null, finalContext) - .flatMap(response -> BlobBatchHelper.mapBatchResponse(batchOperationInfo, response, - throwOnAnyFailure, LOGGER))); + return batch.prepareBlobBatchSubmission().flatMap(batchOperationInfo -> { + long contentLength = batchOperationInfo.getContentLength(); + + // The generated operation fixes Content-Type to "multipart/mixed"; the service also needs the batch + // boundary, so the full value is set on the request options, which are applied after the request is + // built. + RequestOptions requestOptions = RequestOptionsHelper.requestOptions(finalContext); + requestOptions.setHeader(HttpHeaderName.CONTENT_TYPE, batchOperationInfo.getContentType()); + if (containerScoped) { + RequestOptionsHelper.scopeRequestToResourcePath(requestOptions, containerPath); + } + + return BinaryData.fromFlux(Flux.fromIterable(batchOperationInfo.getBody()), contentLength, false) + .flatMap(body -> containerScoped + ? client.getContainers().submitBatchWithResponseAsync(contentLength, body, requestOptions) + : client.getServices().submitBatchWithResponseAsync(contentLength, body, requestOptions)) + .flatMap(response -> BlobBatchHelper.mapBatchResponse(batchOperationInfo, response, throwOnAnyFailure, + LOGGER)); + }); } /** diff --git a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchHelper.java b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchHelper.java index 4d04a1d96048a..1d716c6ac5219 100644 --- a/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchHelper.java +++ b/sdk/storage/azure-storage-blob-batch/src/main/java/com/azure/storage/blob/batch/BlobBatchHelper.java @@ -8,6 +8,7 @@ import com.azure.core.http.HttpRequest; import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.CoreUtils; import com.azure.core.util.FluxUtil; @@ -57,7 +58,7 @@ class BlobBatchHelper { // This method connects the batch response values to the individual batch operations based on their Content-Id static Mono> mapBatchResponse(BlobBatchOperationInfo batchOperationInfo, - Response> rawResponse, boolean throwOnAnyFailure, ClientLogger logger) { + Response rawResponse, boolean throwOnAnyFailure, ClientLogger logger) { /* * Content-Type will contain the boundary for each batch response. The expected format is: * "Content-Type: multipart/mixed; boundary=batchresponse_66925647-d0cb-4109-b6d3-28efe3e1e5ed" @@ -73,7 +74,7 @@ static Mono> mapBatchResponse(BlobBatchOperationInfo batchO String boundary = boundaryPieces[1]; - return FluxUtil.collectBytesInByteBufferStream(rawResponse.getValue()) + return Mono.just(rawResponse.getValue().toBytes()) /* * This has been changed from using 'Mono.fromRunnable' to 'Mono.create' to resolve an issue where iterating * the responses resulted in 0 responses being returned. The reason that this occurred is that @@ -237,7 +238,7 @@ public Mono getBodyAsString(Charset charset) { }; } - private static HttpResponse createHttpResponse(Response> response) { + private static HttpResponse createHttpResponse(Response response) { return new HttpResponse(response.getRequest()) { @Override public int getStatusCode() { @@ -256,7 +257,7 @@ public HttpHeaders getHeaders() { @Override public Flux getBody() { - return response.getValue(); + return response.getValue().toFluxByteBuffer(); } @Override diff --git a/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/BlobBatchTestBase.java b/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/BlobBatchTestBase.java index 41c8511790ccd..d90a48fbe8bce 100644 --- a/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/BlobBatchTestBase.java +++ b/sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/BlobBatchTestBase.java @@ -60,7 +60,8 @@ public void beforeTest() { interceptorManager.addMatchers(Arrays.asList(new BodilessMatcher(), new CustomMatcher().setHeadersKeyOnlyMatch(Collections.singletonList("Content-Type")) .setQueryOrderingIgnored(true) - .setIgnoredQueryParameters(Arrays.asList("sv")))); + .setIgnoredQueryParameters(Arrays.asList("sv")) + .setExcludedHeaders(Collections.singletonList("Accept")))); primaryBlobServiceClient = getServiceClient(ENVIRONMENT.getPrimaryAccount()); primaryBlobServiceAsyncClient = getServiceAsyncClient(ENVIRONMENT.getPrimaryAccount()); diff --git a/sdk/storage/azure-storage-blob-changefeed/src/test/java/com/azure/storage/blob/changefeed/BlobChunkedDownloaderTests.java b/sdk/storage/azure-storage-blob-changefeed/src/test/java/com/azure/storage/blob/changefeed/BlobChunkedDownloaderTests.java index f78ddc9502ce0..71b88ebb6a181 100644 --- a/sdk/storage/azure-storage-blob-changefeed/src/test/java/com/azure/storage/blob/changefeed/BlobChunkedDownloaderTests.java +++ b/sdk/storage/azure-storage-blob-changefeed/src/test/java/com/azure/storage/blob/changefeed/BlobChunkedDownloaderTests.java @@ -4,6 +4,8 @@ import com.azure.core.client.traits.HttpTrait; import com.azure.core.http.HttpClient; +import java.util.Collections; +import com.azure.core.test.models.CustomMatcher; import com.azure.core.test.TestMode; import com.azure.core.test.TestProxyTestBase; import com.azure.core.test.utils.TestUtils; @@ -51,6 +53,10 @@ public class BlobChunkedDownloaderTests extends TestProxyTestBase { @Override protected void beforeTest() { super.beforeTest(); + if (!interceptorManager.isLiveMode()) { + interceptorManager.addMatchers( + Collections.singletonList(new CustomMatcher().setExcludedHeaders(Collections.singletonList("Accept")))); + } prefix = getCrc32(testContextManager.getTestPlaybackRecordingName()); BlobServiceAsyncClient primaryBlobServiceAsyncClient = getServiceAsyncClient(ENV.getPrimaryAccount()); diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlockBlobApiTests.java b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlockBlobApiTests.java index aa673f8467d73..fba8605409419 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlockBlobApiTests.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlockBlobApiTests.java @@ -2056,7 +2056,7 @@ static class MockRetryRangeResponsePolicy implements HttpPipelinePolicy { public Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { return next.process().flatMap(response -> { if (response.getRequest().getHttpMethod() == HttpMethod.GET - && !expectedRangeHeader.equals(response.getRequest().getHeaders().getValue("x-ms-range"))) { + && !expectedRangeHeader.equals(response.getRequest().getHeaders().getValue(HttpHeaderName.RANGE))) { return Mono.error(new IllegalArgumentException("The range header was not set correctly on retry.")); } else if (response.getRequest().getHttpMethod() == HttpMethod.GET) { // ETag can be a dummy value. It's not validated, but DownloadResponse requires one diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlockBlobAsyncApiTests.java b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlockBlobAsyncApiTests.java index 4c07292c46fb2..06e0227f87f97 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlockBlobAsyncApiTests.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlockBlobAsyncApiTests.java @@ -1880,7 +1880,7 @@ static class MockRetryRangeResponsePolicy implements HttpPipelinePolicy { public Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { return next.process().flatMap(response -> { if (response.getRequest().getHttpMethod() == HttpMethod.GET - && !expectedRangeHeader.equals(response.getRequest().getHeaders().getValue("x-ms-range"))) { + && !expectedRangeHeader.equals(response.getRequest().getHeaders().getValue(HttpHeaderName.RANGE))) { return Mono.error(new IllegalArgumentException("The range header was not set correctly on retry.")); } else if (response.getRequest().getHttpMethod() == HttpMethod.GET) { // ETag can be a dummy value. It's not validated, but DownloadResponse requires one diff --git a/sdk/storage/azure-storage-blob-nio/src/test/java/com/azure/storage/blob/nio/BlobNioTestBase.java b/sdk/storage/azure-storage-blob-nio/src/test/java/com/azure/storage/blob/nio/BlobNioTestBase.java index b584ddd5936ba..4802c67c81a48 100644 --- a/sdk/storage/azure-storage-blob-nio/src/test/java/com/azure/storage/blob/nio/BlobNioTestBase.java +++ b/sdk/storage/azure-storage-blob-nio/src/test/java/com/azure/storage/blob/nio/BlobNioTestBase.java @@ -98,8 +98,8 @@ protected void beforeTest() { // Ignore changes to the order of query parameters and wholly ignore the 'sv' (service version) query parameter // in SAS tokens. interceptorManager.addMatchers(Collections.singletonList(new CustomMatcher().setComparingBodies(false) - .setExcludedHeaders(Arrays.asList("x-ms-copy-source", "If-Match", "x-ms-range", "If-Modified-Since", - "If-Unmodified-Since")) + .setExcludedHeaders(Arrays.asList("x-ms-copy-source", "If-Match", "x-ms-range", "Range", + "If-Modified-Since", "If-Unmodified-Since", "Accept")) .setQueryOrderingIgnored(true) .setIgnoredQueryParameters(Arrays.asList("sv")))); } diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md index b45814a70cd82..a7ef43f8cf8f1 100644 --- a/sdk/storage/azure-storage-blob/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob/CHANGELOG.md @@ -5,6 +5,10 @@ ### Features Added ### Breaking Changes +- When no root element name is passed, `toXml`/`fromXml` on `BlobAccessPolicy`, `BlobAnalyticsLogging`, + `BlobContainerItemProperties`, `BlobMetrics` and `BlobRetentionPolicy` now default to the service's element names + (`AccessPolicy`, `Logging`, `ContainerProperties`, `Metrics` and `RetentionPolicy`) instead of the class names. + Requests and responses sent through the clients are unaffected. ### Bugs Fixed - Fixed `createIfNotExists` on `BlobContainerClient` and `BlobContainerAsyncClient`, and @@ -17,6 +21,12 @@ blob of a different type already exists. ### Other Changes +- Migrated code generation from AutoRest (Swagger) to TypeSpec. The public API is unchanged apart from the items listed + in this release. +- Range operations (download, uploading and clearing pages, uploading pages from a URL, getting page ranges and page + range diffs, and getting the blob layout) now send the standard `Range` request header instead of `x-ms-range`. The + service treats both the same, so this does not change results. `Range` has been added to the headers logged by + default. ## 12.38.0-beta.1 (2026-11-05) diff --git a/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml b/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml index 32255adaeceac..c79be632cc69d 100644 --- a/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml +++ b/sdk/storage/azure-storage-blob/checkstyle-suppressions.xml @@ -8,7 +8,6 @@ - @@ -20,4 +19,8 @@ + + + + diff --git a/sdk/storage/azure-storage-blob/swagger/pom.xml b/sdk/storage/azure-storage-blob/customization/pom.xml similarity index 73% rename from sdk/storage/azure-storage-blob/swagger/pom.xml rename to sdk/storage/azure-storage-blob/customization/pom.xml index 492aa3545f2a1..a9b985dc1395d 100644 --- a/sdk/storage/azure-storage-blob/swagger/pom.xml +++ b/sdk/storage/azure-storage-blob/customization/pom.xml @@ -2,6 +2,7 @@ + 4.0.0 com.azure @@ -10,8 +11,11 @@ ../../../parents/azure-code-customization-parent - com.azure + Microsoft Azure Blob Storage client customization for Java + This package contains client customization for Microsoft Azure Blob Storage + + com.azure.tools azure-storage-blob-customization 1.0.0-beta.1 - 4.0.0 - + jar + \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java b/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java new file mode 100644 index 0000000000000..f4345107223dd --- /dev/null +++ b/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java @@ -0,0 +1,766 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import com.azure.autorest.customization.Customization; +import com.azure.autorest.customization.Editor; +import com.azure.autorest.customization.LibraryCustomization; +import com.azure.autorest.customization.PackageCustomization; +import com.github.javaparser.StaticJavaParser; +import com.github.javaparser.ast.CompilationUnit; +import com.github.javaparser.ast.Modifier; +import com.github.javaparser.ast.NodeList; +import com.github.javaparser.ast.body.BodyDeclaration; +import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration; +import com.github.javaparser.ast.body.ConstructorDeclaration; +import com.github.javaparser.ast.body.MethodDeclaration; +import com.github.javaparser.ast.body.Parameter; +import com.github.javaparser.ast.body.VariableDeclarator; +import com.github.javaparser.ast.expr.Expression; +import com.github.javaparser.ast.expr.LambdaExpr; +import com.github.javaparser.ast.expr.MethodCallExpr; +import com.github.javaparser.ast.expr.NameExpr; +import com.github.javaparser.ast.modules.ModuleDirective; +import com.github.javaparser.ast.modules.ModuleExportsDirective; +import com.github.javaparser.ast.modules.ModuleOpensDirective; +import com.github.javaparser.ast.modules.ModuleRequiresDirective; +import com.github.javaparser.ast.stmt.BlockStmt; +import com.github.javaparser.ast.stmt.CatchClause; +import com.github.javaparser.ast.stmt.IfStmt; +import com.github.javaparser.ast.stmt.ReturnStmt; +import com.github.javaparser.ast.stmt.Statement; +import com.github.javaparser.ast.stmt.TryStmt; +import com.github.javaparser.ast.stmt.WhileStmt; +import com.github.javaparser.ast.type.ClassOrInterfaceType; +import com.github.javaparser.ast.type.Type; +import com.github.javaparser.ast.type.UnknownType; +import com.github.javaparser.javadoc.Javadoc; +import com.github.javaparser.javadoc.description.JavadocDescription; +import org.slf4j.Logger; + +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.Comparator; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * Customization class for Blob Storage. + */ +public class BlobStorageCustomizations extends Customization { + private static final String PKG_ROOT = "src/main/java/com/azure/storage/blob/"; + + private static final String MODELS_PACKAGE = "com.azure.storage.blob.models"; + + private static final String IMPL_PACKAGE = "com.azure.storage.blob.implementation"; + + // Models that shipped as @Fluent (public no-arg ctor + setters) before the TypeSpec migration. With + // required-fields-as-ctor-args:true these regenerate as @Immutable with a required-args ctor and no setters -- a + // breaking change. restoreFluentModels restores the shipped fluent shape per-model. Expand this list from the + // RevApi "method removed" report. + private static final List FLUENT_MODELS_TO_RESTORE = Arrays.asList( + "UserDelegationKey", "BlobCorsRule", "BlobAnalyticsLogging", "BlobRetentionPolicy", "BlobAccessPolicy", + "BlobSignedIdentifier", "BlobMetrics", "BlobServiceStatistics", "KeyInfo", "Block", "BlockList", + "BlobContainerItemProperties", "BlobContainerItem", "PageList", "BlockLookupList", "PageRange", "ClearRange", + "GeoReplication", "StaticWebsite"); + + // Internal list models the hand-written BlobItem, BlobItemProperties and Arrow listing code populate through + // setters, as they did before the migration. + private static final List IMPL_FLUENT_MODELS_TO_RESTORE + = Arrays.asList("BlobItemInternal", "BlobItemPropertiesInternal", "BlobName"); + + // Response header classes wrapped by the public BlobDownloadHeaders and BlobQueryHeaders, whose setters delegate + // to them. They keep their HttpHeaders constructor and only get setters back. + private static final List HEADER_MODELS_TO_MAKE_SETTABLE + = Arrays.asList("BlobsDownloadHeaders", "BlobsQueryHeaders"); + + // The generator emits three layers of code: + // 1. implementation/*Impl: raw REST operations. Kept. + // 2. Per-operation-group convenience clients: typed WithResponse methods over the Impl layer. Kept, but moved + // into the implementation package (see CONVENIENCE_CLIENTS_TO_RELOCATE). + // 3. Top-level builder: deleted (this list). + // The public API is the hand-written Blob* clients and builders, so layer 3 would only duplicate it. The list also + // deletes the generated service version enum, as the hand-written BlobServiceVersion is the public one. + private static final List GENERATED_CLIENTS_TO_REMOVE + = Arrays.asList("AzureBlobStorageBuilder", "BlobServiceVersion"); + + // Per-operation-group convenience clients emitted by typespec-java. See relocateConvenienceClientsToImplementation. + private static final List CONVENIENCE_CLIENTS_TO_RELOCATE = Arrays.asList( + "ServiceClient", "ServiceAsyncClient", + "ContainerClient", "ContainerAsyncClient", + "BlobClient", "BlobAsyncClient", + "AppendBlobClient", "AppendBlobAsyncClient", + "BlockBlobClient", "BlockBlobAsyncClient", + "PageBlobClient", "PageBlobAsyncClient"); + + // Types the generated clients import from com.azure.storage.blob.implementation; once the client itself lives + // in that package those imports are same-package and Checkstyle rejects them as redundant. + private static final List IMPL_PACKAGE_TYPES = Arrays.asList( + "ServicesImpl", "ContainersImpl", "BlobsImpl", "AppendBlobsImpl", "BlockBlobsImpl", "PageBlobsImpl", + "MultipartFormDataHelper", "XmlSerializerProviders"); + + private static final String MODULE_INFO_PATH = "src/main/java/module-info.java"; + + // Directives the hand-written code needs that the generated module-info doesn't declare: the storage-common and + // avro dependencies, the hand-written public packages, the implementation packages the other storage libraries + // build on, and the implementation package azure-core reflects on. + private static final List MODULE_INFO_DIRECTIVES = Arrays.asList( + "requires transitive com.azure.storage.common;", + "requires com.azure.storage.internal.avro;", + "exports com.azure.storage.blob.options;", + "exports com.azure.storage.blob.sas;", + "exports com.azure.storage.blob.specialized;", + "exports com.azure.storage.blob.implementation to com.azure.storage.blob.cryptography," + + " com.azure.storage.blob.batch, com.azure.storage.file.datalake;", + "exports com.azure.storage.blob.implementation.accesshelpers to com.azure.storage.file.datalake;", + "exports com.azure.storage.blob.implementation.models to com.azure.storage.blob.batch," + + " com.azure.storage.blob.cryptography;", + "exports com.azure.storage.blob.implementation.util to com.azure.storage.blob.cryptography," + + " com.azure.storage.file.datalake, com.azure.storage.blob.changefeed, com.azure.core," + + " com.azure.storage.blob.batch, com.azure.storage.blob.nio;", + "opens com.azure.storage.blob.implementation to com.azure.core;"); + + private static final List> DIRECTIVE_ORDER + = Arrays.asList(ModuleRequiresDirective.class, ModuleExportsDirective.class, ModuleOpensDirective.class); + + @Override + public void customize(LibraryCustomization customization, Logger logger) { + removeGeneratedConvenienceClients(customization, logger); + + patchModuleInfo(customization); + + relocateConvenienceClientsToImplementation(customization, logger); + + restoreFluentModels(customization, logger); + + restoreBlobStorageErrorJson(customization, logger); + + restoreShippedEnumOrder(customization.getPackage(MODELS_PACKAGE), logger); + + restoreShippedModelMembers(customization.getPackage(MODELS_PACKAGE), logger); + + allowEmptyGetLayoutResponse(customization.getPackage(IMPL_PACKAGE)); + + updateImplToMapInternalException(customization.getPackage(IMPL_PACKAGE)); + } + + /** + * Deletes the generated builder and service version so the shipped public surface is limited to the hand-written + * Blob* clients. The generated {@code implementation/*Impl} operation layer and the relocated convenience clients + * are retained. + * + * @param customization The library customization. + * @param logger The logger. + */ + private static void removeGeneratedConvenienceClients(LibraryCustomization customization, Logger logger) { + for (String className : GENERATED_CLIENTS_TO_REMOVE) { + String path = PKG_ROOT + className + ".java"; + customization.getRawEditor().removeFile(path); + logger.info("Removed generated client file: {}", path); + } + } + + /** + * Adds the directives the hand-written code needs to the generated {@code module-info.java}, keeping everything + * the generator declares, and keeps the directives grouped by kind. + * + * @param customization The library customization. + */ + private static void patchModuleInfo(LibraryCustomization customization) { + Editor editor = customization.getRawEditor(); + CompilationUnit ast = StaticJavaParser.parse(editor.getFileContent(MODULE_INFO_PATH)); + ast.getModule().ifPresent(module -> { + NodeList directives = module.getDirectives(); + MODULE_INFO_DIRECTIVES.stream() + .map(StaticJavaParser::parseModuleDirective) + .filter(directive -> !directives.contains(directive)) + .forEach(directives::add); + directives.sort(Comparator.comparingInt(directive -> DIRECTIVE_ORDER.indexOf(directive.getClass()))); + }); + // JavaParser doesn't print the comments ahead of a module declaration, so carry the license header over. + String header = ast.getOrphanComments() + .stream() + .map(comment -> comment.toString().trim()) + .collect(Collectors.joining(System.lineSeparator())); + editor.replaceFile(MODULE_INFO_PATH, header + System.lineSeparator() + System.lineSeparator() + ast); + } + + /** + * Moves each generated convenience client into the {@code implementation} package and renames it with an + * {@code Internal} suffix, e.g. {@code ContainerClient} becomes {@code BlobContainerClientInternal}. + *

+ * These clients provide the typed {@code WithResponse} methods (for example + * {@code ResponseBase getAccessPolicyWithResponse(...)}) + * that the hand-written {@code Blob*} clients delegate to. Moving them: + *

    + *
  • keeps them out of the public API, because {@code implementation} is not exported;
  • + *
  • avoids a name clash between the generated and hand-written {@code BlobClient}/{@code BlobAsyncClient}.
  • + *
+ * Each moved class also gets a public constructor, because the hand-written clients now call it from another + * package, and loses its {@code @ServiceClient} annotation, because the builder it refers to is deleted. Its + * imports of the {@code *Impl} classes become same-package, so they're removed. + * + * @param customization The library customization. + * @param logger The logger. + */ + private static void relocateConvenienceClientsToImplementation(LibraryCustomization customization, Logger logger) { + Editor editor = customization.getRawEditor(); + for (String className : CONVENIENCE_CLIENTS_TO_RELOCATE) { + String newName = internalClientName(className); + String oldPath = PKG_ROOT + className + ".java"; + String content = editor.getFileContent(oldPath); + // Move to the implementation package. + content = content.replace("package com.azure.storage.blob;", + "package com.azure.storage.blob.implementation;"); + // Drop the @ServiceClient marker annotation (its builder AzureBlobStorageBuilder is deleted). The class + // literally named ServiceClient carries the annotation fully-qualified to avoid the name clash, so match + // both @ServiceClient(...) and @com.azure.core.annotation.ServiceClient(...). + content = content.replaceAll("(?m)^@(com\\.azure\\.core\\.annotation\\.)?ServiceClient\\([^)]*\\)\\r?\\n", ""); + content = content.replace("import com.azure.core.annotation.ServiceClient;\n", ""); + for (String implType : IMPL_PACKAGE_TYPES) { + content = content.replace("import " + IMPL_PACKAGE + "." + implType + ";\n", ""); + } + // Make the package-private constructor public; callers now live in a different package. + content = content.replaceFirst("(?m)^(\\s*)" + className + "\\(", "$1public " + className + "("); + // Rename the class (declaration, constructor, self-references) to the Blob*-Internal name. + content = content.replaceAll("\\b" + className + "\\b", newName); + editor.removeFile(oldPath); + editor.addFile(PKG_ROOT + "implementation/" + newName + ".java", content); + logger.info("Relocated convenience client {} -> implementation/{}", className, newName); + } + } + + /** + * Maps a generated convenience client name to its internal name: the hand-written {@code Blob*} naming with an + * {@code Internal} suffix. The service and container clients take a {@code Blob} prefix, while the blob-scoped + * ones already carry it. E.g. {@code ServiceClient} -> {@code BlobServiceClientInternal}, + * {@code ContainerAsyncClient} -> {@code BlobContainerAsyncClientInternal}, {@code PageBlobClient} -> + * {@code PageBlobClientInternal}. + * + * @param generatedName The generated convenience client name. + * @return The internal client name. + */ + private static String internalClientName(String generatedName) { + String prefixed = generatedName.startsWith("Service") || generatedName.startsWith("Container") + ? "Blob" + generatedName + : generatedName; + return prefixed + "Internal"; + } + + + /** + * Restores the "fluent" shape of models that shipped as {@code @Fluent} (public no-arg constructor + setters) + * before the TypeSpec migration. With {@code required-fields-as-ctor-args: true} these regenerate as + * {@code @Immutable} with a required-args constructor and no setters -- a breaking change. Each named model is + * converted back through the JavaParser AST: {@code @Immutable} becomes {@code @Fluent}, {@code final} is removed + * from instance fields, a public no-arg constructor is added, a public fluent setter is added for each field, and + * the generated required-args constructor is made private (it is not part of the shipped API; {@code fromXml}, + * which is left untouched, still uses it). + * + * @param customization The library customization. + * @param logger The logger. + */ + private static void restoreFluentModels(LibraryCustomization customization, Logger logger) { + PackageCustomization models = customization.getPackage(MODELS_PACKAGE); + for (String modelName : FLUENT_MODELS_TO_RESTORE) { + restoreFluentModel(models, modelName, true, logger); + } + PackageCustomization implModels = customization.getPackage(IMPL_PACKAGE + ".models"); + for (String modelName : IMPL_FLUENT_MODELS_TO_RESTORE) { + restoreFluentModel(implModels, modelName, true, logger); + } + for (String modelName : HEADER_MODELS_TO_MAKE_SETTABLE) { + restoreFluentModel(implModels, modelName, false, logger); + } + } + + private static void restoreFluentModel(PackageCustomization models, String modelName, boolean restoreConstructors, + Logger logger) { + models.getClass(modelName).customizeAst(ast -> { + ast.addImport("com.azure.core.annotation.Fluent"); + ast.addImport("com.azure.core.annotation.Generated"); + ast.getImports().removeIf(i -> i.getNameAsString().equals("com.azure.core.annotation.Immutable")); + ast.getClassByName(modelName).ifPresent(clazz -> { + // @Immutable -> @Fluent + clazz.getAnnotationByName("Immutable").ifPresent(annotation -> annotation.remove()); + if (!clazz.isAnnotationPresent("Fluent")) { + clazz.addMarkerAnnotation("Fluent"); + } + + NodeList> members = clazz.getMembers(); + + // Ensure a public no-arg constructor exists, positioned as the first constructor (right after the + // fields) to match the shipped layout. Widen an existing private no-arg ctor in place, otherwise + // insert a new one ahead of the generated required-args constructor. + if (restoreConstructors) { + boolean hasNoArgConstructor = clazz.getConstructors().stream() + .anyMatch(ctor -> ctor.getParameters().isEmpty()); + // The emitter makes the required-args constructor public on input models; the shipped fluent models + // only expose the no-arg constructor, so keep it private (fromXml still uses it). + clazz.getConstructors().stream() + .filter(ctor -> !ctor.getParameters().isEmpty()) + .forEach(ctor -> ctor.setModifiers(Modifier.Keyword.PRIVATE)); + if (hasNoArgConstructor) { + clazz.getConstructors().stream() + .filter(ctor -> ctor.getParameters().isEmpty()) + .forEach(ctor -> ctor.setModifiers(Modifier.Keyword.PUBLIC)); + } else { + ConstructorDeclaration noArgConstructor = new ConstructorDeclaration(); + noArgConstructor.setName(modelName); + noArgConstructor.setModifiers(Modifier.Keyword.PUBLIC); + noArgConstructor.setBody(StaticJavaParser.parseBlock("{}")); + noArgConstructor.addMarkerAnnotation("Generated"); + noArgConstructor.setJavadocComment(new Javadoc( + JavadocDescription.parseText("Creates an instance of " + modelName + " class."))); + int firstConstructorIndex = indexOfFirstConstructor(members); + if (firstConstructorIndex >= 0) { + members.add(firstConstructorIndex, noArgConstructor); + } else { + members.add(noArgConstructor); + } + } + + } + + // Un-finalize instance fields and add a fluent setter immediately after each field's getter, so the + // getter/setter pairs sit together as they did in the shipped model. + clazz.getFields().stream() + .filter(field -> !field.isStatic()) + .forEach(field -> { + field.removeModifier(Modifier.Keyword.FINAL); + VariableDeclarator variable = field.getVariable(0); + String fieldName = variable.getNameAsString(); + // The setter is named after the getter, so isX() pairs with setX(), as in the shipped models. + int getterIndex = indexOfGetter(members, fieldName); + String getterName = getterIndex >= 0 + ? ((MethodDeclaration) members.get(getterIndex)).getNameAsString() + : "get" + Character.toUpperCase(fieldName.charAt(0)) + fieldName.substring(1); + String setterName = "set" + getterName.substring(getterName.startsWith("is") ? 2 : 3); + if (!clazz.getMethodsByName(setterName).isEmpty()) { + return; + } + + // The setter takes the getter's type. For dates the service sends in RFC 1123 format the + // field is a DateTimeRfc1123 while the getter returns an OffsetDateTime, so convert. + Type setterType = getterIndex >= 0 + ? ((MethodDeclaration) members.get(getterIndex)).getType().clone() + : variable.getType().clone(); + String value = "DateTimeRfc1123".equals(variable.getTypeAsString()) + && !"DateTimeRfc1123".equals(setterType.asString()) + ? fieldName + " == null ? null : new DateTimeRfc1123(" + fieldName + ")" + : fieldName; + + MethodDeclaration setter = new MethodDeclaration(); + setter.setName(setterName); + setter.setModifiers(Modifier.Keyword.PUBLIC); + setter.setType(modelName); + setter.addParameter(setterType, fieldName); + setter.setBody(StaticJavaParser.parseBlock( + "{ this." + fieldName + " = " + value + "; return this; }")); + setter.addMarkerAnnotation("Generated"); + setter.setJavadocComment(new Javadoc( + JavadocDescription.parseText("Set the " + fieldName + " property.")) + .addBlockTag("param", fieldName, "the " + fieldName + " value to set.") + .addBlockTag("return", "the " + modelName + " object itself.")); + + if (getterIndex >= 0) { + members.add(getterIndex + 1, setter); + } else { + members.add(setter); + } + }); + }); + logger.info("Restored fluent shape for model: {}", modelName); + }); + } + + // Constant order of the fixed enums as shipped; ordinals are part of the public contract. + private static final Map> SHIPPED_ENUM_ORDER = new LinkedHashMap<>(); + + static { + SHIPPED_ENUM_ORDER.put("BlobImmutabilityPolicyMode", Arrays.asList("MUTABLE", "UNLOCKED", "LOCKED")); + SHIPPED_ENUM_ORDER.put("CopyStatusType", Arrays.asList("PENDING", "SUCCESS", "ABORTED", "FAILED")); + SHIPPED_ENUM_ORDER.put("DeleteSnapshotsOptionType", Arrays.asList("INCLUDE", "ONLY")); + SHIPPED_ENUM_ORDER.put("LeaseStatusType", Arrays.asList("LOCKED", "UNLOCKED")); + SHIPPED_ENUM_ORDER.put("SequenceNumberActionType", Arrays.asList("MAX", "UPDATE", "INCREMENT")); + } + + /** + * Restores the shipped constant order of the fixed enums. The emitter orders constants as the spec lists them, + * which differs from the AutoRest order, and Java exposes the order through {@code ordinal()} and + * {@code values()}. + * + * @param models The models package. + * @param logger The logger. + */ + private static void restoreShippedEnumOrder(PackageCustomization models, Logger logger) { + SHIPPED_ENUM_ORDER.forEach((enumName, order) -> models.getClass(enumName) + .customizeAst(ast -> ast.getEnumByName(enumName) + .ifPresent(declaration -> declaration.getEntries() + .sort(Comparator.comparingInt(entry -> order.indexOf(entry.getNameAsString())))))); + logger.info("Restored shipped enum constant order for {}", SHIPPED_ENUM_ORDER.keySet()); + } + + /** + * Restores public model members the AutoRest layer shipped that the spec doesn't produce: + *
    + *
  • {@code Block}'s deprecated {@code int} size accessors, alongside the {@code long} ones;
  • + *
  • {@code BlobContainerItemProperties}' primitive {@code boolean} accessors for the encryption scope override, + * which treat an absent value as {@code false};
  • + *
  • two deprecated, misspelled {@code BlobErrorCode} constants kept for compatibility;
  • + *
  • {@code PageList}'s continuation marker, which stays private and is reached by the SDK through + * {@code PageListHelper}.
  • + *
+ * + * @param models The models package. + * @param logger The logger. + */ + /** + * Get Blob Layout answers 204 without a body for an empty blob, but the generated convenience methods deserialize + * the body for every success status. A 204 now yields a null layout, which the hand-written paging treats as an + * empty page. + * + * @param implPackage The implementation package holding the relocated convenience clients. + */ + private static void allowEmptyGetLayoutResponse(PackageCustomization implPackage) { + for (String className : Arrays.asList("BlobAsyncClientInternal", "BlobClientInternal")) { + implPackage.getClass(className) + .customizeAst(ast -> ast.getClassByName(className) + .ifPresent(clazz -> clazz.getMethodsByName("getLayoutWithResponse") + .forEach(method -> method + .findAll(MethodCallExpr.class, call -> "toObject".equals(call.getNameAsString())) + .forEach(call -> call.replace(StaticJavaParser + .parseExpression("protocolMethodResponse.getStatusCode() == 204 ? null : " + call)))))); + } + } + + private static void restoreShippedModelMembers(PackageCustomization models, Logger logger) { + models.getClass("Block").customizeAst(ast -> ast.getClassByName("Block").ifPresent(clazz -> { + clazz.addMember(StaticJavaParser.parseBodyDeclaration(String.join("\n", + "/**", + " * Get the size property: The block size in bytes.", + " *", + " * @return the size value.", + " * @deprecated Use {@link #getSizeLong()}", + " */", + "@Deprecated", + "public int getSize() {", + " return (int) this.sizeLong;", + "}"))); + clazz.addMember(StaticJavaParser.parseBodyDeclaration(String.join("\n", + "/**", + " * Set the size property: The block size in bytes.", + " *", + " * @param size the size value to set.", + " * @return the Block object itself.", + " * @deprecated Use {@link #setSizeLong(long)}", + " */", + "@Deprecated", + "public Block setSize(int size) {", + " return this.setSizeLong(size);", + "}"))); + })); + + models.getClass("BlobContainerItemProperties") + .customizeAst(ast -> ast.getClassByName("BlobContainerItemProperties").ifPresent(clazz -> { + clazz.getMethodsByName("isEncryptionScopeOverridePrevented").forEach(getter -> getter + .setType("boolean") + .setBody(StaticJavaParser.parseBlock( + "{ return Boolean.TRUE.equals(this.encryptionScopeOverridePrevented); }"))); + clazz.getMethodsByName("setEncryptionScopeOverridePrevented") + .forEach(setter -> setter.getParameter(0).setType("boolean")); + })); + + models.getClass("BlobErrorCode").customizeAst(ast -> ast.getClassByName("BlobErrorCode").ifPresent(clazz -> { + addDeprecatedErrorCode(clazz, "SNAPHOT_OPERATION_RATE_EXCEEDED", "SnapshotOperationRateExceeded", + "SNAPSHOT_OPERATION_RATE_EXCEEDED"); + addDeprecatedErrorCode(clazz, "INCREMENTAL_COPY_OF_ERALIER_VERSION_SNAPSHOT_NOT_ALLOWED", + "IncrementalCopyOfEralierVersionSnapshotNotAllowed", "INCREMENTAL_COPY_OF_EARLIER_SNAPSHOT_NOT_ALLOWED"); + })); + + models.getClass("PageList").customizeAst(ast -> ast.getClassByName("PageList").ifPresent(clazz -> { + ast.addImport("com.azure.storage.blob.implementation.models.PageListHelper"); + clazz.getMethodsByName("getNextMarker").forEach(method -> method.setModifiers(Modifier.Keyword.PRIVATE)); + clazz.getMethodsByName("setNextMarker").forEach(method -> method.setModifiers(Modifier.Keyword.PRIVATE)); + clazz.getMembers().addFirst(StaticJavaParser.parseBodyDeclaration(String.join("\n", + "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);", + " }", + " });", + "}"))); + })); + logger.info("Restored shipped members of Block, BlobContainerItemProperties, BlobErrorCode and PageList"); + } + + private static void addDeprecatedErrorCode(ClassOrInterfaceDeclaration clazz, String constant, String wireValue, + String replacement) { + if (clazz.getFieldByName(constant).isPresent()) { + return; + } + clazz.addMember(StaticJavaParser.parseBodyDeclaration(String.join("\n", + "/**", + " * Static value " + wireValue + " for BlobErrorCode.", + " *", + " * @deprecated Please use {@link BlobErrorCode#" + replacement + "}", + " */", + "@Deprecated", + "public static final BlobErrorCode " + constant + " = fromString(\"" + wireValue + "\");"))); + } + + private static int indexOfFirstConstructor(NodeList> members) { + for (int i = 0; i < members.size(); i++) { + if (members.get(i) instanceof ConstructorDeclaration) { + return i; + } + } + return -1; + } + + private static int indexOfGetter(NodeList> members, String fieldName) { + String capitalized = Character.toUpperCase(fieldName.charAt(0)) + fieldName.substring(1); + String getterName = "get" + capitalized; + String booleanGetterName = "is" + capitalized; + for (int i = 0; i < members.size(); i++) { + BodyDeclaration member = members.get(i); + if (member instanceof MethodDeclaration) { + String name = ((MethodDeclaration) member).getNameAsString(); + if (name.equals(getterName) || name.equals(booleanGetterName) || name.equals(fieldName)) { + return i; + } + } + } + return -1; + } + + + /** + * Restores JSON deserialization on the internal {@code BlobStorageError}. The emitter generates a model as either + * {@code XmlSerializable} or {@code JsonSerializable}, never both, so the XML-only error model would fall back to + * azure-core's reflective Jackson deserializer for a JSON error body. On the module path Jackson cannot access + * {@code implementation.models} (it is opened only to {@code com.azure.core}), so the error would surface as a + * plain {@code HttpResponseException}/{@code RuntimeException} instead of {@code BlobStorageException}. The + * pre-migration model implemented both interfaces; this restores that, accepting both the bare and the + * {@code {"error": {...}}}-wrapped forms. Each field is read and written under its own (camel case) name, as the + * pre-migration model did, so fields the spec adds are picked up automatically. + * + * @param customization The library customization. + * @param logger The logger. + */ + private static void restoreBlobStorageErrorJson(LibraryCustomization customization, Logger logger) { + customization.getClass("com.azure.storage.blob.implementation.models", "BlobStorageError") + .customizeAst(ast -> ast.getClassByName("BlobStorageError").ifPresent(clazz -> { + if (!clazz.getMethodsByName("fromJson").isEmpty()) { + return; + } + ast.addImport("com.azure.json.JsonReader"); + ast.addImport("com.azure.json.JsonSerializable"); + ast.addImport("com.azure.json.JsonToken"); + ast.addImport("com.azure.json.JsonWriter"); + ast.addImport("java.io.IOException"); + clazz.addImplementedType("JsonSerializable"); + + List fields = clazz.getFields() + .stream() + .filter(field -> !field.isStatic()) + .map(field -> field.getVariable(0)) + .collect(Collectors.toList()); + + BlockStmt toJsonBody = new BlockStmt().addStatement("jsonWriter.writeStartObject();"); + fields.forEach(field -> toJsonBody.addStatement(jsonWriteStatement(field))); + toJsonBody.addStatement("return jsonWriter.writeEndObject();"); + MethodDeclaration toJson = clazz.addMethod("toJson", Modifier.Keyword.PUBLIC); + toJson.setType("JsonWriter"); + toJson.addParameter("JsonWriter", "jsonWriter"); + toJson.addThrownException(StaticJavaParser.parseClassOrInterfaceType("IOException")); + toJson.addMarkerAnnotation("Override"); + toJson.setBody(toJsonBody); + + MethodDeclaration fromJson = clazz.addMethod("fromJson", Modifier.Keyword.PUBLIC, + Modifier.Keyword.STATIC); + fromJson.setType("BlobStorageError"); + fromJson.addParameter("JsonReader", "jsonReader"); + fromJson.addThrownException(StaticJavaParser.parseClassOrInterfaceType("IOException")); + fromJson.setBody(StaticJavaParser.parseBlock(String.join("\n", + "{", + " return jsonReader.readObject(reader -> {", + " // The error may be the object itself or wrapped in an \"error\" node.", + " JsonReader bufferedReader = reader.bufferObject();", + " bufferedReader.nextToken();", + " while (bufferedReader.nextToken() != JsonToken.END_OBJECT) {", + " String fieldName = bufferedReader.getFieldName();", + " bufferedReader.nextToken();", + " if (\"error\".equals(fieldName)) {", + " return readBlobStorageError(bufferedReader);", + " }", + " bufferedReader.skipChildren();", + " }", + " return readBlobStorageError(bufferedReader.reset());", + " });", + "}"))); + fromJson.setJavadocComment(new Javadoc( + JavadocDescription.parseText("Reads an instance of BlobStorageError from the JsonReader.")) + .addBlockTag("param", "jsonReader", "The JsonReader being read.") + .addBlockTag("return", "An instance of BlobStorageError if the JsonReader was pointing to an " + + "instance of it, or null if it was pointing to JSON null.") + .addBlockTag("throws", "IOException", "If an error occurs while reading the BlobStorageError.")); + + // One branch per field, then skip anything else. + Statement readField = StaticJavaParser.parseBlock("{ reader.skipChildren(); }"); + for (int i = fields.size() - 1; i >= 0; i--) { + String name = fields.get(i).getNameAsString(); + readField = new IfStmt(StaticJavaParser.parseExpression("\"" + name + "\".equals(fieldName)"), + new BlockStmt().addStatement("deserialized." + name + " = " + jsonReadExpression(fields.get(i)) + + ";"), + readField); + } + BlockStmt readObject = StaticJavaParser.parseBlock(String.join("\n", + "{", + " BlobStorageError deserialized = new BlobStorageError();", + " while (reader.nextToken() != JsonToken.END_OBJECT) {", + " String fieldName = reader.getFieldName();", + " reader.nextToken();", + " }", + " return deserialized;", + "}")); + readObject.findFirst(WhileStmt.class).get().getBody().asBlockStmt().addStatement(readField); + MethodDeclaration readBlobStorageError = clazz.addMethod("readBlobStorageError", + Modifier.Keyword.PRIVATE, Modifier.Keyword.STATIC); + readBlobStorageError.setType("BlobStorageError"); + readBlobStorageError.addParameter("JsonReader", "jsonReader"); + readBlobStorageError.addThrownException(StaticJavaParser.parseClassOrInterfaceType("IOException")); + readBlobStorageError.setBody(new BlockStmt().addStatement(new ReturnStmt(new MethodCallExpr( + new NameExpr("jsonReader"), "readObject", + new NodeList<>(new LambdaExpr(new Parameter(new UnknownType(), "reader"), readObject)))))); + logger.info("Restored JSON deserialization on BlobStorageError"); + })); + } + + // Writes a BlobStorageError field: strings and numbers directly, and expandable string enums by their value. + private static String jsonWriteStatement(VariableDeclarator field) { + String name = field.getNameAsString(); + switch (field.getTypeAsString()) { + case "String": + return "jsonWriter.writeStringField(\"" + name + "\", this." + name + ");"; + + case "Integer": + return "jsonWriter.writeNumberField(\"" + name + "\", this." + name + ");"; + + default: + return "jsonWriter.writeStringField(\"" + name + "\", this." + name + " == null ? null : this." + name + + ".toString());"; + } + } + + // Reads a BlobStorageError field, the counterpart of jsonWriteStatement. + private static String jsonReadExpression(VariableDeclarator field) { + switch (field.getTypeAsString()) { + case "String": + return "reader.getString()"; + + case "Integer": + return "reader.getNullable(JsonReader::getInt)"; + + default: + return field.getTypeAsString() + ".fromString(reader.getString())"; + } + } + + /** + * Customizes the implementation classes that will perform calls to the service. The following logic is used: + *

+ * - Check for the return of the method not equaling to PagedFlux, PagedIterable, PollerFlux, or SyncPoller. Those + * types wrap other APIs and those APIs being update is the correct change. + * - For asynchronous methods, add a call to + * {@code .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException)} to handle + * mapping BlobStorageErrorException to BlobStorageException. + * - For synchronous methods, wrap the return statement in a try-catch block that catches + * BlobStorageErrorException and rethrows {@code ModelHelper.mapToBlobStorageException(e)}. Or, for void + * methods wrap the last statement. + * + * @param implPackage The implementation package. + */ + private static void updateImplToMapInternalException(PackageCustomization implPackage) { + List implsToUpdate = Arrays.asList("ServicesImpl", "ContainersImpl", "BlobsImpl", "AppendBlobsImpl", "BlockBlobsImpl", + "PageBlobsImpl"); + for (String implToUpdate : implsToUpdate) { + implPackage.getClass(implToUpdate).customizeAst(ast -> { + ast.addImport("com.azure.storage.blob.implementation.util.ModelHelper"); + ast.addImport("com.azure.storage.blob.models.BlobStorageException"); + ast.addImport("com.azure.storage.blob.implementation.models.BlobStorageErrorException"); + ast.getClassByName(implToUpdate).ifPresent(clazz -> { + clazz.getMethods().forEach(methodDeclaration -> { + // getService() is a plain accessor for the RestProxy service instance; it never does I/O. + if (methodDeclaration.getNameAsString().equals("getService")) { + return; + } + + Type returnType = methodDeclaration.getType(); + // The way code generation works we only need to update the methods that have a class return type. + // As non-class return types, such as "void", call into the Response methods. + if (!returnType.isClassOrInterfaceType()) { + return; + } + + ClassOrInterfaceType returnTypeClass = returnType.asClassOrInterfaceType(); + String returnTypeName = returnTypeClass.getNameAsString(); + if (returnTypeName.equals("PagedFlux") || returnTypeName.equals("PagedIterable") + || returnTypeName.equals("PollerFlux") || returnTypeName.equals("SyncPoller")) { + return; + } + + if (returnTypeName.equals("Mono") || returnTypeName.equals("Flux")) { + addErrorMappingToAsyncMethod(methodDeclaration); + } else { + addErrorMappingToSyncMethod(methodDeclaration); + } + }); + }); + }); + } + } + + private static void addErrorMappingToAsyncMethod(MethodDeclaration method) { + BlockStmt body = method.getBody().get(); + ReturnStmt returnStmt = body.getStatement(body.getStatements().size() - 1).asReturnStmt(); + // Map errors on the service call itself, ahead of any .map(...): onErrorMap returns the publisher's own type, + // so placing it after a map that builds, say, a PagedResponseBase breaks the generic inference. + Expression serviceCall = returnStmt.getExpression().get(); + while (serviceCall.isMethodCallExpr() && serviceCall.asMethodCallExpr().getScope() + .filter(Expression::isMethodCallExpr) + .isPresent()) { + serviceCall = serviceCall.asMethodCallExpr().getScope().get(); + } + MethodCallExpr onErrorMap = StaticJavaParser + .parseExpression("x.onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException)") + .asMethodCallExpr(); + if (serviceCall == returnStmt.getExpression().get()) { + onErrorMap.setScope(serviceCall); + returnStmt.setExpression(onErrorMap); + } else { + serviceCall.replace(onErrorMap); + onErrorMap.setScope(serviceCall); + } + } + + private static void addErrorMappingToSyncMethod(MethodDeclaration method) { + // Turn the entire method into a BlockStmt that will be used as the try block. + BlockStmt tryBlock = method.getBody().get(); + BlockStmt catchBlock = new BlockStmt(new NodeList<>(StaticJavaParser.parseStatement( + "throw ModelHelper.mapToBlobStorageException(internalException);"))); + Parameter catchParameter = new Parameter().setType("BlobStorageErrorException") + .setName("internalException"); + CatchClause catchClause = new CatchClause(catchParameter, catchBlock); + TryStmt tryCatchMap = new TryStmt(tryBlock, new NodeList<>(catchClause), null); + + // Replace the last statement with the try-catch block. + method.setBody(new BlockStmt(new NodeList<>(tryCatchMap))); + } +} 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 54d514025de60..6a893526b33c4 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 @@ -11,6 +11,7 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.ResponseBase; import com.azure.core.http.rest.SimpleResponse; @@ -18,7 +19,7 @@ import com.azure.core.util.FluxUtil; 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.BlobContainerAsyncClientInternal; import com.azure.storage.blob.implementation.accesshelpers.BlobItemConstructorProxy; import com.azure.storage.blob.implementation.models.BlobHierarchyListSegment; import com.azure.storage.blob.implementation.models.ContainersGetAccountInfoHeaders; @@ -32,13 +33,16 @@ import com.azure.storage.blob.implementation.util.ArrowBlobListDeserializer.ArrowListBlobsResult; import com.azure.storage.blob.implementation.util.BlobConstants; import com.azure.storage.blob.implementation.util.BlobSasImplUtil; +import com.azure.storage.blob.implementation.util.BuilderHelper; import com.azure.storage.blob.implementation.util.ModelHelper; +import com.azure.storage.blob.implementation.util.RequestOptionsHelper; 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.implementation.models.BlobSignedIdentifiers; import com.azure.storage.blob.models.BlobSignedIdentifier; import com.azure.storage.blob.models.BlobStorageException; import com.azure.storage.blob.models.CpkInfo; @@ -115,6 +119,12 @@ public final class BlobContainerAsyncClient { private static final ClientLogger LOGGER = new ClientLogger(BlobContainerAsyncClient.class); private final AzureBlobStorageImpl azureBlobStorage; + private final BlobContainerAsyncClientInternal containerClientInternal; + + private RequestOptions containerRequestOptions(Context context) { + return RequestOptionsHelper.containerRequestOptions(context, this.azureBlobStorage.getUrl(), containerName); + } + private final String accountName; private final String containerName; private final BlobServiceVersion serviceVersion; @@ -138,10 +148,8 @@ public final class BlobContainerAsyncClient { BlobContainerAsyncClient(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.azureBlobStorage = BuilderHelper.createAzureBlobStorage(pipeline, url, serviceVersion); + this.containerClientInternal = new BlobContainerAsyncClientInternal(this.azureBlobStorage.getContainers()); this.serviceVersion = serviceVersion; this.accountName = accountName; @@ -438,9 +446,14 @@ public Mono> createWithResponse(Map metadata, Pub Mono> createWithResponse(Map metadata, PublicAccessType accessType, Context context) { context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getContainers() - .createNoCustomHeadersWithResponseAsync(containerName, null, metadata, accessType, null, - blobContainerEncryptionScope, context); + return this.containerClientInternal + .createWithResponse(null, metadata, accessType, + blobContainerEncryptionScope == null ? null : blobContainerEncryptionScope.getDefaultEncryptionScope(), + blobContainerEncryptionScope == null + ? null + : blobContainerEncryptionScope.isEncryptionScopeOverridePrevented(), + containerRequestOptions(context)) + .map(rb -> (Response) rb); } /** @@ -607,9 +620,10 @@ Mono> deleteWithResponse(BlobRequestConditions requestConditions, } context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getContainers() - .deleteNoCustomHeadersWithResponseAsync(containerName, null, requestConditions.getLeaseId(), - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), null, context); + return this.containerClientInternal + .deleteWithResponse(null, requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), containerRequestOptions(context)) + .map(rb -> (Response) rb); } /** @@ -762,15 +776,14 @@ public Mono> getPropertiesWithResponse(String Mono> getPropertiesWithResponse(String leaseId, Context context) { context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getContainers() - .getPropertiesWithResponseAsync(containerName, null, leaseId, null, context) + return this.containerClientInternal.getPropertiesWithResponse(null, leaseId, containerRequestOptions(context)) .map(rb -> { ContainersGetPropertiesHeaders hd = rb.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()); + BlobContainerProperties properties = new BlobContainerProperties(hd.getMetadata(), hd.getETag(), + hd.getLastModified(), hd.getDuration(), hd.getLeaseState(), hd.getLeaseStatus(), hd.getAccess(), + Boolean.TRUE.equals(hd.isHasImmutabilityPolicy()), Boolean.TRUE.equals(hd.isHasLegalHold()), + hd.getDefaultEncryptionScope(), hd.isPreventEncryptionScopeOverride(), + hd.isImmutableStorageWithVersioningEnabled()); return new SimpleResponse<>(rb, properties); }); } @@ -846,9 +859,10 @@ Mono> setMetadataWithResponse(Map metadata, BlobR "If-Modified-Since is the only HTTP access condition supported for this API")); } - return this.azureBlobStorage.getContainers() - .setMetadataNoCustomHeadersWithResponseAsync(containerName, null, requestConditions.getLeaseId(), metadata, - requestConditions.getIfModifiedSince(), null, context); + return this.containerClientInternal + .setMetadataWithResponse(null, requestConditions.getLeaseId(), metadata, + requestConditions.getIfModifiedSince(), containerRequestOptions(context)) + .map(rb -> (Response) rb); } /** @@ -914,10 +928,9 @@ public Mono> getAccessPolicyWithResponse(S Mono> getAccessPolicyWithResponse(String leaseId, Context context) { context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getContainers() - .getAccessPolicyWithResponseAsync(containerName, null, leaseId, null, context) + return this.containerClientInternal.getAccessPolicyWithResponse(null, leaseId, containerRequestOptions(context)) .map(response -> new SimpleResponse<>(response, new BlobContainerAccessPolicies( - response.getDeserializedHeaders().getXMsBlobPublicAccess(), response.getValue().items()))); + response.getDeserializedHeaders().getAccess(), response.getValue().getItems()))); } /** @@ -1019,10 +1032,11 @@ Mono> setAccessPolicyWithResponse(PublicAccessType accessType, 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, - finalIdentifiers, context); + return this.containerClientInternal + .setAccessPolicyWithResponse(null, requestConditions.getLeaseId(), accessType, + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + new BlobSignedIdentifiers(finalIdentifiers), containerRequestOptions(context)) + .map(rb -> (Response) rb); } /** @@ -1184,10 +1198,9 @@ PagedFlux listBlobsFlatWithOptionalTimeout(ListBlobsOptions options, S } return listBlobsFlatSegment(marker, finalOptions, timeout).map(response -> { - List value = response.getValue().getSegment() == null + List value = response.getValue().getBlobItems() == null ? Collections.emptyList() : response.getValue() - .getSegment() .getBlobItems() .stream() .map(ModelHelper::populateBlobItem) @@ -1223,11 +1236,9 @@ PagedFlux listBlobsFlatWithOptionalTimeout(ListBlobsOptions options, S ArrayList include = options.getDetails().toList().isEmpty() ? null : options.getDetails().toList(); - return StorageImplUtils.applyOptionalTimeout( - this.azureBlobStorage.getContainers() - .listBlobFlatSegmentWithResponseAsync(containerName, options.getPrefix(), marker, - options.getMaxResultsPerPage(), include, options.getStartFrom(), null, null, Context.NONE), - timeout); + return StorageImplUtils.applyOptionalTimeout(this.containerClientInternal.listBlobFlatSegmentWithResponse( + options.getPrefix(), marker, options.getMaxResultsPerPage(), include, null, options.getStartFrom(), + containerRequestOptions(Context.NONE)), timeout); } private Mono> listBlobsFlatSegmentArrow(String marker, ListBlobsOptions options, @@ -1237,38 +1248,35 @@ private Mono> listBlobsFlatSegmentArrow(String marker, L ArrayList include = options.getDetails().toList(); include = include.isEmpty() ? null : include; + ListBlobsOptions arrowOptions = options; return StorageImplUtils.applyOptionalTimeout(this.azureBlobStorage.getContainers() - .listBlobFlatSegmentApacheArrowWithResponseAsync(containerName, options.getPrefix(), marker, - options.getMaxResultsPerPage(), include, null, options.getStartFrom(), options.getEndBefore(), null, - Context.NONE), + .listBlobFlatSegmentApacheArrowWithResponseAsync( + RequestOptionsHelper.addListBlobsQueryParams(containerRequestOptions(Context.NONE), + arrowOptions.getPrefix(), marker, arrowOptions.getMaxResultsPerPage(), include, + arrowOptions.getStartFrom(), arrowOptions.getEndBefore())), timeout).flatMap(response -> { String contentType = response.getHeaders().getValue(com.azure.core.http.HttpHeaderName.CONTENT_TYPE); - return FluxUtil.collectBytesInByteBufferStream(response.getValue()).map(bytes -> { + return Mono.fromCallable(() -> response.getValue().toBytes()).map(bytes -> { java.io.ByteArrayInputStream inputStream = new java.io.ByteArrayInputStream(bytes); if (StorageImplUtils.hasMatchingHeaderValue(contentType, Constants.ContentTypeConstants.APPLICATION_VND_APACHE_ARROW_STREAM)) { ArrowListBlobsResult arrowResult = ArrowBlobListDeserializer.deserialize(inputStream); - List value = arrowResult.getBlobItems() - .stream() - .map(ModelHelper::populateBlobItem) - .collect(Collectors.toList()); + List value = arrowResult.getBlobItems(); return (PagedResponse) new PagedResponseBase<>(response.getRequest(), - response.getStatusCode(), response.getHeaders(), value, arrowResult.getNextMarker(), - response.getDeserializedHeaders()); + response.getStatusCode(), response.getHeaders(), value, arrowResult.getNextMarker(), null); } else { // XML fallback try { ListBlobsFlatSegmentResponse xmlResponse = ListBlobsFlatSegmentResponse.fromXml(com.azure.xml.XmlReader.fromStream(inputStream)); - List value = xmlResponse.getSegment() == null + List value = xmlResponse.getBlobItems() == null ? Collections.emptyList() - : xmlResponse.getSegment() - .getBlobItems() + : xmlResponse.getBlobItems() .stream() .map(ModelHelper::populateBlobItem) .collect(Collectors.toList()); @@ -1412,7 +1420,7 @@ PagedFlux listBlobsHierarchyWithOptionalTimeout(String delimiter, List } return listBlobsHierarchySegment(marker, delimiter, finalOptions, timeout).map(response -> { - BlobHierarchyListSegment segment = response.getValue().getSegment(); + BlobHierarchyListSegment segment = response.getValue().getHierarchicalList(); List value; if (segment == null) { value = Collections.emptyList(); @@ -1442,11 +1450,9 @@ PagedFlux listBlobsHierarchyWithOptionalTimeout(String delimiter, List ArrayList include = options.getDetails().toList().isEmpty() ? null : options.getDetails().toList(); - return StorageImplUtils.applyOptionalTimeout( - this.azureBlobStorage.getContainers() - .listBlobHierarchySegmentWithResponseAsync(containerName, delimiter, options.getPrefix(), marker, - options.getMaxResultsPerPage(), include, options.getStartFrom(), null, null, Context.NONE), - timeout); + return StorageImplUtils.applyOptionalTimeout(this.containerClientInternal.listBlobHierarchySegmentWithResponse( + delimiter, options.getPrefix(), marker, options.getMaxResultsPerPage(), include, null, + options.getStartFrom(), containerRequestOptions(Context.NONE)), timeout); } private Mono> listBlobsHierarchySegmentArrow(String marker, String delimiter, @@ -1461,37 +1467,32 @@ private Mono> listBlobsHierarchySegmentArrow(String mark = options.getDetails().toList().isEmpty() ? null : options.getDetails().toList(); ListBlobsOptions finalOptions = options; - return StorageImplUtils - .applyOptionalTimeout(this.azureBlobStorage.getContainers() - .listBlobHierarchySegmentApacheArrowWithResponseAsync(containerName, delimiter, - finalOptions.getPrefix(), marker, finalOptions.getMaxResultsPerPage(), include, null, - finalOptions.getStartFrom(), finalOptions.getEndBefore(), null, Context.NONE), - timeout) - .flatMap(response -> { + return StorageImplUtils.applyOptionalTimeout(this.azureBlobStorage.getContainers() + .listBlobHierarchySegmentApacheArrowWithResponseAsync(delimiter, + RequestOptionsHelper.addListBlobsQueryParams(containerRequestOptions(Context.NONE), + finalOptions.getPrefix(), marker, finalOptions.getMaxResultsPerPage(), include, + finalOptions.getStartFrom(), finalOptions.getEndBefore())), + timeout).flatMap(response -> { String contentType = response.getHeaders().getValue(com.azure.core.http.HttpHeaderName.CONTENT_TYPE); - return FluxUtil.collectBytesInByteBufferStream(response.getValue()).map(bytes -> { + return Mono.fromCallable(() -> response.getValue().toBytes()).map(bytes -> { java.io.ByteArrayInputStream inputStream = new java.io.ByteArrayInputStream(bytes); if (StorageImplUtils.hasMatchingHeaderValue(contentType, Constants.ContentTypeConstants.APPLICATION_VND_APACHE_ARROW_STREAM)) { ArrowListBlobsResult arrowResult = ArrowBlobListDeserializer.deserialize(inputStream); - List value = arrowResult.getBlobItems() - .stream() - .map(ModelHelper::populateBlobItem) - .collect(Collectors.toList()); + List value = arrowResult.getBlobItems(); return (PagedResponse) new PagedResponseBase<>(response.getRequest(), - response.getStatusCode(), response.getHeaders(), value, arrowResult.getNextMarker(), - response.getDeserializedHeaders()); + response.getStatusCode(), response.getHeaders(), value, arrowResult.getNextMarker(), null); } else { // XML fallback try { ListBlobsHierarchySegmentResponse xmlResponse = ListBlobsHierarchySegmentResponse .fromXml(com.azure.xml.XmlReader.fromStream(inputStream)); - BlobHierarchyListSegment segment = xmlResponse.getSegment(); + BlobHierarchyListSegment segment = xmlResponse.getHierarchicalList(); List value = new ArrayList<>(); if (segment != null) { segment.getBlobItems() @@ -1588,12 +1589,12 @@ PagedFlux findBlobsByTags(FindBlobsOptions options, Duration tim private Mono> findBlobsByTags(FindBlobsOptions options, String marker, Duration timeout, Context context) { StorageImplUtils.assertNotNull("options", options); - return StorageImplUtils.applyOptionalTimeout(this.azureBlobStorage.getContainers() - .filterBlobsWithResponseAsync(containerName, null, null, options.getQuery(), marker, - options.getMaxResultsPerPage(), null, context), - timeout).map(response -> { + return StorageImplUtils + .applyOptionalTimeout(this.containerClientInternal.filterBlobsWithResponse(options.getQuery(), null, marker, + options.getMaxResultsPerPage(), null, containerRequestOptions(context)), timeout) + .map(response -> { List value = response.getValue() - .getBlobs() + .getBlobItems() .stream() .map(ModelHelper::populateTaggedBlobItem) .collect(Collectors.toList()); @@ -1653,12 +1654,11 @@ public Mono> getAccountInfoWithResponse() { Mono> getAccountInfoWithResponse(Context context) { context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getContainers() - .getAccountInfoWithResponseAsync(containerName, null, null, context) + return this.containerClientInternal.getAccountInfoWithResponse(null, containerRequestOptions(context)) .map(rb -> { ContainersGetAccountInfoHeaders hd = rb.getDeserializedHeaders(); return new SimpleResponse<>(rb, - new StorageAccountInfo(hd.getXMsSkuName(), hd.getXMsAccountKind(), hd.isXMsIsHnsEnabled())); + new StorageAccountInfo(hd.getSkuName(), hd.getAccountKind(), hd.isHierarchicalNamespaceEnabled())); }); } 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 ddbbe60bcebc6..d5602cca1abd6 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 @@ -11,23 +11,23 @@ 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.RequestOptions; 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.implementation.AzureBlobStorageImpl; -import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; +import com.azure.storage.blob.implementation.BlobContainerClientInternal; 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.BlobSignedIdentifiers; 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.ContainersListBlobFlatSegmentApacheArrowHeaders; import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentHeaders; -import com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentApacheArrowHeaders; import com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentHeaders; import com.azure.storage.blob.implementation.models.EncryptionScope; import com.azure.storage.blob.implementation.models.FilterBlobSegment; @@ -37,7 +37,9 @@ import com.azure.storage.blob.implementation.util.ArrowBlobListDeserializer.ArrowListBlobsResult; import com.azure.storage.blob.implementation.util.BlobConstants; import com.azure.storage.blob.implementation.util.BlobSasImplUtil; +import com.azure.storage.blob.implementation.util.BuilderHelper; import com.azure.storage.blob.implementation.util.ModelHelper; +import com.azure.storage.blob.implementation.util.RequestOptionsHelper; import com.azure.storage.blob.models.BlobContainerAccessPolicies; import com.azure.storage.blob.models.BlobContainerEncryptionScope; import com.azure.storage.blob.models.BlobContainerProperties; @@ -66,6 +68,7 @@ import com.azure.xml.XmlReader; +import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.UncheckedIOException; @@ -117,6 +120,12 @@ public final class BlobContainerClient { private static final ClientLogger LOGGER = new ClientLogger(BlobContainerClient.class); private final AzureBlobStorageImpl azureBlobStorage; + private final BlobContainerClientInternal containerClientInternal; + + private RequestOptions containerRequestOptions(Context context) { + return RequestOptionsHelper.containerRequestOptions(context, this.azureBlobStorage.getUrl(), containerName); + } + private final String accountName; private final String containerName; private final BlobServiceVersion serviceVersion; @@ -140,10 +149,8 @@ public final class BlobContainerClient { 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.azureBlobStorage = BuilderHelper.createAzureBlobStorage(pipeline, url, serviceVersion); + this.containerClientInternal = new BlobContainerClientInternal(this.azureBlobStorage.getContainers()); this.serviceVersion = serviceVersion; this.accountName = accountName; @@ -430,9 +437,13 @@ 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() - .createNoCustomHeadersWithResponse(containerName, null, metadata, accessType, null, - blobContainerEncryptionScope, finalContext); + Callable> operation + = () -> this.containerClientInternal.createWithResponse(null, metadata, accessType, + blobContainerEncryptionScope == null ? null : blobContainerEncryptionScope.getDefaultEncryptionScope(), + blobContainerEncryptionScope == null + ? null + : blobContainerEncryptionScope.isEncryptionScopeOverridePrevented(), + containerRequestOptions(finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -586,10 +597,9 @@ 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 = () -> this.containerClientInternal.deleteWithResponse(null, + finalRequestConditions.getLeaseId(), finalRequestConditions.getIfModifiedSince(), + finalRequestConditions.getIfUnmodifiedSince(), containerRequestOptions(finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -724,17 +734,16 @@ 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 = () -> this.containerClientInternal + .getPropertiesWithResponse(null, leaseId, containerRequestOptions(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()); + BlobContainerProperties properties = new BlobContainerProperties(hd.getMetadata(), hd.getETag(), + hd.getLastModified(), hd.getDuration(), hd.getLeaseState(), hd.getLeaseStatus(), hd.getAccess(), + Boolean.TRUE.equals(hd.isHasImmutabilityPolicy()), Boolean.TRUE.equals(hd.isHasLegalHold()), + hd.getDefaultEncryptionScope(), hd.isPreventEncryptionScopeOverride(), + hd.isImmutableStorageWithVersioningEnabled()); return new SimpleResponse<>(response, properties); } @@ -800,9 +809,9 @@ public Response setMetadataWithResponse(Map metadata, Blob 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 + = () -> this.containerClientInternal.setMetadataWithResponse(null, finalRequestConditions.getLeaseId(), + metadata, finalRequestConditions.getIfModifiedSince(), containerRequestOptions(finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -864,13 +873,13 @@ 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); - ResponseBase response + Callable> operation + = () -> this.containerClientInternal.getAccessPolicyWithResponse(null, leaseId, + containerRequestOptions(finalContext)); + ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response, new BlobContainerAccessPolicies( - response.getDeserializedHeaders().getXMsBlobPublicAccess(), response.getValue().items())); + response.getDeserializedHeaders().getAccess(), response.getValue().getItems())); } /** @@ -967,10 +976,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(), + Callable> operation + = () -> this.containerClientInternal.setAccessPolicyWithResponse(null, finalRequestConditions.getLeaseId(), accessType, finalRequestConditions.getIfModifiedSince(), finalRequestConditions.getIfUnmodifiedSince(), - null, finalIdentifiers, finalContext); + new BlobSignedIdentifiers(finalIdentifiers), containerRequestOptions(finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -1096,42 +1105,38 @@ public PagedIterable listBlobs(ListBlobsOptions options, String contin = finalOptions.getDetails().toList().isEmpty() ? null : finalOptions.getDetails().toList(); if (finalOptions.getStorageResponseSerializationFormat() == StorageResponseSerializationFormat.ARROW) { - Callable> operation - = () -> this.azureBlobStorage.getContainers() - .listBlobFlatSegmentApacheArrowWithResponse(containerName, finalOptions.getPrefix(), nextMarker, - finalOptions.getMaxResultsPerPage(), include, null, finalOptions.getStartFrom(), - finalOptions.getEndBefore(), null, Context.NONE); - ResponseBase response + Callable> operation = () -> this.azureBlobStorage.getContainers() + .listBlobFlatSegmentApacheArrowWithResponse( + RequestOptionsHelper.addListBlobsQueryParams(containerRequestOptions(Context.NONE), + finalOptions.getPrefix(), nextMarker, finalOptions.getMaxResultsPerPage(), include, + finalOptions.getStartFrom(), finalOptions.getEndBefore())); + Response response = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); String contentType = response.getHeaders().getValue(com.azure.core.http.HttpHeaderName.CONTENT_TYPE); - // The response body is an InputStream backed by the network buffer. It must be closed to release the - // underlying buffer, otherwise the transport (e.g. Netty) will report a resource leak. - try (InputStream responseBody = response.getValue()) { + // The response body is a stream over the network buffer. It must be closed to release the underlying + // buffer, otherwise the transport (e.g. Netty) will report a resource leak. + byte[] arrowBody = response.getValue().toBytes(); + try (InputStream responseBody = new ByteArrayInputStream(arrowBody == null ? new byte[0] : arrowBody)) { if (StorageImplUtils.hasMatchingHeaderValue(contentType, Constants.ContentTypeConstants.APPLICATION_VND_APACHE_ARROW_STREAM)) { // Arrow response — parse with Arrow parser entrypoint ArrowListBlobsResult arrowResult = ArrowBlobListDeserializer.deserialize(responseBody); - List value = arrowResult.getBlobItems() - .stream() - .map(ModelHelper::populateBlobItem) - .collect(Collectors.toList()); + List value = arrowResult.getBlobItems(); return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), - response.getHeaders(), value, arrowResult.getNextMarker(), - response.getDeserializedHeaders()); + response.getHeaders(), value, arrowResult.getNextMarker(), null); } else { // XML fallback — service returned XML instead of Arrow try { ListBlobsFlatSegmentResponse xmlResponse = ListBlobsFlatSegmentResponse.fromXml(XmlReader.fromStream(responseBody)); - List value = xmlResponse.getSegment() == null + List value = xmlResponse.getBlobItems() == null ? Collections.emptyList() - : xmlResponse.getSegment() - .getBlobItems() + : xmlResponse.getBlobItems() .stream() .map(ModelHelper::populateBlobItem) .collect(Collectors.toList()); @@ -1149,17 +1154,15 @@ public PagedIterable listBlobs(ListBlobsOptions options, String contin } } else { Callable> operation - = () -> this.azureBlobStorage.getContainers() - .listBlobFlatSegmentWithResponse(containerName, finalOptions.getPrefix(), nextMarker, - finalOptions.getMaxResultsPerPage(), include, finalOptions.getStartFrom(), null, null, - Context.NONE); + = () -> this.containerClientInternal.listBlobFlatSegmentWithResponse(finalOptions.getPrefix(), + nextMarker, finalOptions.getMaxResultsPerPage(), include, null, finalOptions.getStartFrom(), + containerRequestOptions(Context.NONE)); ResponseBase response = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); - List value = response.getValue().getSegment() == null + List value = response.getValue().getBlobItems() == null ? Collections.emptyList() : response.getValue() - .getSegment() .getBlobItems() .stream() .map(ModelHelper::populateBlobItem) @@ -1291,37 +1294,35 @@ private PagedResponse listBlobsHierarchySegment(String marker, String = options.getDetails().toList().isEmpty() ? null : options.getDetails().toList(); if (options.getStorageResponseSerializationFormat() == StorageResponseSerializationFormat.ARROW) { - Callable> operation - = () -> azureBlobStorage.getContainers() - .listBlobHierarchySegmentApacheArrowWithResponse(containerName, delimiter, options.getPrefix(), - marker, options.getMaxResultsPerPage(), include, null, options.getStartFrom(), - options.getEndBefore(), null, Context.NONE); - ResponseBase response + Callable> operation = () -> this.azureBlobStorage.getContainers() + .listBlobHierarchySegmentApacheArrowWithResponse(delimiter, + RequestOptionsHelper.addListBlobsQueryParams(containerRequestOptions(Context.NONE), + options.getPrefix(), marker, options.getMaxResultsPerPage(), include, options.getStartFrom(), + options.getEndBefore())); + Response response = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); String contentType = response.getHeaders().getValue(com.azure.core.http.HttpHeaderName.CONTENT_TYPE); - // The response body is an InputStream backed by the network buffer. It must be closed to release the - // underlying buffer, otherwise the transport (e.g. Netty) will report a resource leak. - try (InputStream responseBody = response.getValue()) { + // The response body is a stream over the network buffer. It must be closed to release the underlying + // buffer, otherwise the transport (e.g. Netty) will report a resource leak. + byte[] arrowBody = response.getValue().toBytes(); + try (InputStream responseBody = new ByteArrayInputStream(arrowBody == null ? new byte[0] : arrowBody)) { if (StorageImplUtils.hasMatchingHeaderValue(contentType, Constants.ContentTypeConstants.APPLICATION_VND_APACHE_ARROW_STREAM)) { ArrowListBlobsResult arrowResult = ArrowBlobListDeserializer.deserialize(responseBody); - List value = arrowResult.getBlobItems() - .stream() - .map(ModelHelper::populateBlobItem) - .collect(Collectors.toList()); + List value = arrowResult.getBlobItems(); return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), - response.getHeaders(), value, arrowResult.getNextMarker(), response.getDeserializedHeaders()); + response.getHeaders(), value, arrowResult.getNextMarker(), null); } else { // XML fallback — service returned XML instead of Arrow try { ListBlobsHierarchySegmentResponse xmlResponse = ListBlobsHierarchySegmentResponse.fromXml(XmlReader.fromStream(responseBody)); - BlobHierarchyListSegment segment = xmlResponse.getSegment(); + BlobHierarchyListSegment segment = xmlResponse.getHierarchicalList(); List value = new ArrayList<>(); if (segment != null) { segment.getBlobItems().forEach(item -> value.add(BlobItemConstructorProxy.create(item))); @@ -1344,14 +1345,14 @@ private PagedResponse listBlobsHierarchySegment(String marker, String } } else { Callable> operation - = () -> azureBlobStorage.getContainers() - .listBlobHierarchySegmentWithResponse(containerName, delimiter, options.getPrefix(), marker, - options.getMaxResultsPerPage(), include, options.getStartFrom(), null, null, Context.NONE); + = () -> this.containerClientInternal.listBlobHierarchySegmentWithResponse(delimiter, + options.getPrefix(), marker, options.getMaxResultsPerPage(), include, null, options.getStartFrom(), + containerRequestOptions(Context.NONE)); ResponseBase response = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); - BlobHierarchyListSegment segment = response.getValue().getSegment(); + BlobHierarchyListSegment segment = response.getValue().getHierarchicalList(); List value = new ArrayList<>(); if (segment != null) { segment.getBlobItems().forEach(item -> value.add(BlobItemConstructorProxy.create(item))); @@ -1425,15 +1426,14 @@ public PagedIterable findBlobsByTags(FindBlobsOptions options, D private PagedResponse findBlobsByTagsHelper(FindBlobsOptions options, String marker, Duration timeout, Context context) { Callable> operation - = () -> this.azureBlobStorage.getContainers() - .filterBlobsWithResponse(containerName, null, null, options.getQuery(), marker, - options.getMaxResultsPerPage(), null, context); + = () -> this.containerClientInternal.filterBlobsWithResponse(options.getQuery(), null, marker, + options.getMaxResultsPerPage(), null, containerRequestOptions(context)); ResponseBase response = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); List value = response.getValue() - .getBlobs() + .getBlobItems() .stream() .map(ModelHelper::populateTaggedBlobItem) .collect(Collectors.toList()); @@ -1484,13 +1484,12 @@ 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, null, null, finalContext); + Callable> operation = () -> this.containerClientInternal + .getAccountInfoWithResponse(null, containerRequestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); ContainersGetAccountInfoHeaders hd = response.getDeserializedHeaders(); - return new SimpleResponse<>(response, new StorageAccountInfo(hd.getXMsSkuName(), hd.getXMsAccountKind())); + return new SimpleResponse<>(response, new StorageAccountInfo(hd.getSkuName(), hd.getAccountKind())); } // TODO: Reintroduce this API once service starts supporting it. 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 4f648b58e00b1..0412de220b0f4 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 @@ -10,7 +10,9 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.HttpHeaderName; import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; @@ -19,10 +21,15 @@ import com.azure.core.util.FluxUtil; 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.BlobContainerAsyncClientInternal; +import com.azure.storage.blob.implementation.BlobServiceAsyncClientInternal; +import com.azure.storage.blob.implementation.models.BlobContainersSegment; +import com.azure.storage.blob.implementation.models.FilterBlobSegment; import com.azure.storage.blob.implementation.models.EncryptionScope; import com.azure.storage.blob.implementation.models.ServicesGetAccountInfoHeaders; +import com.azure.storage.blob.implementation.util.BuilderHelper; import com.azure.storage.blob.implementation.util.ModelHelper; +import com.azure.storage.blob.implementation.util.RequestOptionsHelper; import com.azure.storage.blob.models.BlobContainerEncryptionScope; import com.azure.storage.blob.models.BlobContainerItem; import com.azure.storage.blob.models.BlobCorsRule; @@ -89,6 +96,10 @@ public final class BlobServiceAsyncClient { private final AzureBlobStorageImpl azureBlobStorage; + private final BlobServiceAsyncClientInternal serviceClientInternal; + + private final BlobContainerAsyncClientInternal containerClientInternal; + private final String accountName; private final BlobServiceVersion serviceVersion; private final CpkInfo customerProvidedKey; // only used to pass down to blob clients @@ -120,10 +131,9 @@ public final class BlobServiceAsyncClient { } catch (IllegalArgumentException ex) { throw LOGGER.logExceptionAsError(ex); } - this.azureBlobStorage = new AzureBlobStorageImplBuilder().pipeline(pipeline) - .url(url) - .version(serviceVersion.getVersion()) - .buildClient(); + this.azureBlobStorage = BuilderHelper.createAzureBlobStorage(pipeline, url, serviceVersion); + this.serviceClientInternal = new BlobServiceAsyncClientInternal(this.azureBlobStorage.getServices()); + this.containerClientInternal = new BlobContainerAsyncClientInternal(this.azureBlobStorage.getContainers()); this.serviceVersion = serviceVersion; this.accountName = accountName; @@ -595,10 +605,14 @@ private Mono> listBlobContainersSegment(String ListBlobContainersOptions options, Duration timeout) { options = options == null ? new ListBlobContainersOptions() : options; - return StorageImplUtils.applyOptionalTimeout(this.azureBlobStorage.getServices() - .listBlobContainersSegmentSinglePageAsync(options.getPrefix(), marker, options.getMaxResultsPerPage(), - ModelHelper.toIncludeTypes(options.getDetails()), null, null, Context.NONE), - timeout); + return StorageImplUtils.applyOptionalTimeout(this.serviceClientInternal + .listContainersSegmentWithResponse(options.getPrefix(), marker, options.getMaxResultsPerPage(), null, + ModelHelper.toIncludeTypes(options.getDetails()), RequestOptionsHelper.requestOptions(Context.NONE)) + .map(response -> { + BlobContainersSegment segment = response.getValue(); + return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), + segment.getContainerItems(), segment.getNextMarker(), null); + }), timeout); } /** @@ -665,18 +679,18 @@ private Mono> findBlobsByTags(FindBlobsOptions opt Duration timeout, Context context) { throwOnAnonymousAccess(); StorageImplUtils.assertNotNull("options", options); - return StorageImplUtils.applyOptionalTimeout(this.azureBlobStorage.getServices() - .filterBlobsWithResponseAsync(null, null, options.getQuery(), marker, options.getMaxResultsPerPage(), null, - context), - timeout).map(response -> { - List value = response.getValue() - .getBlobs() + + return StorageImplUtils + .applyOptionalTimeout(this.serviceClientInternal.filterBlobsWithResponse(options.getQuery(), null, marker, + options.getMaxResultsPerPage(), null, RequestOptionsHelper.requestOptions(context)), timeout) + .map(response -> { + FilterBlobSegment segment = response.getValue(); + List value = segment.getBlobItems() .stream() .map(ModelHelper::populateTaggedBlobItem) .collect(Collectors.toList()); - return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), - value, response.getValue().getNextMarker(), response.getDeserializedHeaders()); + value, segment.getNextMarker(), null); }); } @@ -732,8 +746,7 @@ public Mono> getPropertiesWithResponse() { Mono> getPropertiesWithResponse(Context context) { context = context == null ? Context.NONE : context; throwOnAnonymousAccess(); - return this.azureBlobStorage.getServices() - .getPropertiesWithResponseAsync(null, null, context) + return this.serviceClientInternal.getPropertiesWithResponse(null, RequestOptionsHelper.requestOptions(context)) .map(rb -> new SimpleResponse<>(rb, rb.getValue())); } @@ -881,8 +894,9 @@ Mono> setPropertiesWithResponse(BlobServiceProperties properties, } context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getServices() - .setPropertiesNoCustomHeadersWithResponseAsync(finalProperties, null, null, context); + return this.serviceClientInternal + .setPropertiesWithResponse(finalProperties, null, RequestOptionsHelper.requestOptions(context)) + .map(rb -> (Response) rb); } /** @@ -972,12 +986,12 @@ Mono> getUserDelegationKeyWithResponse(OffsetDateTim new IllegalArgumentException("`start` must be null or a datetime before `expiry`.")); } - return this.azureBlobStorage.getServices() - .getUserDelegationKeyWithResponseAsync( + return this.serviceClientInternal + .getUserDelegationKeyWithResponse( new KeyInfo().setStart(start == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(start)) .setExpiry(Constants.ISO_8601_UTC_DATE_FORMATTER.format(expiry)) .setDelegatedUserTenantId(delegatedUserTenantId), - null, null, context) + null, RequestOptionsHelper.requestOptions(context)) .map(rb -> new SimpleResponse<>(rb, rb.getValue())); } @@ -1034,8 +1048,7 @@ Mono> getStatisticsWithResponse(Context context) throwOnAnonymousAccess(); context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getServices() - .getStatisticsWithResponseAsync(null, null, context) + return this.serviceClientInternal.getStatisticsWithResponse(null, RequestOptionsHelper.requestOptions(context)) .map(rb -> new SimpleResponse<>(rb, rb.getValue())); } @@ -1086,11 +1099,12 @@ public Mono> getAccountInfoWithResponse() { Mono> getAccountInfoWithResponse(Context context) { throwOnAnonymousAccess(); - return this.azureBlobStorage.getServices().getAccountInfoWithResponseAsync(null, null, context).map(rb -> { - ServicesGetAccountInfoHeaders hd = rb.getDeserializedHeaders(); - return new SimpleResponse<>(rb, - new StorageAccountInfo(hd.getXMsSkuName(), hd.getXMsAccountKind(), hd.isXMsIsHnsEnabled())); - }); + return this.serviceClientInternal.getAccountInfoWithResponse(null, RequestOptionsHelper.requestOptions(context)) + .map(rb -> { + ServicesGetAccountInfoHeaders hd = rb.getDeserializedHeaders(); + return new SimpleResponse<>(rb, + new StorageAccountInfo(hd.getSkuName(), hd.getAccountKind(), hd.isHierarchicalNamespaceEnabled())); + }); } /** @@ -1286,9 +1300,20 @@ Mono> undeleteBlobContainerWithResponse(Undel ? options.getDestinationContainerName() : options.getDeletedContainerName(); context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getContainers() - .restoreWithResponseAsync(finalDestinationContainerName, null, null, options.getDeletedContainerName(), - options.getDeletedContainerVersion(), context) + RequestOptions requestOptions = RequestOptionsHelper.containerRequestOptions(context, + this.azureBlobStorage.getUrl(), finalDestinationContainerName); + if (options.getDeletedContainerName() != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-deleted-container-name"), + options.getDeletedContainerName()); + } + if (options.getDeletedContainerVersion() != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-deleted-container-version"), + options.getDeletedContainerVersion()); + } + + return this.containerClientInternal + .restoreWithResponse(options.getDeletedContainerName(), options.getDeletedContainerVersion(), null, + requestOptions) .map( response -> new SimpleResponse<>(response, getBlobContainerAsyncClient(finalDestinationContainerName))); } 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 7cde79ba08a47..94e9257cc3df8 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 @@ -9,6 +9,10 @@ import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.storage.blob.implementation.models.BlobContainersSegment; +import com.azure.storage.blob.implementation.util.RequestOptionsHelper; +import com.azure.core.http.HttpHeaderName; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.http.rest.Response; @@ -18,15 +22,17 @@ 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.ContainersRestoreHeaders; +import com.azure.storage.blob.implementation.BlobContainerClientInternal; +import com.azure.storage.blob.implementation.BlobServiceClientInternal; 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.ServicesListContainersSegmentHeaders; 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.BuilderHelper; import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.BlobContainerEncryptionScope; import com.azure.storage.blob.models.BlobContainerItem; @@ -37,7 +43,6 @@ 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; @@ -84,6 +89,10 @@ public final class BlobServiceClient { private static final ClientLogger LOGGER = new ClientLogger(BlobServiceClient.class); private final AzureBlobStorageImpl azureBlobStorage; + + private final BlobServiceClientInternal serviceClientInternal; + + private final BlobContainerClientInternal containerClientInternal; private final String accountName; private final BlobServiceVersion serviceVersion; private final CpkInfo customerProvidedKey; // only used to pass down to blob clients @@ -115,10 +124,9 @@ public final class BlobServiceClient { } catch (IllegalArgumentException ex) { throw LOGGER.logExceptionAsError(ex); } - this.azureBlobStorage = new AzureBlobStorageImplBuilder().pipeline(pipeline) - .url(url) - .version(serviceVersion.getVersion()) - .buildClient(); + this.azureBlobStorage = BuilderHelper.createAzureBlobStorage(pipeline, url, serviceVersion); + this.serviceClientInternal = new BlobServiceClientInternal(this.azureBlobStorage.getServices()); + this.containerClientInternal = new BlobContainerClientInternal(this.azureBlobStorage.getContainers()); this.serviceVersion = serviceVersion; this.accountName = accountName; @@ -491,11 +499,14 @@ public PagedIterable listBlobContainers(ListBlobContainersOpt 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(details); - - Callable> operation = () -> this.azureBlobStorage.getServices() - .listBlobContainersSegmentSinglePage(prefix, marker, maxResultsPerPage, include, null, null, Context.NONE); + Callable> operation = () -> { + ResponseBase response + = this.serviceClientInternal.listContainersSegmentWithResponse(prefix, marker, maxResultsPerPage, null, + ModelHelper.toIncludeTypes(details), RequestOptionsHelper.requestOptions(Context.NONE)); + BlobContainersSegment segment = response.getValue(); + return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), + segment.getContainerItems(), segment.getNextMarker(), null); + }; return sendRequest(operation, timeout, BlobStorageException.class); } @@ -559,22 +570,20 @@ 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); + = () -> this.serviceClientInternal.filterBlobsWithResponse(options.getQuery(), null, marker, + options.getMaxResultsPerPage(), null, RequestOptionsHelper.requestOptions(finalContext)); ResponseBase response = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); + FilterBlobSegment segment = response.getValue(); - List value = response.getValue() - .getBlobs() - .stream() - .map(ModelHelper::populateTaggedBlobItem) - .collect(Collectors.toList()); + List value + = segment.getBlobItems().stream().map(ModelHelper::populateTaggedBlobItem).collect(Collectors.toList()); return new PagedResponseBase<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), value, - response.getValue().getNextMarker(), response.getDeserializedHeaders()); + segment.getNextMarker(), null); } /** @@ -626,7 +635,8 @@ public Response getPropertiesWithResponse(Duration timeou Context finalContext = context == null ? Context.NONE : context; throwOnAnonymousAccess(); Callable> operation - = () -> this.azureBlobStorage.getServices().getPropertiesWithResponse(null, null, finalContext); + = () -> this.serviceClientInternal.getPropertiesWithResponse(null, + RequestOptionsHelper.requestOptions(finalContext)); ResponseBase response = StorageImplUtils.sendRequest(operation, timeout, BlobStorageException.class); @@ -787,8 +797,8 @@ 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 = () -> this.serviceClientInternal.setPropertiesWithResponse(finalProperties, + null, RequestOptionsHelper.requestOptions(finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -862,13 +872,14 @@ public Response getUserDelegationKeyWithResponse(BlobGetUserD } Callable> operation - = () -> this.azureBlobStorage.getServices() - .getUserDelegationKeyWithResponse(new KeyInfo() + = () -> this.serviceClientInternal.getUserDelegationKeyWithResponse( + new KeyInfo() .setStart(options.getStartsOn() == null ? "" : Constants.ISO_8601_UTC_DATE_FORMATTER.format(options.getStartsOn())) .setExpiry(Constants.ISO_8601_UTC_DATE_FORMATTER.format(options.getExpiresOn())) - .setDelegatedUserTenantId(options.getDelegatedUserTenantId()), null, null, finalContext); + .setDelegatedUserTenantId(options.getDelegatedUserTenantId()), + null, RequestOptionsHelper.requestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); @@ -921,8 +932,11 @@ public Response getStatisticsWithResponse(Duration timeou throwOnAnonymousAccess(); Context finalContext = context == null ? Context.NONE : context; Callable> operation - = () -> this.azureBlobStorage.getServices().getStatisticsWithResponse(null, null, finalContext); - return sendRequest(operation, timeout, BlobStorageException.class); + = () -> this.serviceClientInternal.getStatisticsWithResponse(null, + RequestOptionsHelper.requestOptions(finalContext)); + ResponseBase response + = sendRequest(operation, timeout, BlobStorageException.class); + return new SimpleResponse<>(response, response.getValue()); } /** @@ -958,13 +972,13 @@ public StorageAccountInfo getAccountInfo() { public Response getAccountInfoWithResponse(Duration timeout, Context context) { throwOnAnonymousAccess(); Context finalContext = context == null ? Context.NONE : context; - Callable> operation - = () -> this.azureBlobStorage.getServices().getAccountInfoWithResponse(null, null, finalContext); + Callable> operation = () -> this.serviceClientInternal + .getAccountInfoWithResponse(null, RequestOptionsHelper.requestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); ServicesGetAccountInfoHeaders hd = response.getDeserializedHeaders(); return new SimpleResponse<>(response, - new StorageAccountInfo(hd.getXMsSkuName(), hd.getXMsAccountKind(), hd.isXMsIsHnsEnabled())); + new StorageAccountInfo(hd.getSkuName(), hd.getAccountKind(), hd.isHierarchicalNamespaceEnabled())); } /** @@ -1148,11 +1162,20 @@ public Response undeleteBlobContainerWithResponse(UndeleteB ? 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); + RequestOptions requestOptions = RequestOptionsHelper.containerRequestOptions(finalContext, + this.azureBlobStorage.getUrl(), finalDestinationContainerName); + if (options.getDeletedContainerName() != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-deleted-container-name"), + options.getDeletedContainerName()); + } + if (options.getDeletedContainerVersion() != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-deleted-container-version"), + options.getDeletedContainerVersion()); + } + Callable> operation + = () -> this.containerClientInternal.restoreWithResponse(options.getDeletedContainerName(), + options.getDeletedContainerVersion(), null, requestOptions); + Response 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/AppendBlobAsyncClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobAsyncClientInternal.java new file mode 100644 index 0000000000000..adec7be050897 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobAsyncClientInternal.java @@ -0,0 +1,1389 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.RequestConditions; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; +import com.azure.core.util.Base64Util; +import com.azure.core.util.BinaryData; +import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.FluxUtil; +import com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockFromUrlHeaders; +import com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockHeaders; +import com.azure.storage.blob.implementation.models.AppendBlobsCreateHeaders; +import com.azure.storage.blob.implementation.models.AppendBlobsSealHeaders; +import com.azure.storage.blob.implementation.models.BlobStorageErrorException; +import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; +import com.azure.storage.blob.models.EncryptionAlgorithmType; +import com.azure.storage.blob.models.FileShareTokenIntent; +import java.time.OffsetDateTime; +import java.util.Map; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous AzureBlobStorage type. + */ +public final class AppendBlobAsyncClientInternal { + @Generated + private final AppendBlobsImpl serviceClient; + + /** + * Initializes an instance of AppendBlobAsyncClientInternal class. + * + * @param serviceClient the service client implementation. + */ + @Generated + public AppendBlobAsyncClientInternal(AppendBlobsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Creates a new append blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-tagsStringNoThe blob tags.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> createWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.createWithResponseInternalAsync(requestOptions); + } + + /** + * Uploads a new block of data to the end of an append blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-condition-maxsizeLongNoThe max length of the blob. If the operation + * would cause the blob to exceed that limit or if the blob size is already greater than the value specified, the + * request will fail with MaxBlobSizeConditionNotMet.
x-ms-blob-condition-appendposLongNoA byte offset where the operation will only + * succeed if the append position is equal. If not, the request will fail with + * AppendPositionConditionNotMet.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-structured-bodyStringNoRequired if the request body is a structured + * message. Specifies the message schema version and properties.
x-ms-structured-content-lengthLongNoRequired if the request body is a + * structured message. Specifies the length of the blob/file content inside the message body. Will always be smaller + * than Content-Length.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-blob-append-offsetStringThe offset at which the block was committed, in + * bytes.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-structured-bodyStringIndicates if the response body contains a structured message + * and specifies the message schema version and properties.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param contentLength The length of the request. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> appendBlockWithResponseInternal(long contentLength, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.appendBlockWithResponseInternalAsync(contentLength, body, requestOptions); + } + + /** + * Uploads a new block of data from the specified URL to the end of an append blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-source-rangeStringNoSpecifies the bytes of the source.
x-ms-source-content-md5byte[]NoSpecifies the MD5 hash calculated for the range + * of bytes that must be read from the copy source.
x-ms-source-content-crc64byte[]NoSpecifies the CRC64 calculated for the range + * of bytes that must be read from the source.
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-condition-maxsizeLongNoThe max length of the blob. If the operation + * would cause the blob to exceed that limit or if the blob size is already greater than the value specified, the + * request will fail with MaxBlobSizeConditionNotMet.
x-ms-blob-condition-appendposLongNoA byte offset where the operation will only + * succeed if the append position is equal. If not, the request will fail with + * AppendPositionConditionNotMet.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is + * supported, and the value must be a valid OAuth access token for the copy source.
x-ms-file-request-intentStringNoSpecifies the file request token intent. + * Allowed values: "backup".
x-ms-source-encryption-keyStringNoSpecifies the encryption key to use to + * decrypt the source data provided in the request.
x-ms-source-encryption-key-sha256StringNoThe SHA-256 hash of the provided + * source encryption key. Must be provided if the source encryption key is provided.
x-ms-source-encryption-algorithmStringNoThe algorithm used to produce the + * source encryption key hash. Must be provided if the source encryption key is provided. Allowed values: + * "AES256".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-blob-append-offsetStringThe offset at which the block was committed, in + * bytes.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param sourceUrl Specifies the URL of the source. + * @param contentLength The length of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> appendBlockFromUrlWithResponseInternal(String sourceUrl, long contentLength, + RequestOptions requestOptions) { + return this.serviceClient.appendBlockFromUrlWithResponseInternalAsync(sourceUrl, contentLength, requestOptions); + } + + /** + * Seals the append blob to make it read-only. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-blob-condition-appendposLongNoA byte offset where the operation will only + * succeed if the append position is equal. If not, the request will fail with + * AppendPositionConditionNotMet.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-blob-sealedbooleanWhether the blob is sealed.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> sealWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.sealWithResponseInternalAsync(requestOptions); + } + + /** + * Creates a new append blob. + * + * @param metadata The metadata headers. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobTagsString The blob tags. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createWithResponse(Map metadata, + Integer timeout, String blobContentType, String blobContentEncoding, String blobContentLanguage, + byte[] blobContentMd5, String blobCacheControl, String leaseId, String blobContentDisposition, + String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + String encryptionScope, String ifTags, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, RequestConditions requestConditions, + RequestOptions requestOptions) { + // Generated convenience method for createWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (blobContentType != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentEncoding != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (blobContentMd5 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (blobCacheControl != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (leaseId != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (encryptionKey != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobTagsString != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (immutabilityPolicyExpiry != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (ifModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return createWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new AppendBlobsCreateHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Creates a new append blob. + * + * @param metadata The metadata headers. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobTagsString The blob tags. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono create(Map metadata, Integer timeout, String blobContentType, + String blobContentEncoding, String blobContentLanguage, byte[] blobContentMd5, String blobCacheControl, + String leaseId, String blobContentDisposition, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String ifTags, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + RequestConditions requestConditions) { + // Generated convenience method for createWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (blobContentType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentEncoding != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (blobContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (blobCacheControl != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobTagsString != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (immutabilityPolicyExpiry != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return createWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Creates a new append blob. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono create() { + // Generated convenience method for createWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return createWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Uploads a new block of data to the end of an append blob. + * + * @param contentLength The length of the request. + * @param body The body 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 transactionalContentMd5 Specifies the transactional MD5 hash for the body. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the body. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize The max length of the blob. If the operation would cause the blob to exceed that limit or if the + * blob size is already greater than the value specified, the request will fail with MaxBlobSizeConditionNotMet. + * @param appendPosition A byte offset where the operation will only succeed if the append position is equal. If + * not, the request will fail with AppendPositionConditionNotMet. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema + * version and properties. + * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the + * blob/file content inside the message body. Will always be smaller than Content-Length. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> appendBlockWithResponse(long contentLength, + BinaryData body, Integer timeout, byte[] transactionalContentMd5, byte[] transactionalContentCrc64, + String leaseId, Long maxSize, Long appendPosition, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String ifTags, String structuredBodyType, + Long structuredContentLength, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for appendBlockWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (transactionalContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (maxSize != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-condition-maxsize"), String.valueOf(maxSize)); + } + if (appendPosition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-condition-appendpos"), + String.valueOf(appendPosition)); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (structuredBodyType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-body"), structuredBodyType); + } + if (structuredContentLength != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-content-length"), + String.valueOf(structuredContentLength)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return appendBlockWithResponseInternal(contentLength, body, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new AppendBlobsAppendBlockHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Uploads a new block of data to the end of an append blob. + * + * @param contentLength The length of the request. + * @param body The body 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 transactionalContentMd5 Specifies the transactional MD5 hash for the body. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the body. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize The max length of the blob. If the operation would cause the blob to exceed that limit or if the + * blob size is already greater than the value specified, the request will fail with MaxBlobSizeConditionNotMet. + * @param appendPosition A byte offset where the operation will only succeed if the append position is equal. If + * not, the request will fail with AppendPositionConditionNotMet. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema + * version and properties. + * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the + * blob/file content inside the message body. Will always be smaller than Content-Length. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono appendBlock(long contentLength, BinaryData body, Integer timeout, byte[] transactionalContentMd5, + byte[] transactionalContentCrc64, String leaseId, Long maxSize, Long appendPosition, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String ifTags, + String structuredBodyType, Long structuredContentLength, RequestConditions requestConditions) { + // Generated convenience method for appendBlockWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (transactionalContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (maxSize != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-condition-maxsize"), String.valueOf(maxSize)); + } + if (appendPosition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-condition-appendpos"), + String.valueOf(appendPosition)); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (structuredBodyType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-body"), structuredBodyType); + } + if (structuredContentLength != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-content-length"), + String.valueOf(structuredContentLength)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return appendBlockWithResponseInternal(contentLength, body, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Uploads a new block of data to the end of an append blob. + * + * @param contentLength The length of the request. + * @param body The body of the request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono appendBlock(long contentLength, BinaryData body) { + // Generated convenience method for appendBlockWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return appendBlockWithResponseInternal(contentLength, body, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Uploads a new block of data from the specified URL to the end of an append blob. + * + * @param sourceUrl Specifies the URL of the source. + * @param contentLength The length of the request. + * @param sourceRange Specifies the bytes of the source. + * @param sourceContentMd5 Specifies the MD5 hash calculated for the range of bytes that must be read from the copy + * source. + * @param sourceContentCrc64 Specifies the CRC64 calculated for the range of bytes that must be read from the + * 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 Specifies the transactional MD5 hash for the body. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize The max length of the blob. If the operation would cause the blob to exceed that limit or if the + * blob size is already greater than the value specified, the request will fail with MaxBlobSizeConditionNotMet. + * @param appendPosition A byte offset where the operation will only succeed if the append position is equal. If + * not, the request will fail with AppendPositionConditionNotMet. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param copySourceAuthorization Only the Bearer authorization scheme is supported, and the value must be a valid + * OAuth access token for the copy source. + * @param fileRequestIntent Specifies the file request token intent. + * @param sourceEncryptionKey Specifies the encryption key to use to decrypt the source data provided in the + * request. + * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the + * source encryption key is provided. + * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Must be provided + * if the source encryption key is provided. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> appendBlockFromUrlWithResponse( + String sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMd5, byte[] sourceContentCrc64, + Integer timeout, byte[] transactionalContentMd5, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String leaseId, Long maxSize, + Long appendPosition, String ifTags, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, + String copySourceAuthorization, FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, + String sourceEncryptionKeySha256, EncryptionAlgorithmType sourceEncryptionAlgorithm, + RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for appendBlockFromUrlWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (sourceRange != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-range"), sourceRange); + } + if (sourceContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-md5"), + Base64Util.encodeToString(sourceContentMd5)); + } + if (sourceContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-crc64"), + Base64Util.encodeToString(sourceContentCrc64)); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (maxSize != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-condition-maxsize"), String.valueOf(maxSize)); + } + if (appendPosition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-condition-appendpos"), + String.valueOf(appendPosition)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (sourceIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (copySourceAuthorization != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-authorization"), + copySourceAuthorization); + } + if (fileRequestIntent != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-file-request-intent"), + fileRequestIntent.toString()); + } + if (sourceEncryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key"), sourceEncryptionKey); + } + if (sourceEncryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key-sha256"), + sourceEncryptionKeySha256); + } + if (sourceEncryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-algorithm"), + sourceEncryptionAlgorithm.toString()); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return appendBlockFromUrlWithResponseInternal(sourceUrl, contentLength, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new AppendBlobsAppendBlockFromUrlHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Uploads a new block of data from the specified URL to the end of an append blob. + * + * @param sourceUrl Specifies the URL of the source. + * @param contentLength The length of the request. + * @param sourceRange Specifies the bytes of the source. + * @param sourceContentMd5 Specifies the MD5 hash calculated for the range of bytes that must be read from the copy + * source. + * @param sourceContentCrc64 Specifies the CRC64 calculated for the range of bytes that must be read from the + * 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 Specifies the transactional MD5 hash for the body. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize The max length of the blob. If the operation would cause the blob to exceed that limit or if the + * blob size is already greater than the value specified, the request will fail with MaxBlobSizeConditionNotMet. + * @param appendPosition A byte offset where the operation will only succeed if the append position is equal. If + * not, the request will fail with AppendPositionConditionNotMet. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param copySourceAuthorization Only the Bearer authorization scheme is supported, and the value must be a valid + * OAuth access token for the copy source. + * @param fileRequestIntent Specifies the file request token intent. + * @param sourceEncryptionKey Specifies the encryption key to use to decrypt the source data provided in the + * request. + * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the + * source encryption key is provided. + * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Must be provided + * if the source encryption key is provided. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono appendBlockFromUrl(String sourceUrl, long contentLength, String sourceRange, + byte[] sourceContentMd5, byte[] sourceContentCrc64, Integer timeout, byte[] transactionalContentMd5, + String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + String encryptionScope, String leaseId, Long maxSize, Long appendPosition, String ifTags, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String copySourceAuthorization, FileShareTokenIntent fileRequestIntent, + String sourceEncryptionKey, String sourceEncryptionKeySha256, EncryptionAlgorithmType sourceEncryptionAlgorithm, + RequestConditions requestConditions) { + // Generated convenience method for appendBlockFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (sourceRange != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-range"), sourceRange); + } + if (sourceContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-md5"), + Base64Util.encodeToString(sourceContentMd5)); + } + if (sourceContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-crc64"), + Base64Util.encodeToString(sourceContentCrc64)); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (maxSize != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-condition-maxsize"), String.valueOf(maxSize)); + } + if (appendPosition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-condition-appendpos"), + String.valueOf(appendPosition)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (sourceIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (copySourceAuthorization != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-authorization"), + copySourceAuthorization); + } + if (fileRequestIntent != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-file-request-intent"), + fileRequestIntent.toString()); + } + if (sourceEncryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key"), sourceEncryptionKey); + } + if (sourceEncryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key-sha256"), + sourceEncryptionKeySha256); + } + if (sourceEncryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-algorithm"), + sourceEncryptionAlgorithm.toString()); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return appendBlockFromUrlWithResponseInternal(sourceUrl, contentLength, requestOptions) + .flatMap(FluxUtil::toMono); + } + + /** + * Uploads a new block of data from the specified URL to the end of an append blob. + * + * @param sourceUrl Specifies the URL of the source. + * @param contentLength The length of the request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono appendBlockFromUrl(String sourceUrl, long contentLength) { + // Generated convenience method for appendBlockFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return appendBlockFromUrlWithResponseInternal(sourceUrl, contentLength, requestOptions) + .flatMap(FluxUtil::toMono); + } + + /** + * Seals the append blob to make it read-only. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 appendPosition A byte offset where the operation will only succeed if the append position is equal. If + * not, the request will fail with AppendPositionConditionNotMet. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> sealWithResponse(Integer timeout, String leaseId, + Long appendPosition, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for sealWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (appendPosition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-condition-appendpos"), + String.valueOf(appendPosition)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return sealWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new AppendBlobsSealHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Seals the append blob to make it read-only. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 appendPosition A byte offset where the operation will only succeed if the append position is equal. If + * not, the request will fail with AppendPositionConditionNotMet. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono seal(Integer timeout, String leaseId, Long appendPosition, RequestConditions requestConditions) { + // Generated convenience method for sealWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (appendPosition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-condition-appendpos"), + String.valueOf(appendPosition)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return sealWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Seals the append blob to make it read-only. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono seal() { + // Generated convenience method for sealWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return sealWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobClientInternal.java new file mode 100644 index 0000000000000..cdae35191b29d --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobClientInternal.java @@ -0,0 +1,1376 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.RequestConditions; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; +import com.azure.core.util.Base64Util; +import com.azure.core.util.BinaryData; +import com.azure.core.util.DateTimeRfc1123; +import com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockFromUrlHeaders; +import com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockHeaders; +import com.azure.storage.blob.implementation.models.AppendBlobsCreateHeaders; +import com.azure.storage.blob.implementation.models.AppendBlobsSealHeaders; +import com.azure.storage.blob.implementation.models.BlobStorageErrorException; +import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; +import com.azure.storage.blob.models.EncryptionAlgorithmType; +import com.azure.storage.blob.models.FileShareTokenIntent; +import java.time.OffsetDateTime; +import java.util.Map; + +/** + * Initializes a new instance of the synchronous AzureBlobStorage type. + */ +public final class AppendBlobClientInternal { + @Generated + private final AppendBlobsImpl serviceClient; + + /** + * Initializes an instance of AppendBlobClientInternal class. + * + * @param serviceClient the service client implementation. + */ + @Generated + public AppendBlobClientInternal(AppendBlobsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Creates a new append blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-tagsStringNoThe blob tags.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response createWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.createWithResponseInternal(requestOptions); + } + + /** + * Uploads a new block of data to the end of an append blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-condition-maxsizeLongNoThe max length of the blob. If the operation + * would cause the blob to exceed that limit or if the blob size is already greater than the value specified, the + * request will fail with MaxBlobSizeConditionNotMet.
x-ms-blob-condition-appendposLongNoA byte offset where the operation will only + * succeed if the append position is equal. If not, the request will fail with + * AppendPositionConditionNotMet.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-structured-bodyStringNoRequired if the request body is a structured + * message. Specifies the message schema version and properties.
x-ms-structured-content-lengthLongNoRequired if the request body is a + * structured message. Specifies the length of the blob/file content inside the message body. Will always be smaller + * than Content-Length.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-blob-append-offsetStringThe offset at which the block was committed, in + * bytes.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-structured-bodyStringIndicates if the response body contains a structured message + * and specifies the message schema version and properties.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param contentLength The length of the request. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response appendBlockWithResponseInternal(long contentLength, BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.appendBlockWithResponseInternal(contentLength, body, requestOptions); + } + + /** + * Uploads a new block of data from the specified URL to the end of an append blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-source-rangeStringNoSpecifies the bytes of the source.
x-ms-source-content-md5byte[]NoSpecifies the MD5 hash calculated for the range + * of bytes that must be read from the copy source.
x-ms-source-content-crc64byte[]NoSpecifies the CRC64 calculated for the range + * of bytes that must be read from the source.
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-condition-maxsizeLongNoThe max length of the blob. If the operation + * would cause the blob to exceed that limit or if the blob size is already greater than the value specified, the + * request will fail with MaxBlobSizeConditionNotMet.
x-ms-blob-condition-appendposLongNoA byte offset where the operation will only + * succeed if the append position is equal. If not, the request will fail with + * AppendPositionConditionNotMet.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is + * supported, and the value must be a valid OAuth access token for the copy source.
x-ms-file-request-intentStringNoSpecifies the file request token intent. + * Allowed values: "backup".
x-ms-source-encryption-keyStringNoSpecifies the encryption key to use to + * decrypt the source data provided in the request.
x-ms-source-encryption-key-sha256StringNoThe SHA-256 hash of the provided + * source encryption key. Must be provided if the source encryption key is provided.
x-ms-source-encryption-algorithmStringNoThe algorithm used to produce the + * source encryption key hash. Must be provided if the source encryption key is provided. Allowed values: + * "AES256".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-blob-append-offsetStringThe offset at which the block was committed, in + * bytes.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param sourceUrl Specifies the URL of the source. + * @param contentLength The length of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response appendBlockFromUrlWithResponseInternal(String sourceUrl, long contentLength, + RequestOptions requestOptions) { + return this.serviceClient.appendBlockFromUrlWithResponseInternal(sourceUrl, contentLength, requestOptions); + } + + /** + * Seals the append blob to make it read-only. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-blob-condition-appendposLongNoA byte offset where the operation will only + * succeed if the append position is equal. If not, the request will fail with + * AppendPositionConditionNotMet.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-blob-sealedbooleanWhether the blob is sealed.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response sealWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.sealWithResponseInternal(requestOptions); + } + + /** + * Creates a new append blob. + * + * @param metadata The metadata headers. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobTagsString The blob tags. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase createWithResponse(Map metadata, + Integer timeout, String blobContentType, String blobContentEncoding, String blobContentLanguage, + byte[] blobContentMd5, String blobCacheControl, String leaseId, String blobContentDisposition, + String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + String encryptionScope, String ifTags, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, RequestConditions requestConditions, + RequestOptions requestOptions) { + // Generated convenience method for createWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (blobContentType != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentEncoding != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (blobContentMd5 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (blobCacheControl != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (leaseId != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (encryptionKey != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobTagsString != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (immutabilityPolicyExpiry != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (ifModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = createWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new AppendBlobsCreateHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Creates a new append blob. + * + * @param metadata The metadata headers. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobTagsString The blob tags. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void create(Map metadata, Integer timeout, String blobContentType, + String blobContentEncoding, String blobContentLanguage, byte[] blobContentMd5, String blobCacheControl, + String leaseId, String blobContentDisposition, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String ifTags, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + RequestConditions requestConditions) { + // Generated convenience method for createWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (blobContentType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentEncoding != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (blobContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (blobCacheControl != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobTagsString != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (immutabilityPolicyExpiry != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + createWithResponseInternal(requestOptions).getValue(); + } + + /** + * Creates a new append blob. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void create() { + // Generated convenience method for createWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + createWithResponseInternal(requestOptions).getValue(); + } + + /** + * Uploads a new block of data to the end of an append blob. + * + * @param contentLength The length of the request. + * @param body The body 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 transactionalContentMd5 Specifies the transactional MD5 hash for the body. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the body. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize The max length of the blob. If the operation would cause the blob to exceed that limit or if the + * blob size is already greater than the value specified, the request will fail with MaxBlobSizeConditionNotMet. + * @param appendPosition A byte offset where the operation will only succeed if the append position is equal. If + * not, the request will fail with AppendPositionConditionNotMet. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema + * version and properties. + * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the + * blob/file content inside the message body. Will always be smaller than Content-Length. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase appendBlockWithResponse(long contentLength, + BinaryData body, Integer timeout, byte[] transactionalContentMd5, byte[] transactionalContentCrc64, + String leaseId, Long maxSize, Long appendPosition, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String ifTags, String structuredBodyType, + Long structuredContentLength, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for appendBlockWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (transactionalContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (maxSize != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-condition-maxsize"), String.valueOf(maxSize)); + } + if (appendPosition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-condition-appendpos"), + String.valueOf(appendPosition)); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (structuredBodyType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-body"), structuredBodyType); + } + if (structuredContentLength != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-content-length"), + String.valueOf(structuredContentLength)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = appendBlockWithResponseInternal(contentLength, body, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new AppendBlobsAppendBlockHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Uploads a new block of data to the end of an append blob. + * + * @param contentLength The length of the request. + * @param body The body 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 transactionalContentMd5 Specifies the transactional MD5 hash for the body. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the body. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize The max length of the blob. If the operation would cause the blob to exceed that limit or if the + * blob size is already greater than the value specified, the request will fail with MaxBlobSizeConditionNotMet. + * @param appendPosition A byte offset where the operation will only succeed if the append position is equal. If + * not, the request will fail with AppendPositionConditionNotMet. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema + * version and properties. + * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the + * blob/file content inside the message body. Will always be smaller than Content-Length. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void appendBlock(long contentLength, BinaryData body, Integer timeout, byte[] transactionalContentMd5, + byte[] transactionalContentCrc64, String leaseId, Long maxSize, Long appendPosition, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String ifTags, + String structuredBodyType, Long structuredContentLength, RequestConditions requestConditions) { + // Generated convenience method for appendBlockWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (transactionalContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (maxSize != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-condition-maxsize"), String.valueOf(maxSize)); + } + if (appendPosition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-condition-appendpos"), + String.valueOf(appendPosition)); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (structuredBodyType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-body"), structuredBodyType); + } + if (structuredContentLength != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-content-length"), + String.valueOf(structuredContentLength)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + appendBlockWithResponseInternal(contentLength, body, requestOptions).getValue(); + } + + /** + * Uploads a new block of data to the end of an append blob. + * + * @param contentLength The length of the request. + * @param body The body of the request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void appendBlock(long contentLength, BinaryData body) { + // Generated convenience method for appendBlockWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + appendBlockWithResponseInternal(contentLength, body, requestOptions).getValue(); + } + + /** + * Uploads a new block of data from the specified URL to the end of an append blob. + * + * @param sourceUrl Specifies the URL of the source. + * @param contentLength The length of the request. + * @param sourceRange Specifies the bytes of the source. + * @param sourceContentMd5 Specifies the MD5 hash calculated for the range of bytes that must be read from the copy + * source. + * @param sourceContentCrc64 Specifies the CRC64 calculated for the range of bytes that must be read from the + * 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 Specifies the transactional MD5 hash for the body. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize The max length of the blob. If the operation would cause the blob to exceed that limit or if the + * blob size is already greater than the value specified, the request will fail with MaxBlobSizeConditionNotMet. + * @param appendPosition A byte offset where the operation will only succeed if the append position is equal. If + * not, the request will fail with AppendPositionConditionNotMet. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param copySourceAuthorization Only the Bearer authorization scheme is supported, and the value must be a valid + * OAuth access token for the copy source. + * @param fileRequestIntent Specifies the file request token intent. + * @param sourceEncryptionKey Specifies the encryption key to use to decrypt the source data provided in the + * request. + * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the + * source encryption key is provided. + * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Must be provided + * if the source encryption key is provided. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase appendBlockFromUrlWithResponse(String sourceUrl, + long contentLength, String sourceRange, byte[] sourceContentMd5, byte[] sourceContentCrc64, Integer timeout, + byte[] transactionalContentMd5, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String leaseId, Long maxSize, + Long appendPosition, String ifTags, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, + String copySourceAuthorization, FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, + String sourceEncryptionKeySha256, EncryptionAlgorithmType sourceEncryptionAlgorithm, + RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for appendBlockFromUrlWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (sourceRange != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-range"), sourceRange); + } + if (sourceContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-md5"), + Base64Util.encodeToString(sourceContentMd5)); + } + if (sourceContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-crc64"), + Base64Util.encodeToString(sourceContentCrc64)); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (maxSize != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-condition-maxsize"), String.valueOf(maxSize)); + } + if (appendPosition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-condition-appendpos"), + String.valueOf(appendPosition)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (sourceIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (copySourceAuthorization != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-authorization"), + copySourceAuthorization); + } + if (fileRequestIntent != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-file-request-intent"), + fileRequestIntent.toString()); + } + if (sourceEncryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key"), sourceEncryptionKey); + } + if (sourceEncryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key-sha256"), + sourceEncryptionKeySha256); + } + if (sourceEncryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-algorithm"), + sourceEncryptionAlgorithm.toString()); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse + = appendBlockFromUrlWithResponseInternal(sourceUrl, contentLength, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new AppendBlobsAppendBlockFromUrlHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Uploads a new block of data from the specified URL to the end of an append blob. + * + * @param sourceUrl Specifies the URL of the source. + * @param contentLength The length of the request. + * @param sourceRange Specifies the bytes of the source. + * @param sourceContentMd5 Specifies the MD5 hash calculated for the range of bytes that must be read from the copy + * source. + * @param sourceContentCrc64 Specifies the CRC64 calculated for the range of bytes that must be read from the + * 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 Specifies the transactional MD5 hash for the body. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param maxSize The max length of the blob. If the operation would cause the blob to exceed that limit or if the + * blob size is already greater than the value specified, the request will fail with MaxBlobSizeConditionNotMet. + * @param appendPosition A byte offset where the operation will only succeed if the append position is equal. If + * not, the request will fail with AppendPositionConditionNotMet. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param copySourceAuthorization Only the Bearer authorization scheme is supported, and the value must be a valid + * OAuth access token for the copy source. + * @param fileRequestIntent Specifies the file request token intent. + * @param sourceEncryptionKey Specifies the encryption key to use to decrypt the source data provided in the + * request. + * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the + * source encryption key is provided. + * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Must be provided + * if the source encryption key is provided. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void appendBlockFromUrl(String sourceUrl, long contentLength, String sourceRange, byte[] sourceContentMd5, + byte[] sourceContentCrc64, Integer timeout, byte[] transactionalContentMd5, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String leaseId, + Long maxSize, Long appendPosition, String ifTags, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, + String copySourceAuthorization, FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, + String sourceEncryptionKeySha256, EncryptionAlgorithmType sourceEncryptionAlgorithm, + RequestConditions requestConditions) { + // Generated convenience method for appendBlockFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (sourceRange != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-range"), sourceRange); + } + if (sourceContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-md5"), + Base64Util.encodeToString(sourceContentMd5)); + } + if (sourceContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-crc64"), + Base64Util.encodeToString(sourceContentCrc64)); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (maxSize != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-condition-maxsize"), String.valueOf(maxSize)); + } + if (appendPosition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-condition-appendpos"), + String.valueOf(appendPosition)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (sourceIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (copySourceAuthorization != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-authorization"), + copySourceAuthorization); + } + if (fileRequestIntent != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-file-request-intent"), + fileRequestIntent.toString()); + } + if (sourceEncryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key"), sourceEncryptionKey); + } + if (sourceEncryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key-sha256"), + sourceEncryptionKeySha256); + } + if (sourceEncryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-algorithm"), + sourceEncryptionAlgorithm.toString()); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + appendBlockFromUrlWithResponseInternal(sourceUrl, contentLength, requestOptions).getValue(); + } + + /** + * Uploads a new block of data from the specified URL to the end of an append blob. + * + * @param sourceUrl Specifies the URL of the source. + * @param contentLength The length of the request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void appendBlockFromUrl(String sourceUrl, long contentLength) { + // Generated convenience method for appendBlockFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + appendBlockFromUrlWithResponseInternal(sourceUrl, contentLength, requestOptions).getValue(); + } + + /** + * Seals the append blob to make it read-only. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 appendPosition A byte offset where the operation will only succeed if the append position is equal. If + * not, the request will fail with AppendPositionConditionNotMet. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase sealWithResponse(Integer timeout, String leaseId, + Long appendPosition, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for sealWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (appendPosition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-condition-appendpos"), + String.valueOf(appendPosition)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = sealWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, new AppendBlobsSealHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Seals the append blob to make it read-only. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 appendPosition A byte offset where the operation will only succeed if the append position is equal. If + * not, the request will fail with AppendPositionConditionNotMet. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void seal(Integer timeout, String leaseId, Long appendPosition, RequestConditions requestConditions) { + // Generated convenience method for sealWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (appendPosition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-condition-appendpos"), + String.valueOf(appendPosition)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + sealWithResponseInternal(requestOptions).getValue(); + } + + /** + * Seals the append blob to make it read-only. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void seal() { + // Generated convenience method for sealWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + sealWithResponseInternal(requestOptions).getValue(); + } +} 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 23677eb810568..5c6438472086b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation; import com.azure.core.annotation.BodyParam; @@ -8,37 +8,20 @@ import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.ResponseBase; import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Base64Util; import com.azure.core.util.BinaryData; 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.AppendBlobsAppendBlockFromUrlHeaders; -import com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockHeaders; -import com.azure.storage.blob.implementation.models.AppendBlobsCreateHeaders; -import com.azure.storage.blob.implementation.models.AppendBlobsSealHeaders; -import com.azure.storage.blob.implementation.models.BlobStorageExceptionInternal; -import com.azure.storage.blob.implementation.models.EncryptionScope; +import com.azure.storage.blob.BlobServiceVersion; +import com.azure.storage.blob.implementation.models.BlobStorageErrorException; import com.azure.storage.blob.implementation.util.ModelHelper; -import com.azure.storage.blob.models.BlobHttpHeaders; -import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; -import com.azure.storage.blob.models.CpkInfo; -import com.azure.storage.blob.models.EncryptionAlgorithmType; -import com.azure.storage.blob.models.FileShareTokenIntent; -import java.nio.ByteBuffer; -import java.time.OffsetDateTime; -import java.util.Map; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -67,6 +50,19 @@ public final class AppendBlobsImpl { this.client = client; } + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public BlobServiceVersion getServiceVersion() { + try { + return client.getServiceVersion(); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } + } + /** * The interface defining all the services for AzureBlobStorageAppendBlobs to be used by the proxy service to * perform REST calls. @@ -75,3403 +71,822 @@ public final class AppendBlobsImpl { @ServiceInterface(name = "AzureBlobStorageAppendBlobs") public interface AppendBlobsService { - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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}") + @Put("/") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> create(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Length") int contentLength, @HeaderParam("x-ms-blob-type") String blobType, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("/") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response createSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Length") int contentLength, @HeaderParam("x-ms-blob-type") String blobType, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=appendblock") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") Flux body, @HeaderParam("Accept") String accept, - Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> appendBlock(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Content-Length") long contentLength, + @BodyParam("application/octet-stream") BinaryData body, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=appendblock") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") Flux body, @HeaderParam("Accept") String accept, - Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response appendBlockSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Content-Length") long contentLength, + @BodyParam("application/octet-stream") BinaryData body, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=appendblock") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, - Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> appendBlockFromUrl(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("x-ms-copy-source") String sourceUrl, + @HeaderParam("Content-Length") long contentLength, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=appendblock") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, - Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response appendBlockFromUrlSync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("x-ms-copy-source") String sourceUrl, + @HeaderParam("Content-Length") long contentLength, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, - Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, - Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-file-request-intent") FileShareTokenIntent fileRequestIntent, - @HeaderParam("x-ms-source-encryption-key") String sourceEncryptionKey, - @HeaderParam("x-ms-source-encryption-key-sha256") String sourceEncryptionKeySha256, - @HeaderParam("x-ms-source-encryption-algorithm") EncryptionAlgorithmType sourceEncryptionAlgorithm, - @HeaderParam("Accept") String accept, Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-file-request-intent") FileShareTokenIntent fileRequestIntent, - @HeaderParam("x-ms-source-encryption-key") String sourceEncryptionKey, - @HeaderParam("x-ms-source-encryption-key-sha256") String sourceEncryptionKeySha256, - @HeaderParam("x-ms-source-encryption-algorithm") EncryptionAlgorithmType sourceEncryptionAlgorithm, - @HeaderParam("Accept") String accept, Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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("x-ms-file-request-intent") FileShareTokenIntent fileRequestIntent, - @HeaderParam("x-ms-source-encryption-key") String sourceEncryptionKey, - @HeaderParam("x-ms-source-encryption-key-sha256") String sourceEncryptionKeySha256, - @HeaderParam("x-ms-source-encryption-algorithm") EncryptionAlgorithmType sourceEncryptionAlgorithm, - @HeaderParam("Accept") String accept, Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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("x-ms-file-request-intent") FileShareTokenIntent fileRequestIntent, - @HeaderParam("x-ms-source-encryption-key") String sourceEncryptionKey, - @HeaderParam("x-ms-source-encryption-key-sha256") String sourceEncryptionKeySha256, - @HeaderParam("x-ms-source-encryption-algorithm") EncryptionAlgorithmType sourceEncryptionAlgorithm, - @HeaderParam("Accept") String accept, Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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}") + @Put("?comp=seal") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> seal(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=seal") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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) { - return FluxUtil - .withContext(context -> createWithResponseAsync(containerName, blob, contentLength, timeout, metadata, - leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, - immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, - encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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; - 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.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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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) { - return FluxUtil - .withContext(context -> createNoCustomHeadersWithResponseAsync(containerName, blob, contentLength, timeout, - metadata, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, - blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, - encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response sealSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); + } + + /** + * Creates a new append blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-tagsStringNoThe blob tags.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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> createWithResponseInternalAsync(RequestOptions requestOptions) { + final int contentLength = 0; 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + return FluxUtil + .withContext(context -> service.create(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + contentLength, blobType, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Creates a new append blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-tagsStringNoThe blob tags.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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) { + public Response createWithResponseInternal(RequestOptions requestOptions) { try { + final int contentLength = 0; 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.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) { + return service.createSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), contentLength, + blobType, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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. - * @param body Initial data. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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> 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, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return FluxUtil - .withContext(context -> appendBlockWithResponseAsync(containerName, blob, contentLength, body, timeout, - transactionalContentMD5, transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, - cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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> 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, String structuredBodyType, Long structuredContentLength, 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 - .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, - structuredBodyType, structuredContentLength, body, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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 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, String structuredBodyType, Long structuredContentLength, - CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { - return appendBlockWithResponseAsync(containerName, blob, contentLength, body, timeout, transactionalContentMD5, - transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, cpkInfo, encryptionScopeParam) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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 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, String structuredBodyType, Long structuredContentLength, - CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { - return appendBlockWithResponseAsync(containerName, blob, contentLength, body, timeout, transactionalContentMD5, - transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, cpkInfo, encryptionScopeParam, - context).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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> 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, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return FluxUtil - .withContext(context -> appendBlockNoCustomHeadersWithResponseAsync(containerName, blob, contentLength, - body, timeout, transactionalContentMD5, transactionalContentCrc64, leaseId, maxSize, appendPosition, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, - structuredContentLength, cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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> 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, String structuredBodyType, Long structuredContentLength, 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 - .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, - structuredBodyType, structuredContentLength, body, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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> 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, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return FluxUtil - .withContext(context -> appendBlockWithResponseAsync(containerName, blob, contentLength, body, timeout, - transactionalContentMD5, transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, - cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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> 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, String structuredBodyType, Long structuredContentLength, 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 - .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, - structuredBodyType, structuredContentLength, body, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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 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, String structuredBodyType, Long structuredContentLength, - CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { - return appendBlockWithResponseAsync(containerName, blob, contentLength, body, timeout, transactionalContentMD5, - transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, cpkInfo, encryptionScopeParam) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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 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, String structuredBodyType, Long structuredContentLength, - CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { - return appendBlockWithResponseAsync(containerName, blob, contentLength, body, timeout, transactionalContentMD5, - transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, cpkInfo, encryptionScopeParam, - context).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Uploads a new block of data to the end of an append blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-condition-maxsizeLongNoThe max length of the blob. If the operation + * would cause the blob to exceed that limit or if the blob size is already greater than the value specified, the + * request will fail with MaxBlobSizeConditionNotMet.
x-ms-blob-condition-appendposLongNoA byte offset where the operation will only + * succeed if the append position is equal. If not, the request will fail with + * AppendPositionConditionNotMet.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-structured-bodyStringNoRequired if the request body is a structured + * message. Specifies the message schema version and properties.
x-ms-structured-content-lengthLongNoRequired if the request body is a + * structured message. Specifies the length of the blob/file content inside the message body. Will always be smaller + * than Content-Length.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-blob-append-offsetStringThe offset at which the block was committed, in + * bytes.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-structured-bodyStringIndicates if the response body contains a structured message + * and specifies the message schema version and properties.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param contentLength The length of the request. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> appendBlockWithResponseInternalAsync(long contentLength, BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/octet-stream"; return FluxUtil - .withContext(context -> appendBlockNoCustomHeadersWithResponseAsync(containerName, blob, contentLength, - body, timeout, transactionalContentMD5, transactionalContentCrc64, leaseId, maxSize, appendPosition, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, - structuredContentLength, cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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> 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, String structuredBodyType, Long structuredContentLength, 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 - .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, - structuredBodyType, structuredContentLength, body, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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 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, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, Context context) { - try { - 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.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, - structuredBodyType, structuredContentLength, 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. - * @param body Initial data. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, String structuredBodyType, Long structuredContentLength, - CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { - appendBlockWithResponse(containerName, blob, contentLength, body, timeout, transactionalContentMD5, - transactionalContentCrc64, leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + .withContext( + context -> service.appendBlock(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + contentType, contentLength, body, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Uploads a new block of data to the end of an append blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-condition-maxsizeLongNoThe max length of the blob. If the operation + * would cause the blob to exceed that limit or if the blob size is already greater than the value specified, the + * request will fail with MaxBlobSizeConditionNotMet.
x-ms-blob-condition-appendposLongNoA byte offset where the operation will only + * succeed if the append position is equal. If not, the request will fail with + * AppendPositionConditionNotMet.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-structured-bodyStringNoRequired if the request body is a structured + * message. Specifies the message schema version and properties.
x-ms-structured-content-lengthLongNoRequired if the request body is a + * structured message. Specifies the length of the blob/file content inside the message body. Will always be smaller + * than Content-Length.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-blob-append-offsetStringThe offset at which the block was committed, in + * bytes.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-structured-bodyStringIndicates if the response body contains a structured message + * and specifies the message schema version and properties.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param contentLength The length of the request. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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, - String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, - Context context) { + public Response appendBlockWithResponseInternal(long contentLength, BinaryData body, + RequestOptions requestOptions) { try { - 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, structuredBodyType, structuredContentLength, body, accept, - context); - } catch (BlobStorageExceptionInternal internalException) { + final String contentType = "application/octet-stream"; + return service.appendBlockSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + contentType, contentLength, body, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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. - * @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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { - return FluxUtil - .withContext(context -> appendBlockFromUrlWithResponseAsync(containerName, blob, sourceUrl, contentLength, - sourceRange, sourceContentMD5, sourceContentcrc64, timeout, transactionalContentMD5, leaseId, maxSize, - appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, - sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, - fileRequestIntent, sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, cpkInfo, - encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @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 BlobStorageExceptionInternal 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, 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.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, fileRequestIntent, - sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, 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, - fileRequestIntent, sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, cpkInfo, - encryptionScopeParam).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @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 BlobStorageExceptionInternal 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 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, 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, - fileRequestIntent, sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, cpkInfo, - encryptionScopeParam, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Uploads a new block of data from the specified URL to the end of an append blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-source-rangeStringNoSpecifies the bytes of the source.
x-ms-source-content-md5byte[]NoSpecifies the MD5 hash calculated for the range + * of bytes that must be read from the copy source.
x-ms-source-content-crc64byte[]NoSpecifies the CRC64 calculated for the range + * of bytes that must be read from the source.
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-condition-maxsizeLongNoThe max length of the blob. If the operation + * would cause the blob to exceed that limit or if the blob size is already greater than the value specified, the + * request will fail with MaxBlobSizeConditionNotMet.
x-ms-blob-condition-appendposLongNoA byte offset where the operation will only + * succeed if the append position is equal. If not, the request will fail with + * AppendPositionConditionNotMet.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is + * supported, and the value must be a valid OAuth access token for the copy source.
x-ms-file-request-intentStringNoSpecifies the file request token intent. + * Allowed values: "backup".
x-ms-source-encryption-keyStringNoSpecifies the encryption key to use to + * decrypt the source data provided in the request.
x-ms-source-encryption-key-sha256StringNoThe SHA-256 hash of the provided + * source encryption key. Must be provided if the source encryption key is provided.
x-ms-source-encryption-algorithmStringNoThe algorithm used to produce the + * source encryption key hash. Must be provided if the source encryption key is provided. Allowed values: + * "AES256".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-blob-append-offsetStringThe offset at which the block was committed, in + * bytes.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param sourceUrl Specifies the URL of the source. + * @param contentLength The length of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { + public Mono> appendBlockFromUrlWithResponseInternalAsync(String sourceUrl, long contentLength, + RequestOptions requestOptions) { return FluxUtil - .withContext(context -> appendBlockFromUrlNoCustomHeadersWithResponseAsync(containerName, blob, sourceUrl, - contentLength, sourceRange, sourceContentMD5, sourceContentcrc64, timeout, transactionalContentMD5, - leaseId, maxSize, appendPosition, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, - sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, - copySourceAuthorization, fileRequestIntent, sourceEncryptionKey, sourceEncryptionKeySha256, - sourceEncryptionAlgorithm, cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @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 BlobStorageExceptionInternal 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> 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, 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.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, fileRequestIntent, - sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @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 BlobStorageExceptionInternal 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, - Context context) { - try { - 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, - fileRequestIntent, sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, 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. - * @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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, 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, fileRequestIntent, - sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + .withContext(context -> service.appendBlockFromUrl(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), sourceUrl, contentLength, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Uploads a new block of data from the specified URL to the end of an append blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-source-rangeStringNoSpecifies the bytes of the source.
x-ms-source-content-md5byte[]NoSpecifies the MD5 hash calculated for the range + * of bytes that must be read from the copy source.
x-ms-source-content-crc64byte[]NoSpecifies the CRC64 calculated for the range + * of bytes that must be read from the source.
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-condition-maxsizeLongNoThe max length of the blob. If the operation + * would cause the blob to exceed that limit or if the blob size is already greater than the value specified, the + * request will fail with MaxBlobSizeConditionNotMet.
x-ms-blob-condition-appendposLongNoA byte offset where the operation will only + * succeed if the append position is equal. If not, the request will fail with + * AppendPositionConditionNotMet.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is + * supported, and the value must be a valid OAuth access token for the copy source.
x-ms-file-request-intentStringNoSpecifies the file request token intent. + * Allowed values: "backup".
x-ms-source-encryption-keyStringNoSpecifies the encryption key to use to + * decrypt the source data provided in the request.
x-ms-source-encryption-key-sha256StringNoThe SHA-256 hash of the provided + * source encryption key. Must be provided if the source encryption key is provided.
x-ms-source-encryption-algorithmStringNoThe algorithm used to produce the + * source encryption key hash. Must be provided if the source encryption key is provided. Allowed values: + * "AES256".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-blob-append-offsetStringThe offset at which the block was committed, in + * bytes.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param sourceUrl Specifies the URL of the source. + * @param contentLength The length of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, - Context context) { + public Response appendBlockFromUrlWithResponseInternal(String sourceUrl, long contentLength, + RequestOptions requestOptions) { try { - 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, - fileRequestIntent, sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, accept, - context); - } catch (BlobStorageExceptionInternal internalException) { + return service.appendBlockFromUrlSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + sourceUrl, contentLength, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> sealWithResponseAsync(containerName, blob, timeout, requestId, leaseId, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, appendPosition, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Context context) { - return sealWithResponseAsync(containerName, blob, timeout, requestId, leaseId, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, appendPosition, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Seals the append blob to make it read-only. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-blob-condition-appendposLongNoA byte offset where the operation will only + * succeed if the append position is equal. If not, the request will fail with + * AppendPositionConditionNotMet.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-blob-sealedbooleanWhether the blob is sealed.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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> sealWithResponseInternalAsync(RequestOptions requestOptions) { return FluxUtil - .withContext(context -> sealNoCustomHeadersWithResponseAsync(containerName, blob, timeout, requestId, - leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, appendPosition, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + .withContext(context -> service.seal(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Seals the append blob to make it read-only. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-blob-condition-appendposLongNoA byte offset where the operation will only + * succeed if the append position is equal. If not, the request will fail with + * AppendPositionConditionNotMet.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-blob-sealedbooleanWhether the blob is sealed.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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) { + public Response sealWithResponseInternal(RequestOptions requestOptions) { try { - 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.sealNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, - ifMatch, ifNoneMatch, appendPosition, accept, context); - } catch (BlobStorageExceptionInternal internalException) { + return service.sealSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), requestOptions, + Context.NONE); + } catch (BlobStorageErrorException internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } } 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 86d148d2e1917..347f220539cff 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation; @@ -10,18 +10,19 @@ import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.storage.blob.BlobServiceVersion; /** * 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 host name of the blob storage account, e.g. accountName.blob.core.windows.net. */ private final String url; /** - * Gets The URL of the service account, container, or blob that is the target of the desired operation. + * Gets The host name of the blob storage account, e.g. accountName.blob.core.windows.net. * * @return the url value. */ @@ -30,17 +31,17 @@ public String getUrl() { } /** - * Specifies the version of the operation to use for this request. + * Service version. */ - private final String version; + private final BlobServiceVersion serviceVersion; /** - * Gets Specifies the version of the operation to use for this request. + * Gets Service version. * - * @return the version value. + * @return the serviceVersion value. */ - public String getVersion() { - return this.version; + public BlobServiceVersion getServiceVersion() { + return this.serviceVersion; } /** @@ -113,20 +114,6 @@ public BlobsImpl getBlobs() { return this.blobs; } - /** - * 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. */ @@ -155,26 +142,40 @@ public BlockBlobsImpl getBlockBlobs() { return this.blockBlobs; } + /** + * 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; + } + /** * 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. + * @param url The host name of the blob storage account, e.g. accountName.blob.core.windows.net. + * @param serviceVersion Service version. */ - public AzureBlobStorageImpl(String url, String version) { + public AzureBlobStorageImpl(String url, BlobServiceVersion serviceVersion) { this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), - JacksonAdapter.createDefaultSerializerAdapter(), url, version); + JacksonAdapter.createDefaultSerializerAdapter(), url, serviceVersion); } /** * 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. + * @param url The host name of the blob storage account, e.g. accountName.blob.core.windows.net. + * @param serviceVersion Service version. */ - public AzureBlobStorageImpl(HttpPipeline httpPipeline, String url, String version) { - this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), url, version); + public AzureBlobStorageImpl(HttpPipeline httpPipeline, String url, BlobServiceVersion serviceVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), url, serviceVersion); } /** @@ -182,20 +183,20 @@ public AzureBlobStorageImpl(HttpPipeline httpPipeline, String url, String versio * * @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. + * @param url The host name of the blob storage account, e.g. accountName.blob.core.windows.net. + * @param serviceVersion Service version. */ public AzureBlobStorageImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String url, - String version) { + BlobServiceVersion serviceVersion) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.url = url; - this.version = version; + this.serviceVersion = serviceVersion; this.services = new ServicesImpl(this); this.containers = new ContainersImpl(this); this.blobs = new BlobsImpl(this); - this.pageBlobs = new PageBlobsImpl(this); this.appendBlobs = new AppendBlobsImpl(this); this.blockBlobs = new BlockBlobsImpl(this); + this.pageBlobs = new PageBlobsImpl(this); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImplBuilder.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImplBuilder.java deleted file mode 100644 index 542c91e74d775..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImplBuilder.java +++ /dev/null @@ -1,279 +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.core.annotation.Generated; -import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.client.traits.ConfigurationTrait; -import com.azure.core.client.traits.HttpTrait; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.HttpPipelinePosition; -import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.AddHeadersPolicy; -import com.azure.core.http.policy.CookiePolicy; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RequestIdPolicy; -import com.azure.core.http.policy.RetryOptions; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.util.ClientOptions; -import com.azure.core.util.Configuration; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.builder.ClientBuilderUtil; -import com.azure.core.util.serializer.JacksonAdapter; -import com.azure.core.util.serializer.SerializerAdapter; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** A builder for creating a new instance of the AzureBlobStorage type. */ -@ServiceClientBuilder(serviceClients = { AzureBlobStorageImpl.class }) -public final class AzureBlobStorageImplBuilder - implements HttpTrait, ConfigurationTrait { - @Generated - private static final String SDK_NAME = "name"; - - @Generated - private static final String SDK_VERSION = "version"; - - @Generated - private static final Map PROPERTIES = new HashMap<>(); - - @Generated - private final List pipelinePolicies; - - /** Create an instance of the AzureBlobStorageImplBuilder. */ - @Generated - public AzureBlobStorageImplBuilder() { - this.pipelinePolicies = new ArrayList<>(); - } - - /* - * The HTTP pipeline to send requests through. - */ - @Generated - private HttpPipeline pipeline; - - /** {@inheritDoc}. */ - @Generated - @Override - public AzureBlobStorageImplBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The HTTP client used to send the request. - */ - @Generated - private HttpClient httpClient; - - /** {@inheritDoc}. */ - @Generated - @Override - public AzureBlobStorageImplBuilder httpClient(HttpClient httpClient) { - this.httpClient = httpClient; - return this; - } - - /* - * The logging configuration for HTTP requests and responses. - */ - @Generated - private HttpLogOptions httpLogOptions; - - /** {@inheritDoc}. */ - @Generated - @Override - public AzureBlobStorageImplBuilder httpLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = httpLogOptions; - return this; - } - - /* - * The client options such as application ID and custom headers to set on a request. - */ - @Generated - private ClientOptions clientOptions; - - /** {@inheritDoc}. */ - @Generated - @Override - public AzureBlobStorageImplBuilder clientOptions(ClientOptions clientOptions) { - this.clientOptions = clientOptions; - return this; - } - - /* - * The retry options to configure retry policy for failed requests. - */ - @Generated - private RetryOptions retryOptions; - - /** {@inheritDoc}. */ - @Generated - @Override - public AzureBlobStorageImplBuilder retryOptions(RetryOptions retryOptions) { - this.retryOptions = retryOptions; - return this; - } - - /** {@inheritDoc}. */ - @Generated - @Override - public AzureBlobStorageImplBuilder addPolicy(HttpPipelinePolicy customPolicy) { - Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); - pipelinePolicies.add(customPolicy); - return this; - } - - /* - * The configuration store that is used during construction of the service client. - */ - @Generated - private Configuration configuration; - - /** {@inheritDoc}. */ - @Generated - @Override - public AzureBlobStorageImplBuilder configuration(Configuration configuration) { - this.configuration = configuration; - return this; - } - - /* - * The URL of the service account, container, or blob that is the target of the desired operation. - */ - @Generated - private String url; - - /** - * Sets The URL of the service account, container, or blob that is the target of the desired operation. - * - * @param url the url value. - * @return the AzureBlobStorageImplBuilder. - */ - @Generated - public AzureBlobStorageImplBuilder url(String url) { - this.url = url; - return this; - } - - /* - * Specifies the version of the operation to use for this request. - */ - @Generated - private String version; - - /** - * Sets Specifies the version of the operation to use for this request. - * - * @param version the version value. - * @return the AzureBlobStorageImplBuilder. - */ - @Generated - public AzureBlobStorageImplBuilder version(String version) { - this.version = version; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - @Generated - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the AzureBlobStorageImplBuilder. - */ - @Generated - public AzureBlobStorageImplBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /* - * The retry policy that will attempt to retry failed requests, if applicable. - */ - @Generated - private RetryPolicy retryPolicy; - - /** - * Sets The retry policy that will attempt to retry failed requests, if applicable. - * - * @param retryPolicy the retryPolicy value. - * @return the AzureBlobStorageImplBuilder. - */ - @Generated - public AzureBlobStorageImplBuilder retryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = retryPolicy; - return this; - } - - /** - * Builds an instance of AzureBlobStorageImpl with the provided parameters. - * - * @return an instance of AzureBlobStorageImpl. - */ - @Generated - public AzureBlobStorageImpl buildClient() { - HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); - String localVersion = (version != null) ? version : "2024-08-04"; - SerializerAdapter localSerializerAdapter - = (serializerAdapter != null) ? serializerAdapter : JacksonAdapter.createDefaultSerializerAdapter(); - AzureBlobStorageImpl client - = new AzureBlobStorageImpl(localPipeline, localSerializerAdapter, url, localVersion); - return client; - } - - @Generated - private HttpPipeline createHttpPipeline() { - Configuration buildConfiguration - = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; - HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; - ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; - List policies = new ArrayList<>(); - String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); - String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); - String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); - policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); - policies.add(new RequestIdPolicy()); - policies.add(new AddHeadersFromContextPolicy()); - HttpHeaders headers = new HttpHeaders(); - localClientOptions.getHeaders().forEach(header -> headers.set(header.getName(), header.getValue())); - if (headers.getSize() > 0) { - policies.add(new AddHeadersPolicy(headers)); - } - this.pipelinePolicies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .forEach(p -> policies.add(p)); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); - policies.add(new AddDatePolicy()); - policies.add(new CookiePolicy()); - this.pipelinePolicies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .forEach(p -> policies.add(p)); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) - .httpClient(httpClient) - .clientOptions(localClientOptions) - .build(); - return httpPipeline; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobAsyncClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobAsyncClientInternal.java new file mode 100644 index 0000000000000..039c36a7a2736 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobAsyncClientInternal.java @@ -0,0 +1,5505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.storage.blob.implementation; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.RequestConditions; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; +import com.azure.core.util.Base64Util; +import com.azure.core.util.BinaryData; +import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.serializer.ObjectSerializer; +import com.azure.storage.blob.implementation.models.BlobCopySourceTags; +import com.azure.storage.blob.implementation.models.BlobDeleteType; +import com.azure.storage.blob.implementation.models.BlobExpiryOptions; +import com.azure.storage.blob.implementation.models.BlobLayoutInternal; +import com.azure.storage.blob.implementation.models.BlobStorageErrorException; +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; +import com.azure.storage.blob.implementation.models.BlobsChangeLeaseHeaders; +import com.azure.storage.blob.implementation.models.BlobsCopyFromUrlHeaders; +import com.azure.storage.blob.implementation.models.BlobsCreateSnapshotHeaders; +import com.azure.storage.blob.implementation.models.BlobsDeleteHeaders; +import com.azure.storage.blob.implementation.models.BlobsDeleteImmutabilityPolicyHeaders; +import com.azure.storage.blob.implementation.models.BlobsDownloadHeaders; +import com.azure.storage.blob.implementation.models.BlobsGetAccountInfoHeaders; +import com.azure.storage.blob.implementation.models.BlobsGetLayoutHeaders; +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.BlobsReleaseLeaseHeaders; +import com.azure.storage.blob.implementation.models.BlobsRenewLeaseHeaders; +import com.azure.storage.blob.implementation.models.BlobsSetExpiryHeaders; +import com.azure.storage.blob.implementation.models.BlobsSetHttpHeadersHeaders; +import com.azure.storage.blob.implementation.models.BlobsSetImmutabilityPolicyHeaders; +import com.azure.storage.blob.implementation.models.BlobsSetLegalHoldHeaders; +import com.azure.storage.blob.implementation.models.BlobsSetMetadataHeaders; +import com.azure.storage.blob.implementation.models.BlobsSetTagsHeaders; +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.QueryRequest; +import com.azure.storage.blob.models.AccessTier; +import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; +import com.azure.storage.blob.models.DeleteSnapshotsOptionType; +import com.azure.storage.blob.models.EncryptionAlgorithmType; +import com.azure.storage.blob.models.FileShareTokenIntent; +import com.azure.storage.blob.models.RehydratePriority; +import java.time.OffsetDateTime; +import java.util.Map; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous AzureBlobStorage type. + */ +public final class BlobAsyncClientInternal { + + @Generated + private static final ObjectSerializer XML_SERIALIZER = XmlSerializerProviders.createInstance(); + + @Generated + private final BlobsImpl serviceClient; + + /** + * Initializes an instance of BlobAsyncClientInternal class. + * + * @param serviceClient the service client implementation. + */ + @Generated + public BlobAsyncClientInternal(BlobsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Downloads the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
RangeStringNoSpecifies the range of the blob to operate on.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-range-get-content-md5BooleanNoWhen set to true and specified together + * with the `Range` header, the service returns the MD5 hash for the range, as long as the range is less than or + * equal to 4 MiB in size.
x-ms-range-get-content-crc64BooleanNoWhen set to true and the request includes + * a Range header, the service returns the CRC64 hash for the range, as long as the range is less than or equal to 4 + * MiB in size.
x-ms-structured-bodyStringNoSpecifies the response content should be returned + * as a structured message and specifies the message schema version and properties.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
x-ms-metaMap<String, String>The metadata headers.
x-ms-orMap<String, String>The object replication status headers.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-creation-timeOffsetDateTimeThe date-time the blob was created.
x-ms-or-policy-idStringThe object replication policy ID.
Content-LengthlongThe number of bytes present in the response body.
Content-RangeStringIndicates the range of bytes returned in this response.
ETagStringAn opaque identifier for the current state of the resource.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
Content-EncodingStringThe Content-Encoding of the blob.
Cache-ControlStringThe Cache-Control of the blob.
Content-DispositionStringThe Content-Disposition of the blob.
Content-LanguageStringThe Content-Language of the blob.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
x-ms-blob-typeStringThe type of the blob.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-copy-completion-timeOffsetDateTimeIf this blob was the destination of a copy, + * specifies the completion time of the last attempted copy operation.
x-ms-copy-status-descriptionStringIf this blob was the destination of a copy, specifies + * the cause of the copy operation failure.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-progressStringIf this blob was the destination of a copy, specifies the + * number of bytes copied and the total bytes in the source.
x-ms-copy-statusStringStatus of the copy operation.
x-ms-copy-sourceStringIf this blob was the destination of a copy, specifies the source + * URL.
x-ms-lease-durationStringSpecifies the duration of the lease.
x-ms-lease-stateStringThe lease state of the blob.
x-ms-lease-statusStringThe lease status of the blob.
x-ms-version-idStringThe version ID of the blob.
x-ms-is-current-versionbooleanIndicates whether this is the current version of the + * blob.
Accept-RangesStringIndicates that the service supports requests for partial blob + * content.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-blob-content-md5byte[]MD5 hash of the full blob content only returned for ranged + * reads. This is the hash of the complete blob, not just the requested range.
x-ms-tag-countlongThe number of tags associated with the blob.
x-ms-blob-sealedbooleanWhether the blob is sealed.
x-ms-last-access-timeOffsetDateTimeThe date-time value that indicates the time at which + * the blob was last read or written.
x-ms-immutability-policy-until-dateOffsetDateTimeThe date-time that indicates the time + * at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringIndicates the immutability policy mode of the + * blob.
x-ms-legal-holdbooleanIndicates whether the blob has a legal hold.
x-ms-structured-bodyStringIndicates if the response body contains a structured message + * and specifies the message schema version and properties.
x-ms-structured-content-lengthlongThe length of the blob/file content inside the + * message body when the response body is returned as a structured message. Will always be smaller than + * Content-Length.
x-ms-access-tierStringThe access tier of the blob.
x-ms-access-tier-inferredbooleanIncluded if the access tier is inferred.
x-ms-access-tier-change-timeOffsetDateTimeThe time the tier was changed on the blob. + * This is only returned if the tier on the blob was ever set.
x-ms-smart-access-tierStringThe underlying tier of a smart tier blob. Only returned if + * the blob is in Smart tier.
x-ms-download-hintStringIndicates the download hint for the blob.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> downloadWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.downloadWithResponseInternalAsync(requestOptions); + } + + /** + * Returns all user-defined metadata, standard HTTP properties, and system properties for the specified blob. It + * does not return the content of the blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Content-TypeStringContent-type.
x-ms-metaMap<String, String>The metadata headers.
x-ms-orMap<String, String>The object replication status headers.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-creation-timeOffsetDateTimeThe date-time the blob was created.
x-ms-or-policy-idStringThe object replication policy ID.
x-ms-blob-typeStringThe type of the blob.
x-ms-copy-completion-timeOffsetDateTimeIf this blob was the destination of a copy, + * specifies the completion time of the last attempted copy operation.
x-ms-copy-status-descriptionStringIf this blob was the destination of a copy, specifies + * the cause of the copy operation failure.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-progressStringIf this blob was the destination of a copy, specifies the + * number of bytes copied and the total bytes in the source.
x-ms-copy-statusStringStatus of the copy operation.
x-ms-copy-sourceStringIf this blob was the destination of a copy, specifies the source + * URL.
x-ms-incremental-copybooleanIncluded if the blob is incremental copy blob.
x-ms-copy-destination-snapshotStringIncluded if the blob is incremental copy blob or + * incremental copy snapshot, if x-ms-copy-status is success.
x-ms-lease-durationStringSpecifies the duration of the lease.
x-ms-lease-stateStringThe lease state of the blob.
x-ms-lease-statusStringThe lease status of the blob.
Content-LengthlongThe number of bytes present in the response body.
ETagStringAn opaque identifier for the current state of the resource.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
Content-EncodingStringThe Content-Encoding of the blob.
Content-DispositionStringThe Content-Disposition of the blob.
Content-LanguageStringThe Content-Language of the blob.
Cache-ControlStringThe Cache-Control of the blob.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
Accept-RangesStringIndicates that the service supports requests for partial blob + * content.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-access-tierStringThe access tier of the blob.
x-ms-access-tier-inferredbooleanIncluded if the access tier is inferred.
x-ms-archive-statusStringIncluded if the blob rehydrate operation is pending. Indicates + * the destination tier.
x-ms-access-tier-change-timeOffsetDateTimeThe time the tier was changed on the blob. + * This is only returned if the tier on the blob was ever set.
x-ms-smart-access-tierStringThe underlying tier of a smart tier blob. Only returned if + * the blob is in Smart tier.
x-ms-version-idStringThe version ID of the blob.
x-ms-is-current-versionbooleanIndicates whether this is the current version of the + * blob.
x-ms-tag-countlongThe number of tags associated with the blob.
x-ms-expiry-timeOffsetDateTimeThe date-time this blob will expire.
x-ms-blob-sealedbooleanWhether the blob is sealed.
x-ms-rehydrate-priorityStringThe priority of the rehydration operation.
x-ms-last-access-timeOffsetDateTimeThe date-time value that indicates the time at which + * the blob was last read or written.
x-ms-immutability-policy-until-dateOffsetDateTimeThe date-time that indicates the time + * at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringIndicates the immutability policy mode of the + * blob.
x-ms-legal-holdbooleanIndicates whether the blob has a legal hold.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getPropertiesWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getPropertiesWithResponseInternalAsync(requestOptions); + } + + /** + * Deletes the specified blob. If blob soft delete is enabled, the blob is marked for deletion and can be recovered + * until the retention period expires. + *

Query Parameters

+ * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
deletetypeStringNoThe delete type. Allowed values: "Permanent".
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-delete-snapshotsStringNoRequired if the blob has associated snapshots. + * Specifies the delete behavior. Allowed values: "only", "include".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-access-tier-if-modified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if the access-tier has been modified since the specified date-time.
x-ms-access-tier-if-unmodified-sinceOffsetDateTimeNoSpecify this header value + * to operate only on a blob if the access-tier has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> deleteWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponseInternalAsync(requestOptions); + } + + /** + * Undelete the specified previously soft deleted blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> undeleteWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.undeleteWithResponseInternalAsync(requestOptions); + } + + /** + * Set the expiration time of the specified blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-expiry-timeOffsetDateTimeNoThe date-time this blob will expire.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param expiryOptions Indicates the mode of the expiry time. Allowed values: "NeverExpire", "RelativeToCreation", + * "RelativeToNow", "Absolute". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> setExpiryWithResponseInternal(String expiryOptions, RequestOptions requestOptions) { + return this.serviceClient.setExpiryWithResponseInternalAsync(expiryOptions, requestOptions); + } + + /** + * Sets system properties on the specified blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> setHttpHeadersWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.setHttpHeadersWithResponseInternalAsync(requestOptions); + } + + /** + * Set the immutability policy on the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-immutability-policy-until-dateOffsetDateTimeThe date-time that indicates the time + * at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringIndicates the immutability policy mode of the + * blob.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param expiry The date-time that indicates the time at which the blob immutability policy will expire. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> setImmutabilityPolicyWithResponseInternal(OffsetDateTime expiry, + RequestOptions requestOptions) { + return this.serviceClient.setImmutabilityPolicyWithResponseInternalAsync(expiry, requestOptions); + } + + /** + * Deletes the immutability policy on the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> deleteImmutabilityPolicyWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.deleteImmutabilityPolicyWithResponseInternalAsync(requestOptions); + } + + /** + * Sets a legal hold on the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-legal-holdbooleanIndicates whether the blob has a legal hold.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param legalHold Indicates whether the blob has a legal hold. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> setLegalHoldWithResponseInternal(boolean legalHold, RequestOptions requestOptions) { + return this.serviceClient.setLegalHoldWithResponseInternalAsync(legalHold, requestOptions); + } + + /** + * Sets user-defined metadata for the specified blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> setMetadataWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.setMetadataWithResponseInternalAsync(requestOptions); + } + + /** + * Requests a new lease on the specified blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-proposed-lease-idStringNoThe proposed lease ID for the lease.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-lease-idStringUniquely identifies a blob's lease.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> acquireLeaseWithResponseInternal(int duration, RequestOptions requestOptions) { + return this.serviceClient.acquireLeaseWithResponseInternalAsync(duration, requestOptions); + } + + /** + * Frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the + * blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> releaseLeaseWithResponseInternal(String leaseId, RequestOptions requestOptions) { + return this.serviceClient.releaseLeaseWithResponseInternalAsync(leaseId, requestOptions); + } + + /** + * Renews an existing lease. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-lease-idStringUniquely identifies a blob's lease.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> renewLeaseWithResponseInternal(String leaseId, RequestOptions requestOptions) { + return this.serviceClient.renewLeaseWithResponseInternalAsync(leaseId, requestOptions); + } + + /** + * Change the ID of an existing lease. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-lease-idStringUniquely identifies a blob's lease.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> changeLeaseWithResponseInternal(String leaseId, String proposedLeaseId, + RequestOptions requestOptions) { + return this.serviceClient.changeLeaseWithResponseInternalAsync(leaseId, proposedLeaseId, requestOptions); + } + + /** + * Ends a lease and ensures that another client can't acquire a new lease until the current lease period has + * expired. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-break-periodIntegerNoProposed 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.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-lease-timeintApproximate time remaining in the lease period, in seconds.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> breakLeaseWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.breakLeaseWithResponseInternalAsync(requestOptions); + } + + /** + * Creates a read-only snapshot of the specified blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-snapshotStringUniquely identifies the snapshot and indicates the snapshot + * version.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> createSnapshotWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.createSnapshotWithResponseInternalAsync(requestOptions); + } + + /** + * Starts an asynchronous copy from a source URL to a destination blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-access-tierStringNoThe tier to be set on the blob. Allowed values: "P4", + * "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", + * "Smart".
x-ms-rehydrate-priorityStringNoThe priority of the rehydration operation. + * Allowed values: "High", "Standard".
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
x-ms-source-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to + * operate only on a source blob with matching tags.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-tagsStringNoThe blob tags.
x-ms-seal-blobBooleanNoOverrides the sealed state of the destination + * blob.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-version-idStringThe version ID of the blob.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-statusStringStatus of the copy operation.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> startCopyFromUrlWithResponseInternal(String copySource, RequestOptions requestOptions) { + return this.serviceClient.startCopyFromUrlWithResponseInternalAsync(copySource, requestOptions); + } + + /** + * Synchronously copies a blob from a source URL to the destination blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-access-tierStringNoThe tier to be set on the blob. Allowed values: "P4", + * "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", + * "Smart".
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-source-content-md5byte[]NoSpecifies the MD5 hash calculated for the range + * of bytes that must be read from the copy source.
x-ms-tagsStringNoThe blob tags.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is + * supported, and the value must be a valid OAuth access token for the copy source.
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-copy-source-tag-optionStringNoIndicates if source tags should be copied + * or replaced with the tags specified. Default is 'Replace'. Allowed values: "REPLACE", "COPY".
x-ms-file-request-intentStringNoSpecifies the file request token intent. + * Allowed values: "backup".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-version-idStringThe version ID of the blob.
x-ms-copy-idStringIdentifier for this copy operation.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> copyFromUrlWithResponseInternal(String copySource, RequestOptions requestOptions) { + return this.serviceClient.copyFromUrlWithResponseInternalAsync(copySource, requestOptions); + } + + /** + * Aborts a pending asynchronous copy operation and leaves a destination blob with zero length and full metadata. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param copyId The ID of the copy to be aborted. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> abortCopyFromUrlWithResponseInternal(String copyId, RequestOptions requestOptions) { + return this.serviceClient.abortCopyFromUrlWithResponseInternalAsync(copyId, requestOptions); + } + + /** + * Sets the tier of the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-rehydrate-priorityStringNoThe priority of the rehydration operation. + * Allowed values: "High", "Standard".
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param tier Indicates the tier to be set on the blob. Allowed values: "P4", "P6", "P10", "P15", "P20", "P30", + * "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", "Smart". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> setTierWithResponseInternal(String tier, RequestOptions requestOptions) { + return this.serviceClient.setTierWithResponseInternalAsync(tier, requestOptions); + } + + /** + * Returns information about the storage account. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-account-kindStringThe account kind.
x-ms-sku-nameStringThe SKU name of the account.
x-ms-is-hns-enabledbooleanIndicates if the account has a hierarchical namespace + * enabled.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getAccountInfoWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getAccountInfoWithResponseInternalAsync(requestOptions); + } + + /** + * Gets the tags of the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-blob-if-modified-sinceOffsetDateTimeNoSpecify this value to operate only + * on a blob if it has been modified since the specified date-time.
x-ms-blob-if-unmodified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a blob if it has not been modified since the specified date-time.
x-ms-blob-if-matchStringNoSpecify this value to operate only on a blob with a + * matching Etag value.
x-ms-blob-if-none-matchStringNoSpecify this value to operate only on a blob + * with a non-matching Etag value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     TagSet (Required): [
+     *          (Required){
+     *             Key: String (Required)
+     *             Value: String (Required)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the tags of the specified blob along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getTagsWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getTagsWithResponseInternalAsync(requestOptions); + } + + /** + * Sets the tags of the specified blob. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
versionidStringNoSpecifies the version ID of the blob.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-if-modified-sinceOffsetDateTimeNoSpecify this value to operate only + * on a blob if it has been modified since the specified date-time.
x-ms-blob-if-unmodified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a blob if it has not been modified since the specified date-time.
x-ms-blob-if-matchStringNoSpecify this value to operate only on a blob with a + * matching Etag value.
x-ms-blob-if-none-matchStringNoSpecify this value to operate only on a blob + * with a non-matching Etag value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     TagSet (Required): [
+     *          (Required){
+     *             Key: String (Required)
+     *             Value: String (Required)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param tags The blob tags. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> setTagsWithResponseInternal(BinaryData tags, RequestOptions requestOptions) { + return this.serviceClient.setTagsWithResponseInternalAsync(tags, requestOptions); + } + + /** + * The Get Blob Layout operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. In addition, it may optionally return the layout of the blob. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
RangeStringNoSpecifies the range of the blob to operate on.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     Ranges (Optional): {
+     *         Range (Optional): [
+     *              (Optional){
+     *                 Start: long (Required)
+     *                 End: long (Required)
+     *                 EndpointIndex: int (Required)
+     *             }
+     *         ]
+     *     }
+     *     Endpoints (Optional): {
+     *         Endpoint (Optional): [
+     *              (Optional){
+     *                 Index: int (Required)
+     *                 Value: String (Required)
+     *             }
+     *         ]
+     *     }
+     *     Marker: String (Optional)
+     *     NextMarker: String (Optional)
+     *     MaxResults: Integer (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-blob-content-lengthlongThe size of the blob in bytes.
x-ms-blob-content-typeStringThe Content-Type of the blob.
x-ms-blob-content-encodingStringThe Content-Encoding of the blob.
x-ms-blob-content-md5byte[]MD5 hash of the full blob content only returned for ranged + * reads. This is the hash of the complete blob, not just the requested range.
x-ms-blob-creation-timeOffsetDateTimeThe date-time the blob was created.
x-ms-creation-timeOffsetDateTimeThe date-time the blob was created.
x-ms-metaMap<String, String>The metadata headers.
x-ms-or-policy-idStringThe object replication policy ID.
x-ms-orMap<String, String>The object replication status headers.
x-ms-blob-typeStringThe type of the blob.
x-ms-copy-completion-timeOffsetDateTimeIf this blob was the destination of a copy, + * specifies the completion time of the last attempted copy operation.
x-ms-copy-status-descriptionStringIf this blob was the destination of a copy, specifies + * the cause of the copy operation failure.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-progressStringIf this blob was the destination of a copy, specifies the + * number of bytes copied and the total bytes in the source.
x-ms-copy-sourceStringIf this blob was the destination of a copy, specifies the source + * URL.
x-ms-copy-statusStringStatus of the copy operation.
x-ms-incremental-copybooleanIncluded if the blob is incremental copy blob.
x-ms-copy-destination-snapshotStringIncluded if the blob is incremental copy blob or + * incremental copy snapshot, if x-ms-copy-status is success.
x-ms-lease-durationStringSpecifies the duration of the lease.
x-ms-lease-stateStringThe lease state of the blob.
x-ms-lease-statusStringThe lease status of the blob.
Content-LengthlongThe number of bytes present in the response body.
ETagStringAn opaque identifier for the current state of the resource.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
Content-EncodingStringThe Content-Encoding of the blob.
Content-DispositionStringThe Content-Disposition of the blob.
Content-LanguageStringThe Content-Language of the blob.
Cache-ControlStringThe Cache-Control of the blob.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
Accept-RangesStringIndicates that the service supports requests for partial blob + * content.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-access-tierStringThe access tier of the blob.
x-ms-access-tier-inferredbooleanIncluded if the access tier is inferred.
x-ms-smart-access-tierStringThe underlying tier of a smart tier blob. Only returned if + * the blob is in Smart tier.
x-ms-archive-statusStringIncluded if the blob rehydrate operation is pending. Indicates + * the destination tier.
x-ms-access-tier-change-timeOffsetDateTimeThe time the tier was changed on the blob. + * This is only returned if the tier on the blob was ever set.
x-ms-version-idStringThe version ID of the blob.
x-ms-is-current-versionbooleanIndicates whether this is the current version of the + * blob.
x-ms-tag-countlongThe number of tags associated with the blob.
x-ms-expiry-timeOffsetDateTimeThe date-time this blob will expire.
x-ms-blob-sealedbooleanWhether the blob is sealed.
x-ms-rehydrate-priorityStringThe priority of the rehydration operation.
x-ms-last-access-timeOffsetDateTimeThe date-time value that indicates the time at which + * the blob was last read or written.
x-ms-immutability-policy-until-dateOffsetDateTimeThe date-time that indicates the time + * at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringIndicates the immutability policy mode of the + * blob.
x-ms-legal-holdbooleanIndicates whether the blob has a legal hold.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the Get Blob Layout API along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getLayoutWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getLayoutWithResponseInternalAsync(requestOptions); + } + + /** + * Queries the data of the specified blob with the provided query expressions. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     QueryType: String(SQL) (Required)
+     *     Expression: String (Required)
+     *     InputSerialization (Optional): {
+     *         Format (Required): {
+     *             Type: String(delimited/json/arrow/parquet) (Required)
+     *             DelimitedTextConfiguration (Optional): {
+     *                 ColumnSeparator: String (Optional)
+     *                 FieldQuote: String (Optional)
+     *                 RecordSeparator: String (Optional)
+     *                 EscapeChar: String (Optional)
+     *                 HasHeaders: Boolean (Optional)
+     *             }
+     *             JsonTextConfiguration (Optional): {
+     *                 RecordSeparator: String (Optional)
+     *             }
+     *             ArrowConfiguration (Optional): {
+     *                 Schema (Required): [
+     *                      (Required){
+     *                         Type: String (Required)
+     *                         Name: String (Optional)
+     *                         Precision: Integer (Optional)
+     *                         Scale: Integer (Optional)
+     *                     }
+     *                 ]
+     *             }
+     *             ParquetTextConfiguration (Optional): {
+     *             }
+     *         }
+     *     }
+     *     OutputSerialization (Optional): (recursive schema, see OutputSerialization above)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-metaMap<String, String>The metadata headers.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-LengthlongThe number of bytes present in the response body.
Content-RangeStringIndicates the range of bytes returned in this response.
ETagStringAn opaque identifier for the current state of the resource.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
Content-EncodingStringThe Content-Encoding of the blob.
Cache-ControlStringThe Cache-Control of the blob.
Content-DispositionStringThe Content-Disposition of the blob.
Content-LanguageStringThe Content-Language of the blob.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
x-ms-blob-typeStringThe type of the blob.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-copy-completion-timeOffsetDateTimeIf this blob was the destination of a copy, + * specifies the completion time of the last attempted copy operation.
x-ms-copy-status-descriptionStringIf this blob was the destination of a copy, specifies + * the cause of the copy operation failure.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-progressStringIf this blob was the destination of a copy, specifies the + * number of bytes copied and the total bytes in the source.
x-ms-copy-sourceStringIf this blob was the destination of a copy, specifies the source + * URL.
x-ms-copy-statusStringStatus of the copy operation.
x-ms-lease-durationStringSpecifies the duration of the lease.
x-ms-lease-stateStringThe lease state of the blob.
x-ms-lease-statusStringThe lease status of the blob.
Accept-RangesStringIndicates that the service supports requests for partial blob + * content.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-blob-content-md5byte[]MD5 hash of the full blob content only returned for ranged + * reads. This is the hash of the complete blob, not just the requested range.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param queryRequest The query request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> queryWithResponseInternal(BinaryData queryRequest, RequestOptions requestOptions) { + return this.serviceClient.queryWithResponseInternalAsync(queryRequest, requestOptions); + } + + /** + * Downloads the specified blob. + * + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of 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 range Specifies the range of the blob to operate on. + * @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` header, the service returns + * the MD5 hash for the range, as long as the range is less than or equal to 4 MiB in size. + * @param rangeGetContentCrc64 When set to true and the request includes a Range header, the service returns the + * CRC64 hash for the range, as long as the range is less than or equal to 4 MiB in size. + * @param structuredBodyType Specifies the response content should be returned as a structured message and specifies + * the message schema version and properties. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> downloadWithResponse(String snapshot, String versionId, + Integer timeout, String range, String leaseId, Boolean rangeGetContentMd5, Boolean rangeGetContentCrc64, + String structuredBodyType, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String ifTags, RequestConditions requestConditions, + RequestOptions requestOptions) { + // Generated convenience method for downloadWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (range != null) { + requestOptions.setHeader(HttpHeaderName.RANGE, range); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (rangeGetContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range-get-content-md5"), + String.valueOf(rangeGetContentMd5)); + } + if (rangeGetContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range-get-content-crc64"), + String.valueOf(rangeGetContentCrc64)); + } + if (structuredBodyType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-body"), structuredBodyType); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return downloadWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue(), new BlobsDownloadHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Downloads the specified blob. + * + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of 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 range Specifies the range of the blob to operate on. + * @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` header, the service returns + * the MD5 hash for the range, as long as the range is less than or equal to 4 MiB in size. + * @param rangeGetContentCrc64 When set to true and the request includes a Range header, the service returns the + * CRC64 hash for the range, as long as the range is less than or equal to 4 MiB in size. + * @param structuredBodyType Specifies the response content should be returned as a structured message and specifies + * the message schema version and properties. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono download(String snapshot, String versionId, Integer timeout, String range, String leaseId, + Boolean rangeGetContentMd5, Boolean rangeGetContentCrc64, String structuredBodyType, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String ifTags, + RequestConditions requestConditions) { + // Generated convenience method for downloadWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (range != null) { + requestOptions.setHeader(HttpHeaderName.RANGE, range); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (rangeGetContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range-get-content-md5"), + String.valueOf(rangeGetContentMd5)); + } + if (rangeGetContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range-get-content-crc64"), + String.valueOf(rangeGetContentCrc64)); + } + if (structuredBodyType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-body"), structuredBodyType); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return downloadWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Downloads the specified blob. + * + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono download() { + // Generated convenience method for downloadWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return downloadWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Returns all user-defined metadata, standard HTTP properties, and system properties for the specified blob. It + * does not return the content of the blob. + * + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getPropertiesWithResponse(String snapshot, + String versionId, Integer timeout, String leaseId, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String ifTags, RequestConditions requestConditions, + RequestOptions requestOptions) { + // Generated convenience method for getPropertiesWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return getPropertiesWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsGetPropertiesHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Returns all user-defined metadata, standard HTTP properties, and system properties for the specified blob. It + * does not return the content of the blob. + * + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getProperties(String snapshot, String versionId, Integer timeout, String leaseId, + String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String ifTags, + RequestConditions requestConditions) { + // Generated convenience method for getPropertiesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return getPropertiesWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Returns all user-defined metadata, standard HTTP properties, and system properties for the specified blob. It + * does not return the content of the blob. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getProperties() { + // Generated convenience method for getPropertiesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getPropertiesWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Deletes the specified blob. If blob soft delete is enabled, the blob is marked for deletion and can be recovered + * until the retention period expires. + * + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of 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 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. Specifies the delete behavior. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobDeleteType The delete type. + * @param accessTierIfModifiedSince Specify this header value to operate only on a blob if the access-tier has been + * modified since the specified date-time. + * @param accessTierIfUnmodifiedSince Specify this header value to operate only on a blob if the access-tier has not + * been modified since the specified date-time. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponse(String snapshot, String versionId, + Integer timeout, String leaseId, DeleteSnapshotsOptionType deleteSnapshots, String ifTags, + BlobDeleteType blobDeleteType, OffsetDateTime accessTierIfModifiedSince, + OffsetDateTime accessTierIfUnmodifiedSince, RequestConditions requestConditions, + RequestOptions requestOptions) { + // Generated convenience method for deleteWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (deleteSnapshots != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-delete-snapshots"), deleteSnapshots.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobDeleteType != null) { + requestOptions.addQueryParam("deletetype", blobDeleteType.toString(), false); + } + if (accessTierIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-access-tier-if-modified-since"), + String.valueOf(new DateTimeRfc1123(accessTierIfModifiedSince))); + } + if (accessTierIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-access-tier-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(accessTierIfUnmodifiedSince))); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return deleteWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsDeleteHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Deletes the specified blob. If blob soft delete is enabled, the blob is marked for deletion and can be recovered + * until the retention period expires. + * + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of 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 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. Specifies the delete behavior. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobDeleteType The delete type. + * @param accessTierIfModifiedSince Specify this header value to operate only on a blob if the access-tier has been + * modified since the specified date-time. + * @param accessTierIfUnmodifiedSince Specify this header value to operate only on a blob if the access-tier has not + * been modified since the specified date-time. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono delete(String snapshot, String versionId, Integer timeout, String leaseId, + DeleteSnapshotsOptionType deleteSnapshots, String ifTags, BlobDeleteType blobDeleteType, + OffsetDateTime accessTierIfModifiedSince, OffsetDateTime accessTierIfUnmodifiedSince, + RequestConditions requestConditions) { + // Generated convenience method for deleteWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (deleteSnapshots != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-delete-snapshots"), deleteSnapshots.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobDeleteType != null) { + requestOptions.addQueryParam("deletetype", blobDeleteType.toString(), false); + } + if (accessTierIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-access-tier-if-modified-since"), + String.valueOf(new DateTimeRfc1123(accessTierIfModifiedSince))); + } + if (accessTierIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-access-tier-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(accessTierIfUnmodifiedSince))); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return deleteWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Deletes the specified blob. If blob soft delete is enabled, the blob is marked for deletion and can be recovered + * until the retention period expires. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono delete() { + // Generated convenience method for deleteWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return deleteWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Undelete the specified previously soft deleted 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> undeleteWithResponse(Integer timeout, + RequestOptions requestOptions) { + // Generated convenience method for undeleteWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return undeleteWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsUndeleteHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Undelete the specified previously soft deleted 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>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono undelete(Integer timeout) { + // Generated convenience method for undeleteWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return undeleteWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Undelete the specified previously soft deleted blob. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono undelete() { + // Generated convenience method for undeleteWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return undeleteWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Set the expiration time of the specified blob. + * + * @param expiryOptions Indicates the 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 expiresOn The date-time this blob will expire. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setExpiryWithResponse(BlobExpiryOptions expiryOptions, + Integer timeout, OffsetDateTime expiresOn, RequestOptions requestOptions) { + // Generated convenience method for setExpiryWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (expiresOn != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-expiry-time"), + String.valueOf(new DateTimeRfc1123(expiresOn))); + } + return setExpiryWithResponseInternal(expiryOptions.toString(), requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsSetExpiryHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Set the expiration time of the specified blob. + * + * @param expiryOptions Indicates the 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 expiresOn The date-time this blob will expire. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setExpiry(BlobExpiryOptions expiryOptions, Integer timeout, OffsetDateTime expiresOn) { + // Generated convenience method for setExpiryWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (expiresOn != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-expiry-time"), + String.valueOf(new DateTimeRfc1123(expiresOn))); + } + return setExpiryWithResponseInternal(expiryOptions.toString(), requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Set the expiration time of the specified blob. + * + * @param expiryOptions Indicates the mode of the expiry time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setExpiry(BlobExpiryOptions expiryOptions) { + // Generated convenience method for setExpiryWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return setExpiryWithResponseInternal(expiryOptions.toString(), requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Sets system properties on the specified 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 blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setHttpHeadersWithResponse(Integer timeout, + String blobCacheControl, String blobContentType, byte[] blobContentMd5, String blobContentEncoding, + String blobContentLanguage, String leaseId, String blobContentDisposition, String ifTags, + RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for setHttpHeadersWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (blobCacheControl != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (blobContentType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (blobContentEncoding != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return setHttpHeadersWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsSetHttpHeadersHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Sets system properties on the specified 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 blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setHttpHeaders(Integer timeout, String blobCacheControl, String blobContentType, + byte[] blobContentMd5, String blobContentEncoding, String blobContentLanguage, String leaseId, + String blobContentDisposition, String ifTags, RequestConditions requestConditions) { + // Generated convenience method for setHttpHeadersWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (blobCacheControl != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (blobContentType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (blobContentEncoding != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return setHttpHeadersWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Sets system properties on the specified blob. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setHttpHeaders() { + // Generated convenience method for setHttpHeadersWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return setHttpHeadersWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Set the immutability policy on the specified blob. + * + * @param expiry The date-time that indicates the time at which the blob immutability policy will expire. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of the blob. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setImmutabilityPolicyWithResponse( + OffsetDateTime expiry, Integer timeout, OffsetDateTime ifUnmodifiedSince, + BlobImmutabilityPolicyMode immutabilityPolicyMode, String snapshot, String versionId, + RequestOptions requestOptions) { + // Generated convenience method for setImmutabilityPolicyWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (immutabilityPolicyMode != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + return setImmutabilityPolicyWithResponseInternal(expiry, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsSetImmutabilityPolicyHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Set the immutability policy on the specified blob. + * + * @param expiry The date-time that indicates the time at which the blob immutability policy will expire. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of the blob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setImmutabilityPolicy(OffsetDateTime expiry, Integer timeout, OffsetDateTime ifUnmodifiedSince, + BlobImmutabilityPolicyMode immutabilityPolicyMode, String snapshot, String versionId) { + // Generated convenience method for setImmutabilityPolicyWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (immutabilityPolicyMode != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + return setImmutabilityPolicyWithResponseInternal(expiry, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Set the immutability policy on the specified blob. + * + * @param expiry The date-time that indicates the time at which the blob immutability policy will expire. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setImmutabilityPolicy(OffsetDateTime expiry) { + // Generated convenience method for setImmutabilityPolicyWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return setImmutabilityPolicyWithResponseInternal(expiry, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Deletes the immutability policy on the specified 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 snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of the blob. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteImmutabilityPolicyWithResponse( + Integer timeout, String snapshot, String versionId, RequestOptions requestOptions) { + // Generated convenience method for deleteImmutabilityPolicyWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + return deleteImmutabilityPolicyWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsDeleteImmutabilityPolicyHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Deletes the immutability policy on the specified 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 snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of the blob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteImmutabilityPolicy(Integer timeout, String snapshot, String versionId) { + // Generated convenience method for deleteImmutabilityPolicyWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + return deleteImmutabilityPolicyWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Deletes the immutability policy on the specified blob. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteImmutabilityPolicy() { + // Generated convenience method for deleteImmutabilityPolicyWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return deleteImmutabilityPolicyWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Sets a legal hold on the specified blob. + * + * @param legalHold Indicates whether the blob has a legal hold. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of the blob. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setLegalHoldWithResponse(boolean legalHold, + Integer timeout, String snapshot, String versionId, RequestOptions requestOptions) { + // Generated convenience method for setLegalHoldWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + return setLegalHoldWithResponseInternal(legalHold, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsSetLegalHoldHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Sets a legal hold on the specified blob. + * + * @param legalHold Indicates whether the blob has a legal hold. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of the blob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setLegalHold(boolean legalHold, Integer timeout, String snapshot, String versionId) { + // Generated convenience method for setLegalHoldWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + return setLegalHoldWithResponseInternal(legalHold, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Sets a legal hold on the specified blob. + * + * @param legalHold Indicates whether the blob has a legal hold. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setLegalHold(boolean legalHold) { + // Generated convenience method for setLegalHoldWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return setLegalHoldWithResponseInternal(legalHold, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Sets user-defined metadata for the specified 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 metadata The metadata headers. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setMetadataWithResponse(Integer timeout, + Map metadata, String leaseId, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String ifTags, + RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for setMetadataWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (leaseId != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return setMetadataWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsSetMetadataHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Sets user-defined metadata for the specified 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 metadata The metadata headers. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setMetadata(Integer timeout, Map metadata, String leaseId, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String ifTags, + RequestConditions requestConditions) { + // Generated convenience method for setMetadataWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return setMetadataWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Sets user-defined metadata for the specified blob. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setMetadata() { + // Generated convenience method for setMetadataWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return setMetadataWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Requests a new lease on the specified blob. + * + * @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. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> acquireLeaseWithResponse(int duration, Integer timeout, + String proposedLeaseId, String ifTags, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for acquireLeaseWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (proposedLeaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-proposed-lease-id"), proposedLeaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return acquireLeaseWithResponseInternal(duration, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsAcquireLeaseHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Requests a new lease on the specified blob. + * + * @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. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono acquireLease(int duration, Integer timeout, String proposedLeaseId, String ifTags, + RequestConditions requestConditions) { + // Generated convenience method for acquireLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (proposedLeaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-proposed-lease-id"), proposedLeaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return acquireLeaseWithResponseInternal(duration, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Requests a new lease on the specified blob. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono acquireLease(int duration) { + // Generated convenience method for acquireLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return acquireLeaseWithResponseInternal(duration, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the + * blob. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> releaseLeaseWithResponse(String leaseId, Integer timeout, + String ifTags, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for releaseLeaseWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return releaseLeaseWithResponseInternal(leaseId, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsReleaseLeaseHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the + * blob. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono releaseLease(String leaseId, Integer timeout, String ifTags, + RequestConditions requestConditions) { + // Generated convenience method for releaseLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return releaseLeaseWithResponseInternal(leaseId, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the + * blob. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono releaseLease(String leaseId) { + // Generated convenience method for releaseLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return releaseLeaseWithResponseInternal(leaseId, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Renews an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> renewLeaseWithResponse(String leaseId, Integer timeout, + String ifTags, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for renewLeaseWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return renewLeaseWithResponseInternal(leaseId, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsRenewLeaseHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Renews an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono renewLease(String leaseId, Integer timeout, String ifTags, RequestConditions requestConditions) { + // Generated convenience method for renewLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return renewLeaseWithResponseInternal(leaseId, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Renews an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono renewLease(String leaseId) { + // Generated convenience method for renewLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return renewLeaseWithResponseInternal(leaseId, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Change the ID of an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> changeLeaseWithResponse(String leaseId, + String proposedLeaseId, Integer timeout, String ifTags, RequestConditions requestConditions, + RequestOptions requestOptions) { + // Generated convenience method for changeLeaseWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return changeLeaseWithResponseInternal(leaseId, proposedLeaseId, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsChangeLeaseHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Change the ID of an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono changeLease(String leaseId, String proposedLeaseId, Integer timeout, String ifTags, + RequestConditions requestConditions) { + // Generated convenience method for changeLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return changeLeaseWithResponseInternal(leaseId, proposedLeaseId, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Change the ID of an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param proposedLeaseId The proposed lease ID for the lease. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono changeLease(String leaseId, String proposedLeaseId) { + // Generated convenience method for changeLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return changeLeaseWithResponseInternal(leaseId, proposedLeaseId, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Ends a lease and ensures that another client can't acquire a new lease until the current lease period has + * expired. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 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. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> breakLeaseWithResponse(Integer timeout, Integer breakPeriod, + String ifTags, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for breakLeaseWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (breakPeriod != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-break-period"), String.valueOf(breakPeriod)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return breakLeaseWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsBreakLeaseHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Ends a lease and ensures that another client can't acquire a new lease until the current lease period has + * expired. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 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. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono breakLease(Integer timeout, Integer breakPeriod, String ifTags, + RequestConditions requestConditions) { + // Generated convenience method for breakLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (breakPeriod != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-break-period"), String.valueOf(breakPeriod)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return breakLeaseWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Ends a lease and ensures that another client can't acquire a new lease until the current lease period has + * expired. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono breakLease() { + // Generated convenience method for breakLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return breakLeaseWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Creates a read-only snapshot of the specified 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 metadata The metadata headers. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createSnapshotWithResponse(Integer timeout, + Map metadata, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String ifTags, String leaseId, + RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for createSnapshotWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (encryptionKey != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (leaseId != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return createSnapshotWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsCreateSnapshotHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Creates a read-only snapshot of the specified 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 metadata The metadata headers. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createSnapshot(Integer timeout, Map metadata, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String ifTags, + String leaseId, RequestConditions requestConditions) { + // Generated convenience method for createSnapshotWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return createSnapshotWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Creates a read-only snapshot of the specified blob. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createSnapshot() { + // Generated convenience method for createSnapshotWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return createSnapshotWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Starts an asynchronous copy from a source URL to a destination blob. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 The metadata headers. + * @param tier The tier to be set on the blob. + * @param rehydratePriority The priority of the rehydration operation. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param sourceIfTags Specifies a SQL-like where clause on blob tags to operate only on a source blob with matching + * tags. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobTagsString The blob tags. + * @param sealBlob Overrides the sealed state of the destination blob. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> startCopyFromUrlWithResponse(String copySource, + Integer timeout, Map metadata, AccessTier tier, RehydratePriority rehydratePriority, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String sourceIfTags, String ifTags, String leaseId, String blobTagsString, + Boolean sealBlob, OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, + Boolean legalHold, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for startCopyFromUrlWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (tier != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (rehydratePriority != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-rehydrate-priority"), + rehydratePriority.toString()); + } + if (sourceIfModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (sourceIfTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-tags"), sourceIfTags); + } + if (ifTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (leaseId != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobTagsString != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (sealBlob != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-seal-blob"), String.valueOf(sealBlob)); + } + if (immutabilityPolicyExpiry != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (ifModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return startCopyFromUrlWithResponseInternal(copySource, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsStartCopyFromUrlHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Starts an asynchronous copy from a source URL to a destination blob. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 The metadata headers. + * @param tier The tier to be set on the blob. + * @param rehydratePriority The priority of the rehydration operation. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param sourceIfTags Specifies a SQL-like where clause on blob tags to operate only on a source blob with matching + * tags. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobTagsString The blob tags. + * @param sealBlob Overrides the sealed state of the destination blob. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono startCopyFromUrl(String copySource, Integer timeout, Map metadata, + AccessTier tier, RehydratePriority rehydratePriority, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, + String ifTags, String leaseId, String blobTagsString, Boolean sealBlob, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, RequestConditions requestConditions) { + // Generated convenience method for startCopyFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (tier != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (rehydratePriority != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-rehydrate-priority"), + rehydratePriority.toString()); + } + if (sourceIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (sourceIfTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-tags"), sourceIfTags); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobTagsString != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (sealBlob != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-seal-blob"), String.valueOf(sealBlob)); + } + if (immutabilityPolicyExpiry != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return startCopyFromUrlWithResponseInternal(copySource, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Starts an asynchronous copy from a source URL to a destination blob. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono startCopyFromUrl(String copySource) { + // Generated convenience method for startCopyFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return startCopyFromUrlWithResponseInternal(copySource, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Synchronously copies a blob from a source URL to the destination blob. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 The metadata headers. + * @param tier The tier to be set on the blob. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param sourceContentMd5 Specifies the MD5 hash calculated for the range of bytes that must be read from the copy + * source. + * @param blobTagsString The blob tags. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param copySourceAuthorization Only the Bearer authorization scheme is supported, and the value must be a valid + * OAuth access token for the copy source. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param copySourceTags Indicates if source tags should be copied or replaced with the tags specified. Default is + * 'Replace'. + * @param fileRequestIntent Specifies the file request token intent. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> copyFromUrlWithResponse(String copySource, Integer timeout, + Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String ifTags, + String leaseId, byte[] sourceContentMd5, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, String copySourceAuthorization, + String encryptionScope, BlobCopySourceTags copySourceTags, FileShareTokenIntent fileRequestIntent, + RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for copyFromUrlWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (tier != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (sourceIfModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (ifTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (leaseId != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (sourceContentMd5 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-content-md5"), + Base64Util.encodeToString(sourceContentMd5)); + } + if (blobTagsString != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (immutabilityPolicyExpiry != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (copySourceAuthorization != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-copy-source-authorization"), + copySourceAuthorization); + } + if (encryptionScope != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (copySourceTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-copy-source-tag-option"), + copySourceTags.toString()); + } + if (fileRequestIntent != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-file-request-intent"), + fileRequestIntent.toString()); + } + if (ifModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return copyFromUrlWithResponseInternal(copySource, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsCopyFromUrlHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Synchronously copies a blob from a source URL to the destination blob. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 The metadata headers. + * @param tier The tier to be set on the blob. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param sourceContentMd5 Specifies the MD5 hash calculated for the range of bytes that must be read from the copy + * source. + * @param blobTagsString The blob tags. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param copySourceAuthorization Only the Bearer authorization scheme is supported, and the value must be a valid + * OAuth access token for the copy source. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param copySourceTags Indicates if source tags should be copied or replaced with the tags specified. Default is + * 'Replace'. + * @param fileRequestIntent Specifies the file request token intent. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono copyFromUrl(String copySource, Integer timeout, Map metadata, AccessTier tier, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String ifTags, String leaseId, byte[] sourceContentMd5, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + String copySourceAuthorization, String encryptionScope, BlobCopySourceTags copySourceTags, + FileShareTokenIntent fileRequestIntent, RequestConditions requestConditions) { + // Generated convenience method for copyFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (tier != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (sourceIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (sourceContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-md5"), + Base64Util.encodeToString(sourceContentMd5)); + } + if (blobTagsString != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (immutabilityPolicyExpiry != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (copySourceAuthorization != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-authorization"), + copySourceAuthorization); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (copySourceTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-tag-option"), + copySourceTags.toString()); + } + if (fileRequestIntent != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-file-request-intent"), + fileRequestIntent.toString()); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return copyFromUrlWithResponseInternal(copySource, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Synchronously copies a blob from a source URL to the destination blob. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono copyFromUrl(String copySource) { + // Generated convenience method for copyFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return copyFromUrlWithResponseInternal(copySource, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Aborts a pending asynchronous copy operation and leaves a destination blob with zero length and full metadata. + * + * @param copyId The ID of the copy to be aborted. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> abortCopyFromUrlWithResponse(String copyId, + Integer timeout, String leaseId, RequestOptions requestOptions) { + // Generated convenience method for abortCopyFromUrlWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + return abortCopyFromUrlWithResponseInternal(copyId, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsAbortCopyFromUrlHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Aborts a pending asynchronous copy operation and leaves a destination blob with zero length and full metadata. + * + * @param copyId The ID of the copy to be aborted. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono abortCopyFromUrl(String copyId, Integer timeout, String leaseId) { + // Generated convenience method for abortCopyFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + return abortCopyFromUrlWithResponseInternal(copyId, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Aborts a pending asynchronous copy operation and leaves a destination blob with zero length and full metadata. + * + * @param copyId The ID of the copy to be aborted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono abortCopyFromUrl(String copyId) { + // Generated convenience method for abortCopyFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return abortCopyFromUrlWithResponseInternal(copyId, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Sets the tier of the specified blob. + * + * @param tier Indicates the tier to be set on the blob. + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of 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 rehydratePriority The priority of the rehydration operation. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setTierWithResponse(AccessTier tier, String snapshot, + String versionId, Integer timeout, RehydratePriority rehydratePriority, String leaseId, String ifTags, + RequestOptions requestOptions) { + // Generated convenience method for setTierWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (rehydratePriority != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-rehydrate-priority"), + rehydratePriority.toString()); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + return setTierWithResponseInternal(tier.toString(), requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsSetTierHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Sets the tier of the specified blob. + * + * @param tier Indicates the tier to be set on the blob. + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of 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 rehydratePriority The priority of the rehydration operation. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setTier(AccessTier tier, String snapshot, String versionId, Integer timeout, + RehydratePriority rehydratePriority, String leaseId, String ifTags) { + // Generated convenience method for setTierWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (rehydratePriority != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-rehydrate-priority"), + rehydratePriority.toString()); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + return setTierWithResponseInternal(tier.toString(), requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Sets the tier of the specified blob. + * + * @param tier Indicates the tier to be set on the blob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setTier(AccessTier tier) { + // Generated convenience method for setTierWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return setTierWithResponseInternal(tier.toString(), requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Returns information about 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAccountInfoWithResponse(Integer timeout, + RequestOptions requestOptions) { + // Generated convenience method for getAccountInfoWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return getAccountInfoWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsGetAccountInfoHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Returns information about 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>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAccountInfo(Integer timeout) { + // Generated convenience method for getAccountInfoWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return getAccountInfoWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Returns information about the storage account. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAccountInfo() { + // Generated convenience method for getAccountInfoWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getAccountInfoWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Gets the tags of the specified 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 snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of the blob. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param ifModifiedSince Specify this value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param ifMatch Specify this value to operate only on a blob with a matching Etag value. + * @param ifNoneMatch Specify this value to operate only on a blob with a non-matching Etag value. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the tags of the specified blob along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTagsWithResponse(Integer timeout, String snapshot, + String versionId, String leaseId, String ifTags, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, RequestOptions requestOptions) { + // Generated convenience method for getTagsWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-modified-since"), + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-match"), ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-none-match"), ifNoneMatch); + } + return getTagsWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(BlobTags.class, XML_SERIALIZER), + new BlobsGetTagsHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Gets the tags of the specified 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 snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of the blob. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param ifModifiedSince Specify this value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param ifMatch Specify this value to operate only on a blob with a matching Etag value. + * @param ifNoneMatch Specify this value to operate only on a blob with a non-matching Etag value. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the tags of the specified blob on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTags(Integer timeout, String snapshot, String versionId, String leaseId, String ifTags, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch) { + // Generated convenience method for getTagsWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-modified-since"), + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-match"), ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-none-match"), ifNoneMatch); + } + return getTagsWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(BlobTags.class, XML_SERIALIZER)); + } + + /** + * Gets the tags of the specified blob. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the tags of the specified blob on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTags() { + // Generated convenience method for getTagsWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getTagsWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(BlobTags.class, XML_SERIALIZER)); + } + + /** + * Sets the tags of the specified blob. + * + * @param tags The blob tags. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 Specifies the version ID of the blob. + * @param transactionalContentMd5 Specifies the transactional MD5 hash for the body. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the body. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param ifMatch Specify this value to operate only on a blob with a matching Etag value. + * @param ifNoneMatch Specify this value to operate only on a blob with a non-matching Etag value. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setTagsWithResponse(BlobTags tags, Integer timeout, + String versionId, byte[] transactionalContentMd5, byte[] transactionalContentCrc64, String ifTags, + String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, + String ifNoneMatch, RequestOptions requestOptions) { + // Generated convenience method for setTagsWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (transactionalContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-modified-since"), + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-match"), ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-none-match"), ifNoneMatch); + } + return setTagsWithResponseInternal(BinaryData.fromObject(tags, XML_SERIALIZER), requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlobsSetTagsHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Sets the tags of the specified blob. + * + * @param tags The blob tags. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 Specifies the version ID of the blob. + * @param transactionalContentMd5 Specifies the transactional MD5 hash for the body. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the body. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param ifMatch Specify this value to operate only on a blob with a matching Etag value. + * @param ifNoneMatch Specify this value to operate only on a blob with a non-matching Etag value. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setTags(BlobTags tags, Integer timeout, String versionId, byte[] transactionalContentMd5, + byte[] transactionalContentCrc64, String ifTags, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch) { + // Generated convenience method for setTagsWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (transactionalContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-modified-since"), + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-match"), ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-none-match"), ifNoneMatch); + } + return setTagsWithResponseInternal(BinaryData.fromObject(tags, XML_SERIALIZER), requestOptions) + .flatMap(FluxUtil::toMono); + } + + /** + * Sets the tags of the specified blob. + * + * @param tags The blob tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setTags(BlobTags tags) { + // Generated convenience method for setTagsWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return setTagsWithResponseInternal(BinaryData.fromObject(tags, XML_SERIALIZER), requestOptions) + .flatMap(FluxUtil::toMono); + } + + /** + * The Get Blob Layout operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. In addition, it may optionally return the layout of the blob. + * + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of the blob. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 Specifies the range of the blob to operate on. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Get Blob Layout API along with {@link ResponseBase} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getLayoutWithResponse(String snapshot, + String versionId, String marker, Integer maxresults, Integer timeout, String range, String leaseId, + String ifTags, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for getLayoutWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (range != null) { + requestOptions.setHeader(HttpHeaderName.RANGE, range); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + return getLayoutWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), + protocolMethodResponse.getStatusCode() == 204 + ? null + : protocolMethodResponse.getValue().toObject(BlobLayoutInternal.class, XML_SERIALIZER), + new BlobsGetLayoutHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * The Get Blob Layout operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. In addition, it may optionally return the layout of the blob. + * + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of the blob. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 Specifies the range of the blob to operate on. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Get Blob Layout API on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getLayout(String snapshot, String versionId, String marker, Integer maxresults, + Integer timeout, String range, String leaseId, String ifTags, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, RequestConditions requestConditions) { + // Generated convenience method for getLayoutWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (range != null) { + requestOptions.setHeader(HttpHeaderName.RANGE, range); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + return getLayoutWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(BlobLayoutInternal.class, XML_SERIALIZER)); + } + + /** + * The Get Blob Layout operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. In addition, it may optionally return the layout of the blob. + * + * @throws BlobStorageErrorException 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 the Get Blob Layout API on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getLayout() { + // Generated convenience method for getLayoutWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getLayoutWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(BlobLayoutInternal.class, XML_SERIALIZER)); + } + + /** + * Queries the data of the specified blob with the provided query expressions. + * + * @param queryRequest The query request. + * @param snapshot Specifies the snapshot of 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> queryWithResponse(QueryRequest queryRequest, + String snapshot, Integer timeout, String leaseId, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String ifTags, RequestConditions requestConditions, + RequestOptions requestOptions) { + // Generated convenience method for queryWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return queryWithResponseInternal(BinaryData.fromObject(queryRequest, XML_SERIALIZER), requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue(), new BlobsQueryHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Queries the data of the specified blob with the provided query expressions. + * + * @param queryRequest The query request. + * @param snapshot Specifies the snapshot of 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono query(QueryRequest queryRequest, String snapshot, Integer timeout, String leaseId, + String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String ifTags, + RequestConditions requestConditions) { + // Generated convenience method for queryWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return queryWithResponseInternal(BinaryData.fromObject(queryRequest, XML_SERIALIZER), requestOptions) + .flatMap(FluxUtil::toMono); + } + + /** + * Queries the data of the specified blob with the provided query expressions. + * + * @param queryRequest The query request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono query(QueryRequest queryRequest) { + // Generated convenience method for queryWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return queryWithResponseInternal(BinaryData.fromObject(queryRequest, XML_SERIALIZER), requestOptions) + .flatMap(FluxUtil::toMono); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobClientInternal.java new file mode 100644 index 0000000000000..212574ef7c7a6 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobClientInternal.java @@ -0,0 +1,5446 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. +package com.azure.storage.blob.implementation; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.RequestConditions; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; +import com.azure.core.util.Base64Util; +import com.azure.core.util.BinaryData; +import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.serializer.ObjectSerializer; +import com.azure.storage.blob.implementation.models.BlobCopySourceTags; +import com.azure.storage.blob.implementation.models.BlobDeleteType; +import com.azure.storage.blob.implementation.models.BlobExpiryOptions; +import com.azure.storage.blob.implementation.models.BlobLayoutInternal; +import com.azure.storage.blob.implementation.models.BlobStorageErrorException; +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; +import com.azure.storage.blob.implementation.models.BlobsChangeLeaseHeaders; +import com.azure.storage.blob.implementation.models.BlobsCopyFromUrlHeaders; +import com.azure.storage.blob.implementation.models.BlobsCreateSnapshotHeaders; +import com.azure.storage.blob.implementation.models.BlobsDeleteHeaders; +import com.azure.storage.blob.implementation.models.BlobsDeleteImmutabilityPolicyHeaders; +import com.azure.storage.blob.implementation.models.BlobsDownloadHeaders; +import com.azure.storage.blob.implementation.models.BlobsGetAccountInfoHeaders; +import com.azure.storage.blob.implementation.models.BlobsGetLayoutHeaders; +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.BlobsReleaseLeaseHeaders; +import com.azure.storage.blob.implementation.models.BlobsRenewLeaseHeaders; +import com.azure.storage.blob.implementation.models.BlobsSetExpiryHeaders; +import com.azure.storage.blob.implementation.models.BlobsSetHttpHeadersHeaders; +import com.azure.storage.blob.implementation.models.BlobsSetImmutabilityPolicyHeaders; +import com.azure.storage.blob.implementation.models.BlobsSetLegalHoldHeaders; +import com.azure.storage.blob.implementation.models.BlobsSetMetadataHeaders; +import com.azure.storage.blob.implementation.models.BlobsSetTagsHeaders; +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.QueryRequest; +import com.azure.storage.blob.models.AccessTier; +import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; +import com.azure.storage.blob.models.DeleteSnapshotsOptionType; +import com.azure.storage.blob.models.EncryptionAlgorithmType; +import com.azure.storage.blob.models.FileShareTokenIntent; +import com.azure.storage.blob.models.RehydratePriority; +import java.time.OffsetDateTime; +import java.util.Map; + +/** + * Initializes a new instance of the synchronous AzureBlobStorage type. + */ +public final class BlobClientInternal { + + @Generated + private static final ObjectSerializer XML_SERIALIZER = XmlSerializerProviders.createInstance(); + + @Generated + private final BlobsImpl serviceClient; + + /** + * Initializes an instance of BlobClientInternal class. + * + * @param serviceClient the service client implementation. + */ + @Generated + public BlobClientInternal(BlobsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Downloads the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
RangeStringNoSpecifies the range of the blob to operate on.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-range-get-content-md5BooleanNoWhen set to true and specified together + * with the `Range` header, the service returns the MD5 hash for the range, as long as the range is less than or + * equal to 4 MiB in size.
x-ms-range-get-content-crc64BooleanNoWhen set to true and the request includes + * a Range header, the service returns the CRC64 hash for the range, as long as the range is less than or equal to 4 + * MiB in size.
x-ms-structured-bodyStringNoSpecifies the response content should be returned + * as a structured message and specifies the message schema version and properties.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
x-ms-metaMap<String, String>The metadata headers.
x-ms-orMap<String, String>The object replication status headers.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-creation-timeOffsetDateTimeThe date-time the blob was created.
x-ms-or-policy-idStringThe object replication policy ID.
Content-LengthlongThe number of bytes present in the response body.
Content-RangeStringIndicates the range of bytes returned in this response.
ETagStringAn opaque identifier for the current state of the resource.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
Content-EncodingStringThe Content-Encoding of the blob.
Cache-ControlStringThe Cache-Control of the blob.
Content-DispositionStringThe Content-Disposition of the blob.
Content-LanguageStringThe Content-Language of the blob.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
x-ms-blob-typeStringThe type of the blob.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-copy-completion-timeOffsetDateTimeIf this blob was the destination of a copy, + * specifies the completion time of the last attempted copy operation.
x-ms-copy-status-descriptionStringIf this blob was the destination of a copy, specifies + * the cause of the copy operation failure.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-progressStringIf this blob was the destination of a copy, specifies the + * number of bytes copied and the total bytes in the source.
x-ms-copy-statusStringStatus of the copy operation.
x-ms-copy-sourceStringIf this blob was the destination of a copy, specifies the source + * URL.
x-ms-lease-durationStringSpecifies the duration of the lease.
x-ms-lease-stateStringThe lease state of the blob.
x-ms-lease-statusStringThe lease status of the blob.
x-ms-version-idStringThe version ID of the blob.
x-ms-is-current-versionbooleanIndicates whether this is the current version of the + * blob.
Accept-RangesStringIndicates that the service supports requests for partial blob + * content.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-blob-content-md5byte[]MD5 hash of the full blob content only returned for ranged + * reads. This is the hash of the complete blob, not just the requested range.
x-ms-tag-countlongThe number of tags associated with the blob.
x-ms-blob-sealedbooleanWhether the blob is sealed.
x-ms-last-access-timeOffsetDateTimeThe date-time value that indicates the time at which + * the blob was last read or written.
x-ms-immutability-policy-until-dateOffsetDateTimeThe date-time that indicates the time + * at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringIndicates the immutability policy mode of the + * blob.
x-ms-legal-holdbooleanIndicates whether the blob has a legal hold.
x-ms-structured-bodyStringIndicates if the response body contains a structured message + * and specifies the message schema version and properties.
x-ms-structured-content-lengthlongThe length of the blob/file content inside the + * message body when the response body is returned as a structured message. Will always be smaller than + * Content-Length.
x-ms-access-tierStringThe access tier of the blob.
x-ms-access-tier-inferredbooleanIncluded if the access tier is inferred.
x-ms-access-tier-change-timeOffsetDateTimeThe time the tier was changed on the blob. + * This is only returned if the tier on the blob was ever set.
x-ms-smart-access-tierStringThe underlying tier of a smart tier blob. Only returned if + * the blob is in Smart tier.
x-ms-download-hintStringIndicates the download hint for the blob.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response downloadWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.downloadWithResponseInternal(requestOptions); + } + + /** + * Returns all user-defined metadata, standard HTTP properties, and system properties for the specified blob. It + * does not return the content of the blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Content-TypeStringContent-type.
x-ms-metaMap<String, String>The metadata headers.
x-ms-orMap<String, String>The object replication status headers.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-creation-timeOffsetDateTimeThe date-time the blob was created.
x-ms-or-policy-idStringThe object replication policy ID.
x-ms-blob-typeStringThe type of the blob.
x-ms-copy-completion-timeOffsetDateTimeIf this blob was the destination of a copy, + * specifies the completion time of the last attempted copy operation.
x-ms-copy-status-descriptionStringIf this blob was the destination of a copy, specifies + * the cause of the copy operation failure.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-progressStringIf this blob was the destination of a copy, specifies the + * number of bytes copied and the total bytes in the source.
x-ms-copy-statusStringStatus of the copy operation.
x-ms-copy-sourceStringIf this blob was the destination of a copy, specifies the source + * URL.
x-ms-incremental-copybooleanIncluded if the blob is incremental copy blob.
x-ms-copy-destination-snapshotStringIncluded if the blob is incremental copy blob or + * incremental copy snapshot, if x-ms-copy-status is success.
x-ms-lease-durationStringSpecifies the duration of the lease.
x-ms-lease-stateStringThe lease state of the blob.
x-ms-lease-statusStringThe lease status of the blob.
Content-LengthlongThe number of bytes present in the response body.
ETagStringAn opaque identifier for the current state of the resource.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
Content-EncodingStringThe Content-Encoding of the blob.
Content-DispositionStringThe Content-Disposition of the blob.
Content-LanguageStringThe Content-Language of the blob.
Cache-ControlStringThe Cache-Control of the blob.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
Accept-RangesStringIndicates that the service supports requests for partial blob + * content.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-access-tierStringThe access tier of the blob.
x-ms-access-tier-inferredbooleanIncluded if the access tier is inferred.
x-ms-archive-statusStringIncluded if the blob rehydrate operation is pending. Indicates + * the destination tier.
x-ms-access-tier-change-timeOffsetDateTimeThe time the tier was changed on the blob. + * This is only returned if the tier on the blob was ever set.
x-ms-smart-access-tierStringThe underlying tier of a smart tier blob. Only returned if + * the blob is in Smart tier.
x-ms-version-idStringThe version ID of the blob.
x-ms-is-current-versionbooleanIndicates whether this is the current version of the + * blob.
x-ms-tag-countlongThe number of tags associated with the blob.
x-ms-expiry-timeOffsetDateTimeThe date-time this blob will expire.
x-ms-blob-sealedbooleanWhether the blob is sealed.
x-ms-rehydrate-priorityStringThe priority of the rehydration operation.
x-ms-last-access-timeOffsetDateTimeThe date-time value that indicates the time at which + * the blob was last read or written.
x-ms-immutability-policy-until-dateOffsetDateTimeThe date-time that indicates the time + * at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringIndicates the immutability policy mode of the + * blob.
x-ms-legal-holdbooleanIndicates whether the blob has a legal hold.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPropertiesWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getPropertiesWithResponseInternal(requestOptions); + } + + /** + * Deletes the specified blob. If blob soft delete is enabled, the blob is marked for deletion and can be recovered + * until the retention period expires. + *

Query Parameters

+ * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
deletetypeStringNoThe delete type. Allowed values: "Permanent".
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-delete-snapshotsStringNoRequired if the blob has associated snapshots. + * Specifies the delete behavior. Allowed values: "only", "include".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-access-tier-if-modified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if the access-tier has been modified since the specified date-time.
x-ms-access-tier-if-unmodified-sinceOffsetDateTimeNoSpecify this header value + * to operate only on a blob if the access-tier has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponseInternal(requestOptions); + } + + /** + * Undelete the specified previously soft deleted blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response undeleteWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.undeleteWithResponseInternal(requestOptions); + } + + /** + * Set the expiration time of the specified blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-expiry-timeOffsetDateTimeNoThe date-time this blob will expire.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param expiryOptions Indicates the mode of the expiry time. Allowed values: "NeverExpire", "RelativeToCreation", + * "RelativeToNow", "Absolute". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response setExpiryWithResponseInternal(String expiryOptions, RequestOptions requestOptions) { + return this.serviceClient.setExpiryWithResponseInternal(expiryOptions, requestOptions); + } + + /** + * Sets system properties on the specified blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response setHttpHeadersWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.setHttpHeadersWithResponseInternal(requestOptions); + } + + /** + * Set the immutability policy on the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-immutability-policy-until-dateOffsetDateTimeThe date-time that indicates the time + * at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringIndicates the immutability policy mode of the + * blob.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param expiry The date-time that indicates the time at which the blob immutability policy will expire. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response setImmutabilityPolicyWithResponseInternal(OffsetDateTime expiry, RequestOptions requestOptions) { + return this.serviceClient.setImmutabilityPolicyWithResponseInternal(expiry, requestOptions); + } + + /** + * Deletes the immutability policy on the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteImmutabilityPolicyWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.deleteImmutabilityPolicyWithResponseInternal(requestOptions); + } + + /** + * Sets a legal hold on the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-legal-holdbooleanIndicates whether the blob has a legal hold.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param legalHold Indicates whether the blob has a legal hold. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response setLegalHoldWithResponseInternal(boolean legalHold, RequestOptions requestOptions) { + return this.serviceClient.setLegalHoldWithResponseInternal(legalHold, requestOptions); + } + + /** + * Sets user-defined metadata for the specified blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response setMetadataWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.setMetadataWithResponseInternal(requestOptions); + } + + /** + * Requests a new lease on the specified blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-proposed-lease-idStringNoThe proposed lease ID for the lease.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-lease-idStringUniquely identifies a blob's lease.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response acquireLeaseWithResponseInternal(int duration, RequestOptions requestOptions) { + return this.serviceClient.acquireLeaseWithResponseInternal(duration, requestOptions); + } + + /** + * Frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the + * blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response releaseLeaseWithResponseInternal(String leaseId, RequestOptions requestOptions) { + return this.serviceClient.releaseLeaseWithResponseInternal(leaseId, requestOptions); + } + + /** + * Renews an existing lease. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-lease-idStringUniquely identifies a blob's lease.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response renewLeaseWithResponseInternal(String leaseId, RequestOptions requestOptions) { + return this.serviceClient.renewLeaseWithResponseInternal(leaseId, requestOptions); + } + + /** + * Change the ID of an existing lease. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-lease-idStringUniquely identifies a blob's lease.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response changeLeaseWithResponseInternal(String leaseId, String proposedLeaseId, + RequestOptions requestOptions) { + return this.serviceClient.changeLeaseWithResponseInternal(leaseId, proposedLeaseId, requestOptions); + } + + /** + * Ends a lease and ensures that another client can't acquire a new lease until the current lease period has + * expired. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-break-periodIntegerNoProposed 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.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-lease-timeintApproximate time remaining in the lease period, in seconds.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response breakLeaseWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.breakLeaseWithResponseInternal(requestOptions); + } + + /** + * Creates a read-only snapshot of the specified blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-snapshotStringUniquely identifies the snapshot and indicates the snapshot + * version.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response createSnapshotWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.createSnapshotWithResponseInternal(requestOptions); + } + + /** + * Starts an asynchronous copy from a source URL to a destination blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-access-tierStringNoThe tier to be set on the blob. Allowed values: "P4", + * "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", + * "Smart".
x-ms-rehydrate-priorityStringNoThe priority of the rehydration operation. + * Allowed values: "High", "Standard".
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
x-ms-source-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to + * operate only on a source blob with matching tags.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-tagsStringNoThe blob tags.
x-ms-seal-blobBooleanNoOverrides the sealed state of the destination + * blob.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-version-idStringThe version ID of the blob.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-statusStringStatus of the copy operation.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response startCopyFromUrlWithResponseInternal(String copySource, RequestOptions requestOptions) { + return this.serviceClient.startCopyFromUrlWithResponseInternal(copySource, requestOptions); + } + + /** + * Synchronously copies a blob from a source URL to the destination blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-access-tierStringNoThe tier to be set on the blob. Allowed values: "P4", + * "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", + * "Smart".
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-source-content-md5byte[]NoSpecifies the MD5 hash calculated for the range + * of bytes that must be read from the copy source.
x-ms-tagsStringNoThe blob tags.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is + * supported, and the value must be a valid OAuth access token for the copy source.
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-copy-source-tag-optionStringNoIndicates if source tags should be copied + * or replaced with the tags specified. Default is 'Replace'. Allowed values: "REPLACE", "COPY".
x-ms-file-request-intentStringNoSpecifies the file request token intent. + * Allowed values: "backup".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-version-idStringThe version ID of the blob.
x-ms-copy-idStringIdentifier for this copy operation.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response copyFromUrlWithResponseInternal(String copySource, RequestOptions requestOptions) { + return this.serviceClient.copyFromUrlWithResponseInternal(copySource, requestOptions); + } + + /** + * Aborts a pending asynchronous copy operation and leaves a destination blob with zero length and full metadata. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param copyId The ID of the copy to be aborted. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response abortCopyFromUrlWithResponseInternal(String copyId, RequestOptions requestOptions) { + return this.serviceClient.abortCopyFromUrlWithResponseInternal(copyId, requestOptions); + } + + /** + * Sets the tier of the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-rehydrate-priorityStringNoThe priority of the rehydration operation. + * Allowed values: "High", "Standard".
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param tier Indicates the tier to be set on the blob. Allowed values: "P4", "P6", "P10", "P15", "P20", "P30", + * "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", "Smart". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response setTierWithResponseInternal(String tier, RequestOptions requestOptions) { + return this.serviceClient.setTierWithResponseInternal(tier, requestOptions); + } + + /** + * Returns information about the storage account. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-account-kindStringThe account kind.
x-ms-sku-nameStringThe SKU name of the account.
x-ms-is-hns-enabledbooleanIndicates if the account has a hierarchical namespace + * enabled.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAccountInfoWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getAccountInfoWithResponseInternal(requestOptions); + } + + /** + * Gets the tags of the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-blob-if-modified-sinceOffsetDateTimeNoSpecify this value to operate only + * on a blob if it has been modified since the specified date-time.
x-ms-blob-if-unmodified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a blob if it has not been modified since the specified date-time.
x-ms-blob-if-matchStringNoSpecify this value to operate only on a blob with a + * matching Etag value.
x-ms-blob-if-none-matchStringNoSpecify this value to operate only on a blob + * with a non-matching Etag value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     TagSet (Required): [
+     *          (Required){
+     *             Key: String (Required)
+     *             Value: String (Required)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the tags of the specified blob along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response getTagsWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getTagsWithResponseInternal(requestOptions); + } + + /** + * Sets the tags of the specified blob. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
versionidStringNoSpecifies the version ID of the blob.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-if-modified-sinceOffsetDateTimeNoSpecify this value to operate only + * on a blob if it has been modified since the specified date-time.
x-ms-blob-if-unmodified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a blob if it has not been modified since the specified date-time.
x-ms-blob-if-matchStringNoSpecify this value to operate only on a blob with a + * matching Etag value.
x-ms-blob-if-none-matchStringNoSpecify this value to operate only on a blob + * with a non-matching Etag value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     TagSet (Required): [
+     *          (Required){
+     *             Key: String (Required)
+     *             Value: String (Required)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param tags The blob tags. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response setTagsWithResponseInternal(BinaryData tags, RequestOptions requestOptions) { + return this.serviceClient.setTagsWithResponseInternal(tags, requestOptions); + } + + /** + * The Get Blob Layout operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. In addition, it may optionally return the layout of the blob. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
RangeStringNoSpecifies the range of the blob to operate on.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     Ranges (Optional): {
+     *         Range (Optional): [
+     *              (Optional){
+     *                 Start: long (Required)
+     *                 End: long (Required)
+     *                 EndpointIndex: int (Required)
+     *             }
+     *         ]
+     *     }
+     *     Endpoints (Optional): {
+     *         Endpoint (Optional): [
+     *              (Optional){
+     *                 Index: int (Required)
+     *                 Value: String (Required)
+     *             }
+     *         ]
+     *     }
+     *     Marker: String (Optional)
+     *     NextMarker: String (Optional)
+     *     MaxResults: Integer (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-blob-content-lengthlongThe size of the blob in bytes.
x-ms-blob-content-typeStringThe Content-Type of the blob.
x-ms-blob-content-encodingStringThe Content-Encoding of the blob.
x-ms-blob-content-md5byte[]MD5 hash of the full blob content only returned for ranged + * reads. This is the hash of the complete blob, not just the requested range.
x-ms-blob-creation-timeOffsetDateTimeThe date-time the blob was created.
x-ms-creation-timeOffsetDateTimeThe date-time the blob was created.
x-ms-metaMap<String, String>The metadata headers.
x-ms-or-policy-idStringThe object replication policy ID.
x-ms-orMap<String, String>The object replication status headers.
x-ms-blob-typeStringThe type of the blob.
x-ms-copy-completion-timeOffsetDateTimeIf this blob was the destination of a copy, + * specifies the completion time of the last attempted copy operation.
x-ms-copy-status-descriptionStringIf this blob was the destination of a copy, specifies + * the cause of the copy operation failure.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-progressStringIf this blob was the destination of a copy, specifies the + * number of bytes copied and the total bytes in the source.
x-ms-copy-sourceStringIf this blob was the destination of a copy, specifies the source + * URL.
x-ms-copy-statusStringStatus of the copy operation.
x-ms-incremental-copybooleanIncluded if the blob is incremental copy blob.
x-ms-copy-destination-snapshotStringIncluded if the blob is incremental copy blob or + * incremental copy snapshot, if x-ms-copy-status is success.
x-ms-lease-durationStringSpecifies the duration of the lease.
x-ms-lease-stateStringThe lease state of the blob.
x-ms-lease-statusStringThe lease status of the blob.
Content-LengthlongThe number of bytes present in the response body.
ETagStringAn opaque identifier for the current state of the resource.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
Content-EncodingStringThe Content-Encoding of the blob.
Content-DispositionStringThe Content-Disposition of the blob.
Content-LanguageStringThe Content-Language of the blob.
Cache-ControlStringThe Cache-Control of the blob.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
Accept-RangesStringIndicates that the service supports requests for partial blob + * content.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-access-tierStringThe access tier of the blob.
x-ms-access-tier-inferredbooleanIncluded if the access tier is inferred.
x-ms-smart-access-tierStringThe underlying tier of a smart tier blob. Only returned if + * the blob is in Smart tier.
x-ms-archive-statusStringIncluded if the blob rehydrate operation is pending. Indicates + * the destination tier.
x-ms-access-tier-change-timeOffsetDateTimeThe time the tier was changed on the blob. + * This is only returned if the tier on the blob was ever set.
x-ms-version-idStringThe version ID of the blob.
x-ms-is-current-versionbooleanIndicates whether this is the current version of the + * blob.
x-ms-tag-countlongThe number of tags associated with the blob.
x-ms-expiry-timeOffsetDateTimeThe date-time this blob will expire.
x-ms-blob-sealedbooleanWhether the blob is sealed.
x-ms-rehydrate-priorityStringThe priority of the rehydration operation.
x-ms-last-access-timeOffsetDateTimeThe date-time value that indicates the time at which + * the blob was last read or written.
x-ms-immutability-policy-until-dateOffsetDateTimeThe date-time that indicates the time + * at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringIndicates the immutability policy mode of the + * blob.
x-ms-legal-holdbooleanIndicates whether the blob has a legal hold.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the Get Blob Layout API along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response getLayoutWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getLayoutWithResponseInternal(requestOptions); + } + + /** + * Queries the data of the specified blob with the provided query expressions. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     QueryType: String(SQL) (Required)
+     *     Expression: String (Required)
+     *     InputSerialization (Optional): {
+     *         Format (Required): {
+     *             Type: String(delimited/json/arrow/parquet) (Required)
+     *             DelimitedTextConfiguration (Optional): {
+     *                 ColumnSeparator: String (Optional)
+     *                 FieldQuote: String (Optional)
+     *                 RecordSeparator: String (Optional)
+     *                 EscapeChar: String (Optional)
+     *                 HasHeaders: Boolean (Optional)
+     *             }
+     *             JsonTextConfiguration (Optional): {
+     *                 RecordSeparator: String (Optional)
+     *             }
+     *             ArrowConfiguration (Optional): {
+     *                 Schema (Required): [
+     *                      (Required){
+     *                         Type: String (Required)
+     *                         Name: String (Optional)
+     *                         Precision: Integer (Optional)
+     *                         Scale: Integer (Optional)
+     *                     }
+     *                 ]
+     *             }
+     *             ParquetTextConfiguration (Optional): {
+     *             }
+     *         }
+     *     }
+     *     OutputSerialization (Optional): (recursive schema, see OutputSerialization above)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-metaMap<String, String>The metadata headers.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-LengthlongThe number of bytes present in the response body.
Content-RangeStringIndicates the range of bytes returned in this response.
ETagStringAn opaque identifier for the current state of the resource.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
Content-EncodingStringThe Content-Encoding of the blob.
Cache-ControlStringThe Cache-Control of the blob.
Content-DispositionStringThe Content-Disposition of the blob.
Content-LanguageStringThe Content-Language of the blob.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
x-ms-blob-typeStringThe type of the blob.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-copy-completion-timeOffsetDateTimeIf this blob was the destination of a copy, + * specifies the completion time of the last attempted copy operation.
x-ms-copy-status-descriptionStringIf this blob was the destination of a copy, specifies + * the cause of the copy operation failure.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-progressStringIf this blob was the destination of a copy, specifies the + * number of bytes copied and the total bytes in the source.
x-ms-copy-sourceStringIf this blob was the destination of a copy, specifies the source + * URL.
x-ms-copy-statusStringStatus of the copy operation.
x-ms-lease-durationStringSpecifies the duration of the lease.
x-ms-lease-stateStringThe lease state of the blob.
x-ms-lease-statusStringThe lease status of the blob.
Accept-RangesStringIndicates that the service supports requests for partial blob + * content.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-blob-content-md5byte[]MD5 hash of the full blob content only returned for ranged + * reads. This is the hash of the complete blob, not just the requested range.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param queryRequest The query request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response queryWithResponseInternal(BinaryData queryRequest, RequestOptions requestOptions) { + return this.serviceClient.queryWithResponseInternal(queryRequest, requestOptions); + } + + /** + * Downloads the specified blob. + * + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of 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 range Specifies the range of the blob to operate on. + * @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` header, the service returns + * the MD5 hash for the range, as long as the range is less than or equal to 4 MiB in size. + * @param rangeGetContentCrc64 When set to true and the request includes a Range header, the service returns the + * CRC64 hash for the range, as long as the range is less than or equal to 4 MiB in size. + * @param structuredBodyType Specifies the response content should be returned as a structured message and specifies + * the message schema version and properties. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase downloadWithResponse(String snapshot, String versionId, + Integer timeout, String range, String leaseId, Boolean rangeGetContentMd5, Boolean rangeGetContentCrc64, + String structuredBodyType, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String ifTags, RequestConditions requestConditions, + RequestOptions requestOptions) { + // Generated convenience method for downloadWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (range != null) { + requestOptions.setHeader(HttpHeaderName.RANGE, range); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (rangeGetContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range-get-content-md5"), + String.valueOf(rangeGetContentMd5)); + } + if (rangeGetContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range-get-content-crc64"), + String.valueOf(rangeGetContentCrc64)); + } + if (structuredBodyType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-body"), structuredBodyType); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = downloadWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), protocolMethodResponse.getValue(), + new BlobsDownloadHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Downloads the specified blob. + * + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of 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 range Specifies the range of the blob to operate on. + * @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` header, the service returns + * the MD5 hash for the range, as long as the range is less than or equal to 4 MiB in size. + * @param rangeGetContentCrc64 When set to true and the request includes a Range header, the service returns the + * CRC64 hash for the range, as long as the range is less than or equal to 4 MiB in size. + * @param structuredBodyType Specifies the response content should be returned as a structured message and specifies + * the message schema version and properties. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BinaryData download(String snapshot, String versionId, Integer timeout, String range, String leaseId, + Boolean rangeGetContentMd5, Boolean rangeGetContentCrc64, String structuredBodyType, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String ifTags, + RequestConditions requestConditions) { + // Generated convenience method for downloadWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (range != null) { + requestOptions.setHeader(HttpHeaderName.RANGE, range); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (rangeGetContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range-get-content-md5"), + String.valueOf(rangeGetContentMd5)); + } + if (rangeGetContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range-get-content-crc64"), + String.valueOf(rangeGetContentCrc64)); + } + if (structuredBodyType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-body"), structuredBodyType); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return downloadWithResponseInternal(requestOptions).getValue(); + } + + /** + * Downloads the specified blob. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BinaryData download() { + // Generated convenience method for downloadWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return downloadWithResponseInternal(requestOptions).getValue(); + } + + /** + * Returns all user-defined metadata, standard HTTP properties, and system properties for the specified blob. It + * does not return the content of the blob. + * + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getPropertiesWithResponse(String snapshot, String versionId, + Integer timeout, String leaseId, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String ifTags, RequestConditions requestConditions, + RequestOptions requestOptions) { + // Generated convenience method for getPropertiesWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = getPropertiesWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new BlobsGetPropertiesHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Returns all user-defined metadata, standard HTTP properties, and system properties for the specified blob. It + * does not return the content of the blob. + * + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void getProperties(String snapshot, String versionId, Integer timeout, String leaseId, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String ifTags, + RequestConditions requestConditions) { + // Generated convenience method for getPropertiesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + getPropertiesWithResponseInternal(requestOptions).getValue(); + } + + /** + * Returns all user-defined metadata, standard HTTP properties, and system properties for the specified blob. It + * does not return the content of the blob. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void getProperties() { + // Generated convenience method for getPropertiesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + getPropertiesWithResponseInternal(requestOptions).getValue(); + } + + /** + * Deletes the specified blob. If blob soft delete is enabled, the blob is marked for deletion and can be recovered + * until the retention period expires. + * + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of 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 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. Specifies the delete behavior. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobDeleteType The delete type. + * @param accessTierIfModifiedSince Specify this header value to operate only on a blob if the access-tier has been + * modified since the specified date-time. + * @param accessTierIfUnmodifiedSince Specify this header value to operate only on a blob if the access-tier has not + * been modified since the specified date-time. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase deleteWithResponse(String snapshot, String versionId, Integer timeout, + String leaseId, DeleteSnapshotsOptionType deleteSnapshots, String ifTags, BlobDeleteType blobDeleteType, + OffsetDateTime accessTierIfModifiedSince, OffsetDateTime accessTierIfUnmodifiedSince, + RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for deleteWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (deleteSnapshots != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-delete-snapshots"), deleteSnapshots.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobDeleteType != null) { + requestOptions.addQueryParam("deletetype", blobDeleteType.toString(), false); + } + if (accessTierIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-access-tier-if-modified-since"), + String.valueOf(new DateTimeRfc1123(accessTierIfModifiedSince))); + } + if (accessTierIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-access-tier-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(accessTierIfUnmodifiedSince))); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = deleteWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, new BlobsDeleteHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Deletes the specified blob. If blob soft delete is enabled, the blob is marked for deletion and can be recovered + * until the retention period expires. + * + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of 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 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. Specifies the delete behavior. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobDeleteType The delete type. + * @param accessTierIfModifiedSince Specify this header value to operate only on a blob if the access-tier has been + * modified since the specified date-time. + * @param accessTierIfUnmodifiedSince Specify this header value to operate only on a blob if the access-tier has not + * been modified since the specified date-time. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String snapshot, String versionId, Integer timeout, String leaseId, + DeleteSnapshotsOptionType deleteSnapshots, String ifTags, BlobDeleteType blobDeleteType, + OffsetDateTime accessTierIfModifiedSince, OffsetDateTime accessTierIfUnmodifiedSince, + RequestConditions requestConditions) { + // Generated convenience method for deleteWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (deleteSnapshots != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-delete-snapshots"), deleteSnapshots.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobDeleteType != null) { + requestOptions.addQueryParam("deletetype", blobDeleteType.toString(), false); + } + if (accessTierIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-access-tier-if-modified-since"), + String.valueOf(new DateTimeRfc1123(accessTierIfModifiedSince))); + } + if (accessTierIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-access-tier-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(accessTierIfUnmodifiedSince))); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + deleteWithResponseInternal(requestOptions).getValue(); + } + + /** + * Deletes the specified blob. If blob soft delete is enabled, the blob is marked for deletion and can be recovered + * until the retention period expires. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete() { + // Generated convenience method for deleteWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + deleteWithResponseInternal(requestOptions).getValue(); + } + + /** + * Undelete the specified previously soft deleted 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase undeleteWithResponse(Integer timeout, + RequestOptions requestOptions) { + // Generated convenience method for undeleteWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + Response protocolMethodResponse = undeleteWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, new BlobsUndeleteHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Undelete the specified previously soft deleted 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>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void undelete(Integer timeout) { + // Generated convenience method for undeleteWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + undeleteWithResponseInternal(requestOptions).getValue(); + } + + /** + * Undelete the specified previously soft deleted blob. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void undelete() { + // Generated convenience method for undeleteWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + undeleteWithResponseInternal(requestOptions).getValue(); + } + + /** + * Set the expiration time of the specified blob. + * + * @param expiryOptions Indicates the 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 expiresOn The date-time this blob will expire. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setExpiryWithResponse(BlobExpiryOptions expiryOptions, + Integer timeout, OffsetDateTime expiresOn, RequestOptions requestOptions) { + // Generated convenience method for setExpiryWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (expiresOn != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-expiry-time"), + String.valueOf(new DateTimeRfc1123(expiresOn))); + } + Response protocolMethodResponse = setExpiryWithResponseInternal(expiryOptions.toString(), requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, new BlobsSetExpiryHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Set the expiration time of the specified blob. + * + * @param expiryOptions Indicates the 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 expiresOn The date-time this blob will expire. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setExpiry(BlobExpiryOptions expiryOptions, Integer timeout, OffsetDateTime expiresOn) { + // Generated convenience method for setExpiryWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (expiresOn != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-expiry-time"), + String.valueOf(new DateTimeRfc1123(expiresOn))); + } + setExpiryWithResponseInternal(expiryOptions.toString(), requestOptions).getValue(); + } + + /** + * Set the expiration time of the specified blob. + * + * @param expiryOptions Indicates the mode of the expiry time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setExpiry(BlobExpiryOptions expiryOptions) { + // Generated convenience method for setExpiryWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + setExpiryWithResponseInternal(expiryOptions.toString(), requestOptions).getValue(); + } + + /** + * Sets system properties on the specified 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 blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setHttpHeadersWithResponse(Integer timeout, + String blobCacheControl, String blobContentType, byte[] blobContentMd5, String blobContentEncoding, + String blobContentLanguage, String leaseId, String blobContentDisposition, String ifTags, + RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for setHttpHeadersWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (blobCacheControl != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (blobContentType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (blobContentEncoding != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = setHttpHeadersWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new BlobsSetHttpHeadersHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Sets system properties on the specified 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 blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setHttpHeaders(Integer timeout, String blobCacheControl, String blobContentType, byte[] blobContentMd5, + String blobContentEncoding, String blobContentLanguage, String leaseId, String blobContentDisposition, + String ifTags, RequestConditions requestConditions) { + // Generated convenience method for setHttpHeadersWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (blobCacheControl != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (blobContentType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (blobContentEncoding != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + setHttpHeadersWithResponseInternal(requestOptions).getValue(); + } + + /** + * Sets system properties on the specified blob. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setHttpHeaders() { + // Generated convenience method for setHttpHeadersWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + setHttpHeadersWithResponseInternal(requestOptions).getValue(); + } + + /** + * Set the immutability policy on the specified blob. + * + * @param expiry The date-time that indicates the time at which the blob immutability policy will expire. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of the blob. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setImmutabilityPolicyWithResponse( + OffsetDateTime expiry, Integer timeout, OffsetDateTime ifUnmodifiedSince, + BlobImmutabilityPolicyMode immutabilityPolicyMode, String snapshot, String versionId, + RequestOptions requestOptions) { + // Generated convenience method for setImmutabilityPolicyWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (immutabilityPolicyMode != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + Response protocolMethodResponse = setImmutabilityPolicyWithResponseInternal(expiry, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new BlobsSetImmutabilityPolicyHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Set the immutability policy on the specified blob. + * + * @param expiry The date-time that indicates the time at which the blob immutability policy will expire. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of the blob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setImmutabilityPolicy(OffsetDateTime expiry, Integer timeout, OffsetDateTime ifUnmodifiedSince, + BlobImmutabilityPolicyMode immutabilityPolicyMode, String snapshot, String versionId) { + // Generated convenience method for setImmutabilityPolicyWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (immutabilityPolicyMode != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + setImmutabilityPolicyWithResponseInternal(expiry, requestOptions).getValue(); + } + + /** + * Set the immutability policy on the specified blob. + * + * @param expiry The date-time that indicates the time at which the blob immutability policy will expire. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setImmutabilityPolicy(OffsetDateTime expiry) { + // Generated convenience method for setImmutabilityPolicyWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + setImmutabilityPolicyWithResponseInternal(expiry, requestOptions).getValue(); + } + + /** + * Deletes the immutability policy on the specified 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 snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of the blob. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase deleteImmutabilityPolicyWithResponse( + Integer timeout, String snapshot, String versionId, RequestOptions requestOptions) { + // Generated convenience method for deleteImmutabilityPolicyWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + Response protocolMethodResponse = deleteImmutabilityPolicyWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new BlobsDeleteImmutabilityPolicyHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Deletes the immutability policy on the specified 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 snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of the blob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteImmutabilityPolicy(Integer timeout, String snapshot, String versionId) { + // Generated convenience method for deleteImmutabilityPolicyWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + deleteImmutabilityPolicyWithResponseInternal(requestOptions).getValue(); + } + + /** + * Deletes the immutability policy on the specified blob. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteImmutabilityPolicy() { + // Generated convenience method for deleteImmutabilityPolicyWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + deleteImmutabilityPolicyWithResponseInternal(requestOptions).getValue(); + } + + /** + * Sets a legal hold on the specified blob. + * + * @param legalHold Indicates whether the blob has a legal hold. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of the blob. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setLegalHoldWithResponse(boolean legalHold, Integer timeout, + String snapshot, String versionId, RequestOptions requestOptions) { + // Generated convenience method for setLegalHoldWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + Response protocolMethodResponse = setLegalHoldWithResponseInternal(legalHold, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new BlobsSetLegalHoldHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Sets a legal hold on the specified blob. + * + * @param legalHold Indicates whether the blob has a legal hold. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of the blob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setLegalHold(boolean legalHold, Integer timeout, String snapshot, String versionId) { + // Generated convenience method for setLegalHoldWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + setLegalHoldWithResponseInternal(legalHold, requestOptions).getValue(); + } + + /** + * Sets a legal hold on the specified blob. + * + * @param legalHold Indicates whether the blob has a legal hold. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setLegalHold(boolean legalHold) { + // Generated convenience method for setLegalHoldWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + setLegalHoldWithResponseInternal(legalHold, requestOptions).getValue(); + } + + /** + * Sets user-defined metadata for the specified 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 metadata The metadata headers. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setMetadataWithResponse(Integer timeout, + Map metadata, String leaseId, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String ifTags, + RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for setMetadataWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (leaseId != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = setMetadataWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new BlobsSetMetadataHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Sets user-defined metadata for the specified 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 metadata The metadata headers. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setMetadata(Integer timeout, Map metadata, String leaseId, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String ifTags, + RequestConditions requestConditions) { + // Generated convenience method for setMetadataWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + setMetadataWithResponseInternal(requestOptions).getValue(); + } + + /** + * Sets user-defined metadata for the specified blob. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setMetadata() { + // Generated convenience method for setMetadataWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + setMetadataWithResponseInternal(requestOptions).getValue(); + } + + /** + * Requests a new lease on the specified blob. + * + * @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. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase acquireLeaseWithResponse(int duration, Integer timeout, + String proposedLeaseId, String ifTags, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for acquireLeaseWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (proposedLeaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-proposed-lease-id"), proposedLeaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = acquireLeaseWithResponseInternal(duration, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new BlobsAcquireLeaseHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Requests a new lease on the specified blob. + * + * @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. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void acquireLease(int duration, Integer timeout, String proposedLeaseId, String ifTags, + RequestConditions requestConditions) { + // Generated convenience method for acquireLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (proposedLeaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-proposed-lease-id"), proposedLeaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + acquireLeaseWithResponseInternal(duration, requestOptions).getValue(); + } + + /** + * Requests a new lease on the specified blob. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void acquireLease(int duration) { + // Generated convenience method for acquireLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + acquireLeaseWithResponseInternal(duration, requestOptions).getValue(); + } + + /** + * Frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the + * blob. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase releaseLeaseWithResponse(String leaseId, Integer timeout, + String ifTags, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for releaseLeaseWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = releaseLeaseWithResponseInternal(leaseId, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new BlobsReleaseLeaseHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the + * blob. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void releaseLease(String leaseId, Integer timeout, String ifTags, RequestConditions requestConditions) { + // Generated convenience method for releaseLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + releaseLeaseWithResponseInternal(leaseId, requestOptions).getValue(); + } + + /** + * Frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the + * blob. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void releaseLease(String leaseId) { + // Generated convenience method for releaseLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + releaseLeaseWithResponseInternal(leaseId, requestOptions).getValue(); + } + + /** + * Renews an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase renewLeaseWithResponse(String leaseId, Integer timeout, + String ifTags, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for renewLeaseWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = renewLeaseWithResponseInternal(leaseId, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, new BlobsRenewLeaseHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Renews an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void renewLease(String leaseId, Integer timeout, String ifTags, RequestConditions requestConditions) { + // Generated convenience method for renewLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + renewLeaseWithResponseInternal(leaseId, requestOptions).getValue(); + } + + /** + * Renews an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void renewLease(String leaseId) { + // Generated convenience method for renewLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + renewLeaseWithResponseInternal(leaseId, requestOptions).getValue(); + } + + /** + * Change the ID of an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase changeLeaseWithResponse(String leaseId, String proposedLeaseId, + Integer timeout, String ifTags, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for changeLeaseWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse + = changeLeaseWithResponseInternal(leaseId, proposedLeaseId, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new BlobsChangeLeaseHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Change the ID of an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void changeLease(String leaseId, String proposedLeaseId, Integer timeout, String ifTags, + RequestConditions requestConditions) { + // Generated convenience method for changeLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + changeLeaseWithResponseInternal(leaseId, proposedLeaseId, requestOptions).getValue(); + } + + /** + * Change the ID of an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param proposedLeaseId The proposed lease ID for the lease. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void changeLease(String leaseId, String proposedLeaseId) { + // Generated convenience method for changeLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + changeLeaseWithResponseInternal(leaseId, proposedLeaseId, requestOptions).getValue(); + } + + /** + * Ends a lease and ensures that another client can't acquire a new lease until the current lease period has + * expired. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 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. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase breakLeaseWithResponse(Integer timeout, Integer breakPeriod, + String ifTags, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for breakLeaseWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (breakPeriod != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-break-period"), String.valueOf(breakPeriod)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = breakLeaseWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, new BlobsBreakLeaseHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Ends a lease and ensures that another client can't acquire a new lease until the current lease period has + * expired. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 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. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void breakLease(Integer timeout, Integer breakPeriod, String ifTags, RequestConditions requestConditions) { + // Generated convenience method for breakLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (breakPeriod != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-break-period"), String.valueOf(breakPeriod)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + breakLeaseWithResponseInternal(requestOptions).getValue(); + } + + /** + * Ends a lease and ensures that another client can't acquire a new lease until the current lease period has + * expired. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void breakLease() { + // Generated convenience method for breakLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + breakLeaseWithResponseInternal(requestOptions).getValue(); + } + + /** + * Creates a read-only snapshot of the specified 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 metadata The metadata headers. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase createSnapshotWithResponse(Integer timeout, + Map metadata, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String ifTags, String leaseId, + RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for createSnapshotWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (encryptionKey != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (leaseId != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = createSnapshotWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new BlobsCreateSnapshotHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Creates a read-only snapshot of the specified 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 metadata The metadata headers. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void createSnapshot(Integer timeout, Map metadata, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String ifTags, + String leaseId, RequestConditions requestConditions) { + // Generated convenience method for createSnapshotWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + createSnapshotWithResponseInternal(requestOptions).getValue(); + } + + /** + * Creates a read-only snapshot of the specified blob. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void createSnapshot() { + // Generated convenience method for createSnapshotWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + createSnapshotWithResponseInternal(requestOptions).getValue(); + } + + /** + * Starts an asynchronous copy from a source URL to a destination blob. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 The metadata headers. + * @param tier The tier to be set on the blob. + * @param rehydratePriority The priority of the rehydration operation. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param sourceIfTags Specifies a SQL-like where clause on blob tags to operate only on a source blob with matching + * tags. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobTagsString The blob tags. + * @param sealBlob Overrides the sealed state of the destination blob. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase startCopyFromUrlWithResponse(String copySource, + Integer timeout, Map metadata, AccessTier tier, RehydratePriority rehydratePriority, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String sourceIfTags, String ifTags, String leaseId, String blobTagsString, + Boolean sealBlob, OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, + Boolean legalHold, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for startCopyFromUrlWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (tier != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (rehydratePriority != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-rehydrate-priority"), + rehydratePriority.toString()); + } + if (sourceIfModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (sourceIfTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-tags"), sourceIfTags); + } + if (ifTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (leaseId != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobTagsString != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (sealBlob != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-seal-blob"), String.valueOf(sealBlob)); + } + if (immutabilityPolicyExpiry != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (ifModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = startCopyFromUrlWithResponseInternal(copySource, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new BlobsStartCopyFromUrlHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Starts an asynchronous copy from a source URL to a destination blob. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 The metadata headers. + * @param tier The tier to be set on the blob. + * @param rehydratePriority The priority of the rehydration operation. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param sourceIfTags Specifies a SQL-like where clause on blob tags to operate only on a source blob with matching + * tags. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobTagsString The blob tags. + * @param sealBlob Overrides the sealed state of the destination blob. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void startCopyFromUrl(String copySource, Integer timeout, Map metadata, AccessTier tier, + RehydratePriority rehydratePriority, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, + String ifTags, String leaseId, String blobTagsString, Boolean sealBlob, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, RequestConditions requestConditions) { + // Generated convenience method for startCopyFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (tier != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (rehydratePriority != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-rehydrate-priority"), + rehydratePriority.toString()); + } + if (sourceIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (sourceIfTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-tags"), sourceIfTags); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobTagsString != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (sealBlob != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-seal-blob"), String.valueOf(sealBlob)); + } + if (immutabilityPolicyExpiry != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + startCopyFromUrlWithResponseInternal(copySource, requestOptions).getValue(); + } + + /** + * Starts an asynchronous copy from a source URL to a destination blob. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void startCopyFromUrl(String copySource) { + // Generated convenience method for startCopyFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + startCopyFromUrlWithResponseInternal(copySource, requestOptions).getValue(); + } + + /** + * Synchronously copies a blob from a source URL to the destination blob. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 The metadata headers. + * @param tier The tier to be set on the blob. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param sourceContentMd5 Specifies the MD5 hash calculated for the range of bytes that must be read from the copy + * source. + * @param blobTagsString The blob tags. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param copySourceAuthorization Only the Bearer authorization scheme is supported, and the value must be a valid + * OAuth access token for the copy source. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param copySourceTags Indicates if source tags should be copied or replaced with the tags specified. Default is + * 'Replace'. + * @param fileRequestIntent Specifies the file request token intent. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase copyFromUrlWithResponse(String copySource, Integer timeout, + Map metadata, AccessTier tier, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String ifTags, + String leaseId, byte[] sourceContentMd5, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, String copySourceAuthorization, + String encryptionScope, BlobCopySourceTags copySourceTags, FileShareTokenIntent fileRequestIntent, + RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for copyFromUrlWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (tier != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (sourceIfModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (ifTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (leaseId != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (sourceContentMd5 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-content-md5"), + Base64Util.encodeToString(sourceContentMd5)); + } + if (blobTagsString != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (immutabilityPolicyExpiry != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (copySourceAuthorization != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-copy-source-authorization"), + copySourceAuthorization); + } + if (encryptionScope != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (copySourceTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-copy-source-tag-option"), + copySourceTags.toString()); + } + if (fileRequestIntent != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-file-request-intent"), + fileRequestIntent.toString()); + } + if (ifModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = copyFromUrlWithResponseInternal(copySource, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new BlobsCopyFromUrlHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Synchronously copies a blob from a source URL to the destination blob. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 The metadata headers. + * @param tier The tier to be set on the blob. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param sourceContentMd5 Specifies the MD5 hash calculated for the range of bytes that must be read from the copy + * source. + * @param blobTagsString The blob tags. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param copySourceAuthorization Only the Bearer authorization scheme is supported, and the value must be a valid + * OAuth access token for the copy source. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param copySourceTags Indicates if source tags should be copied or replaced with the tags specified. Default is + * 'Replace'. + * @param fileRequestIntent Specifies the file request token intent. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void copyFromUrl(String copySource, Integer timeout, Map metadata, AccessTier tier, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String ifTags, String leaseId, byte[] sourceContentMd5, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + String copySourceAuthorization, String encryptionScope, BlobCopySourceTags copySourceTags, + FileShareTokenIntent fileRequestIntent, RequestConditions requestConditions) { + // Generated convenience method for copyFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (tier != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (sourceIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (sourceContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-md5"), + Base64Util.encodeToString(sourceContentMd5)); + } + if (blobTagsString != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (immutabilityPolicyExpiry != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (copySourceAuthorization != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-authorization"), + copySourceAuthorization); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (copySourceTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-tag-option"), + copySourceTags.toString()); + } + if (fileRequestIntent != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-file-request-intent"), + fileRequestIntent.toString()); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + copyFromUrlWithResponseInternal(copySource, requestOptions).getValue(); + } + + /** + * Synchronously copies a blob from a source URL to the destination blob. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void copyFromUrl(String copySource) { + // Generated convenience method for copyFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + copyFromUrlWithResponseInternal(copySource, requestOptions).getValue(); + } + + /** + * Aborts a pending asynchronous copy operation and leaves a destination blob with zero length and full metadata. + * + * @param copyId The ID of the copy to be aborted. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase abortCopyFromUrlWithResponse(String copyId, Integer timeout, + String leaseId, RequestOptions requestOptions) { + // Generated convenience method for abortCopyFromUrlWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + Response protocolMethodResponse = abortCopyFromUrlWithResponseInternal(copyId, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new BlobsAbortCopyFromUrlHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Aborts a pending asynchronous copy operation and leaves a destination blob with zero length and full metadata. + * + * @param copyId The ID of the copy to be aborted. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void abortCopyFromUrl(String copyId, Integer timeout, String leaseId) { + // Generated convenience method for abortCopyFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + abortCopyFromUrlWithResponseInternal(copyId, requestOptions).getValue(); + } + + /** + * Aborts a pending asynchronous copy operation and leaves a destination blob with zero length and full metadata. + * + * @param copyId The ID of the copy to be aborted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void abortCopyFromUrl(String copyId) { + // Generated convenience method for abortCopyFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + abortCopyFromUrlWithResponseInternal(copyId, requestOptions).getValue(); + } + + /** + * Sets the tier of the specified blob. + * + * @param tier Indicates the tier to be set on the blob. + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of 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 rehydratePriority The priority of the rehydration operation. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setTierWithResponse(AccessTier tier, String snapshot, + String versionId, Integer timeout, RehydratePriority rehydratePriority, String leaseId, String ifTags, + RequestOptions requestOptions) { + // Generated convenience method for setTierWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (rehydratePriority != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-rehydrate-priority"), + rehydratePriority.toString()); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + Response protocolMethodResponse = setTierWithResponseInternal(tier.toString(), requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, new BlobsSetTierHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Sets the tier of the specified blob. + * + * @param tier Indicates the tier to be set on the blob. + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of 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 rehydratePriority The priority of the rehydration operation. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setTier(AccessTier tier, String snapshot, String versionId, Integer timeout, + RehydratePriority rehydratePriority, String leaseId, String ifTags) { + // Generated convenience method for setTierWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (rehydratePriority != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-rehydrate-priority"), + rehydratePriority.toString()); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + setTierWithResponseInternal(tier.toString(), requestOptions).getValue(); + } + + /** + * Sets the tier of the specified blob. + * + * @param tier Indicates the tier to be set on the blob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setTier(AccessTier tier) { + // Generated convenience method for setTierWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + setTierWithResponseInternal(tier.toString(), requestOptions).getValue(); + } + + /** + * Returns information about 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getAccountInfoWithResponse(Integer timeout, + RequestOptions requestOptions) { + // Generated convenience method for getAccountInfoWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + Response protocolMethodResponse = getAccountInfoWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new BlobsGetAccountInfoHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Returns information about 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>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void getAccountInfo(Integer timeout) { + // Generated convenience method for getAccountInfoWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + getAccountInfoWithResponseInternal(requestOptions).getValue(); + } + + /** + * Returns information about the storage account. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void getAccountInfo() { + // Generated convenience method for getAccountInfoWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + getAccountInfoWithResponseInternal(requestOptions).getValue(); + } + + /** + * Gets the tags of the specified 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 snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of the blob. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param ifModifiedSince Specify this value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param ifMatch Specify this value to operate only on a blob with a matching Etag value. + * @param ifNoneMatch Specify this value to operate only on a blob with a non-matching Etag value. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the tags of the specified blob along with {@link ResponseBase}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getTagsWithResponse(Integer timeout, String snapshot, + String versionId, String leaseId, String ifTags, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, RequestOptions requestOptions) { + // Generated convenience method for getTagsWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-modified-since"), + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-match"), ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-none-match"), ifNoneMatch); + } + Response protocolMethodResponse = getTagsWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(BlobTags.class, XML_SERIALIZER), + new BlobsGetTagsHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Gets the tags of the specified 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 snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of the blob. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param ifModifiedSince Specify this value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param ifMatch Specify this value to operate only on a blob with a matching Etag value. + * @param ifNoneMatch Specify this value to operate only on a blob with a non-matching Etag value. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the tags of the specified blob. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobTags getTags(Integer timeout, String snapshot, String versionId, String leaseId, String ifTags, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch) { + // Generated convenience method for getTagsWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-modified-since"), + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-match"), ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-none-match"), ifNoneMatch); + } + return getTagsWithResponseInternal(requestOptions).getValue().toObject(BlobTags.class, XML_SERIALIZER); + } + + /** + * Gets the tags of the specified blob. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the tags of the specified blob. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobTags getTags() { + // Generated convenience method for getTagsWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getTagsWithResponseInternal(requestOptions).getValue().toObject(BlobTags.class, XML_SERIALIZER); + } + + /** + * Sets the tags of the specified blob. + * + * @param tags The blob tags. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 Specifies the version ID of the blob. + * @param transactionalContentMd5 Specifies the transactional MD5 hash for the body. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the body. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param ifMatch Specify this value to operate only on a blob with a matching Etag value. + * @param ifNoneMatch Specify this value to operate only on a blob with a non-matching Etag value. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setTagsWithResponse(BlobTags tags, Integer timeout, String versionId, + byte[] transactionalContentMd5, byte[] transactionalContentCrc64, String ifTags, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, + RequestOptions requestOptions) { + // Generated convenience method for setTagsWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (transactionalContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-modified-since"), + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-match"), ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-none-match"), ifNoneMatch); + } + Response protocolMethodResponse + = setTagsWithResponseInternal(BinaryData.fromObject(tags, XML_SERIALIZER), requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, new BlobsSetTagsHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Sets the tags of the specified blob. + * + * @param tags The blob tags. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 Specifies the version ID of the blob. + * @param transactionalContentMd5 Specifies the transactional MD5 hash for the body. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the body. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifModifiedSince Specify this value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param ifMatch Specify this value to operate only on a blob with a matching Etag value. + * @param ifNoneMatch Specify this value to operate only on a blob with a non-matching Etag value. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setTags(BlobTags tags, Integer timeout, String versionId, byte[] transactionalContentMd5, + byte[] transactionalContentCrc64, String ifTags, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch) { + // Generated convenience method for setTagsWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (transactionalContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-modified-since"), + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-match"), ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-if-none-match"), ifNoneMatch); + } + setTagsWithResponseInternal(BinaryData.fromObject(tags, XML_SERIALIZER), requestOptions).getValue(); + } + + /** + * Sets the tags of the specified blob. + * + * @param tags The blob tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setTags(BlobTags tags) { + // Generated convenience method for setTagsWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + setTagsWithResponseInternal(BinaryData.fromObject(tags, XML_SERIALIZER), requestOptions).getValue(); + } + + /** + * The Get Blob Layout operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. In addition, it may optionally return the layout of the blob. + * + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of the blob. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 Specifies the range of the blob to operate on. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Get Blob Layout API along with {@link ResponseBase}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getLayoutWithResponse(String snapshot, + String versionId, String marker, Integer maxresults, Integer timeout, String range, String leaseId, + String ifTags, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for getLayoutWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (range != null) { + requestOptions.setHeader(HttpHeaderName.RANGE, range); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + Response protocolMethodResponse = getLayoutWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), + protocolMethodResponse.getStatusCode() == 204 + ? null + : protocolMethodResponse.getValue().toObject(BlobLayoutInternal.class, XML_SERIALIZER), + new BlobsGetLayoutHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * The Get Blob Layout operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. In addition, it may optionally return the layout of the blob. + * + * @param snapshot Specifies the snapshot of the blob. + * @param versionId Specifies the version ID of the blob. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 Specifies the range of the blob to operate on. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Get Blob Layout API. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobLayoutInternal getLayout(String snapshot, String versionId, String marker, Integer maxresults, + Integer timeout, String range, String leaseId, String ifTags, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, RequestConditions requestConditions) { + // Generated convenience method for getLayoutWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (versionId != null) { + requestOptions.addQueryParam("versionid", versionId, false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (range != null) { + requestOptions.setHeader(HttpHeaderName.RANGE, range); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + return getLayoutWithResponseInternal(requestOptions).getValue() + .toObject(BlobLayoutInternal.class, XML_SERIALIZER); + } + + /** + * The Get Blob Layout operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. In addition, it may optionally return the layout of the blob. + * + * @throws BlobStorageErrorException 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 the Get Blob Layout API. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobLayoutInternal getLayout() { + // Generated convenience method for getLayoutWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getLayoutWithResponseInternal(requestOptions).getValue() + .toObject(BlobLayoutInternal.class, XML_SERIALIZER); + } + + /** + * Queries the data of the specified blob with the provided query expressions. + * + * @param queryRequest The query request. + * @param snapshot Specifies the snapshot of 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase queryWithResponse(QueryRequest queryRequest, String snapshot, + Integer timeout, String leaseId, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String ifTags, RequestConditions requestConditions, + RequestOptions requestOptions) { + // Generated convenience method for queryWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse + = queryWithResponseInternal(BinaryData.fromObject(queryRequest, XML_SERIALIZER), requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), protocolMethodResponse.getValue(), + new BlobsQueryHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Queries the data of the specified blob with the provided query expressions. + * + * @param queryRequest The query request. + * @param snapshot Specifies the snapshot of 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BinaryData query(QueryRequest queryRequest, String snapshot, Integer timeout, String leaseId, + String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String ifTags, + RequestConditions requestConditions) { + // Generated convenience method for queryWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return queryWithResponseInternal(BinaryData.fromObject(queryRequest, XML_SERIALIZER), requestOptions) + .getValue(); + } + + /** + * Queries the data of the specified blob with the provided query expressions. + * + * @param queryRequest The query request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BinaryData query(QueryRequest queryRequest) { + // Generated convenience method for queryWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return queryWithResponseInternal(BinaryData.fromObject(queryRequest, XML_SERIALIZER), requestOptions) + .getValue(); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobContainerAsyncClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobContainerAsyncClientInternal.java new file mode 100644 index 0000000000000..0575162cfe8d9 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobContainerAsyncClientInternal.java @@ -0,0 +1,3186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; +import com.azure.core.util.BinaryData; +import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.serializer.ObjectSerializer; +import com.azure.storage.blob.implementation.models.BlobSignedIdentifiers; +import com.azure.storage.blob.implementation.models.BlobStorageErrorException; +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.ContainersCreateHeaders; +import com.azure.storage.blob.implementation.models.ContainersCreateSessionHeaders; +import com.azure.storage.blob.implementation.models.ContainersDeleteHeaders; +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.ContainersReleaseLeaseHeaders; +import com.azure.storage.blob.implementation.models.ContainersRenameHeaders; +import com.azure.storage.blob.implementation.models.ContainersRenewLeaseHeaders; +import com.azure.storage.blob.implementation.models.ContainersRestoreHeaders; +import com.azure.storage.blob.implementation.models.ContainersSetAccessPolicyHeaders; +import com.azure.storage.blob.implementation.models.ContainersSetMetadataHeaders; +import com.azure.storage.blob.implementation.models.CreateSessionConfiguration; +import com.azure.storage.blob.implementation.models.CreateSessionResponse; +import com.azure.storage.blob.implementation.models.FilterBlobSegment; +import com.azure.storage.blob.implementation.models.FilterBlobsIncludeItem; +import com.azure.storage.blob.implementation.models.ListBlobsFlatSegmentResponse; +import com.azure.storage.blob.implementation.models.ListBlobsHierarchySegmentResponse; +import com.azure.storage.blob.models.ListBlobsIncludeItem; +import com.azure.storage.blob.models.PublicAccessType; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous AzureBlobStorage type. + */ +public final class BlobContainerAsyncClientInternal { + @Generated + private static final ObjectSerializer XML_SERIALIZER = XmlSerializerProviders.createInstance(); + + @Generated + private final ContainersImpl serviceClient; + + /** + * Initializes an instance of BlobContainerAsyncClientInternal class. + * + * @param serviceClient the service client implementation. + */ + @Generated + public BlobContainerAsyncClientInternal(ContainersImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Creates a new container in the specified account. If the container with the same name already exists, the + * operation fails. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-blob-public-accessStringNoThe public access setting for the container. + * Allowed values: "blob", "container".
x-ms-default-encryption-scopeStringNoSpecifies the default encryption scope to + * set on the container and use for all future requests.
x-ms-deny-encryption-scope-overrideBooleanNoWhether to prevent encryption + * scope override.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> createWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.createWithResponseInternalAsync(requestOptions); + } + + /** + * Returns all user-defined metadata and system properties for the specified container. The data returned does not + * include the container's list of blobs. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-metaMap<String, String>The metadata headers.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-lease-durationStringSpecifies the duration of the lease.
x-ms-lease-stateStringThe lease state of the blob.
x-ms-lease-statusStringThe lease status of the blob.
x-ms-blob-public-accessStringThe public access setting for the container.
x-ms-has-immutability-policybooleanIndicates whether the container has an immutability + * policy set on it.
x-ms-has-legal-holdbooleanIndicates whether the container has a legal hold.
x-ms-default-encryption-scopeStringThe default encryption scope for the + * container.
x-ms-deny-encryption-scope-overridebooleanWhether to prevent encryption scope + * override.
x-ms-immutable-storage-with-versioning-enabledbooleanIndicates whether version level + * WORM (Write Once, Read Many) is enabled on a container.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getPropertiesWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getPropertiesWithResponseInternalAsync(requestOptions); + } + + /** + * Deletes the specified container. + * + * When a container is deleted, a container with the same name can't be created for at least 30 seconds. The + * container might not be available for more than 30 seconds if the service is still processing the request. While + * the container is being deleted, attempts to create a container of the same name fail with status code 409 + * (Conflict). The service indicates that the container is being deleted. Operations on blobs within the container, + * including reads and writes, may continue to succeed for up to 30 seconds after the delete request is accepted. + * After this period, all operations on the container and its blobs fail with status code 404 (Not Found). + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> deleteWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponseInternalAsync(requestOptions); + } + + /** + * Sets user-defined metadata for the specified container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-metaMap<String, String>NoThe metadata headers.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> setMetadataWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.setMetadataWithResponseInternalAsync(requestOptions); + } + + /** + * Gets the permissions for the specified container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     SignedIdentifier (Required): [
+     *          (Required){
+     *             Id: String (Required)
+     *             AccessPolicy (Optional): {
+     *                 Start: OffsetDateTime (Optional)
+     *                 Expiry: OffsetDateTime (Optional)
+     *                 Permission: String (Optional)
+     *             }
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-blob-public-accessStringThe public access setting for the container.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the permissions for the specified container along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getAccessPolicyWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getAccessPolicyWithResponseInternalAsync(requestOptions); + } + + /** + * Sets the permissions for the specified container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/xml".
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-public-accessStringNoThe public access setting for the container. + * Allowed values: "blob", "container".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     SignedIdentifier (Required): [
+     *          (Required){
+     *             Id: String (Required)
+     *             AccessPolicy (Optional): {
+     *                 Start: OffsetDateTime (Optional)
+     *                 Expiry: OffsetDateTime (Optional)
+     *                 Permission: String (Optional)
+     *             }
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> setAccessPolicyWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.setAccessPolicyWithResponseInternalAsync(requestOptions); + } + + /** + * Restores the specified previously-deleted container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-deleted-container-nameStringNoSpecifies the name of the deleted container + * to restore.
x-ms-deleted-container-versionStringNoSpecifies the version of the deleted + * container to restore.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> restoreWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.restoreWithResponseInternalAsync(requestOptions); + } + + /** + * Renames the specified existing container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-source-lease-idStringNoA lease ID for the source path. If specified, the + * source path must have an active lease and the lease ID must match.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param sourceContainerName Specifies the name of the container to rename. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> renameWithResponseInternal(String sourceContainerName, RequestOptions requestOptions) { + return this.serviceClient.renameWithResponseInternalAsync(sourceContainerName, requestOptions); + } + + /** + * The Create Session operation enables users to create a session scoped to a container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     AuthenticationType: String(HMAC) (Required)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     Id: String (Optional)
+     *     Expiration: DateTimeRfc1123 (Optional)
+     *     AuthenticationType: String(HMAC) (Optional)
+     *     Credentials (Optional): {
+     *         SessionToken: String (Optional)
+     *         SessionKey: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param createSessionConfiguration The configuration used to create the session. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the response of the Create Session API along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> createSessionWithResponseInternal(BinaryData createSessionConfiguration, + RequestOptions requestOptions) { + return this.serviceClient.createSessionWithResponseInternalAsync(createSessionConfiguration, requestOptions); + } + + /** + * Allows multiple API calls to be embedded into a single HTTP request. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     body (Required): {
+     *         content: BinaryData (Required)
+     *         filename: String (Optional)
+     *         contentType: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     body (Required): {
+     *         content: BinaryData (Required)
+     *         filename: String (Optional)
+     *         contentType: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
+ * + * @param contentLength The length of the request. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> submitBatchWithResponse(long contentLength, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.submitBatchWithResponseAsync(contentLength, body, requestOptions); + } + + /** + * Lists blobs in the specified container whose tags match a given search expression. + *

Query Parameters

+ * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     ServiceEndpoint: String (Required)
+     *     Where: String (Required)
+     *     Blobs (Required): [
+     *          (Required){
+     *             Name: String (Required)
+     *             ContainerName: String (Required)
+     *             Tags (Optional): {
+     *                 TagSet (Required): [
+     *                      (Required){
+     *                         Key: String (Required)
+     *                         Value: String (Required)
+     *                     }
+     *                 ]
+     *             }
+     *             VersionId: String (Optional)
+     *             IsCurrentVersion: Boolean (Optional)
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param filterExpression Filters the results to return only blobs whose tags match the specified expression. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the Find Blobs by Tags API along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> filterBlobsWithResponseInternal(String filterExpression, RequestOptions requestOptions) { + return this.serviceClient.filterBlobsWithResponseInternalAsync(filterExpression, requestOptions); + } + + /** + * Requests a new lease on the specified container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-proposed-lease-idStringNoThe proposed lease ID for the lease.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-lease-idStringUniquely identifies a blob's lease.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> acquireLeaseWithResponseInternal(int duration, RequestOptions requestOptions) { + return this.serviceClient.acquireLeaseWithResponseInternalAsync(duration, requestOptions); + } + + /** + * Frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the + * container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> releaseLeaseWithResponseInternal(String leaseId, RequestOptions requestOptions) { + return this.serviceClient.releaseLeaseWithResponseInternalAsync(leaseId, requestOptions); + } + + /** + * Renews an existing lease. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-lease-idStringUniquely identifies a blob's lease.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> renewLeaseWithResponseInternal(String leaseId, RequestOptions requestOptions) { + return this.serviceClient.renewLeaseWithResponseInternalAsync(leaseId, requestOptions); + } + + /** + * Ends a lease and ensures that another client can't acquire a new lease until the current lease period has + * expired. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
x-ms-lease-break-periodIntegerNoProposed 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.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-lease-timeintApproximate time remaining in the lease period, in seconds.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> breakLeaseWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.breakLeaseWithResponseInternalAsync(requestOptions); + } + + /** + * Change the ID of an existing lease. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-lease-idStringUniquely identifies a blob's lease.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> changeLeaseWithResponseInternal(String leaseId, String proposedLeaseId, + RequestOptions requestOptions) { + return this.serviceClient.changeLeaseWithResponseInternalAsync(leaseId, proposedLeaseId, requestOptions); + } + + /** + * Returns a list of the blobs in the specified container. + *

Query Parameters

+ * + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
prefixStringNoFilters the results to return only resources whose name begins + * with the specified prefix.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
startFromStringNoSpecifies the relative path to list paths from. For + * non-recursive list, only one entity level is supported; for recursive list, multiple entity levels are supported. + * (Inclusive)
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     ServiceEndpoint: String (Required)
+     *     ContainerName: String (Required)
+     *     Prefix: String (Optional)
+     *     Marker: String (Optional)
+     *     MaxResults: Integer (Optional)
+     *     Blobs (Required): [
+     *          (Required){
+     *             Name (Required): {
+     *                 Encoded: Boolean (Optional)
+     *                 content: String (Optional)
+     *             }
+     *             Deleted: boolean (Required)
+     *             Snapshot: String (Required)
+     *             VersionId: String (Optional)
+     *             IsCurrentVersion: Boolean (Optional)
+     *             Properties (Required): {
+     *                 Creation-Time: DateTimeRfc1123 (Optional)
+     *                 Last-Modified: DateTimeRfc1123 (Required)
+     *                 Etag: String (Required)
+     *                 Content-Length: Long (Optional)
+     *                 Content-Type: String (Optional)
+     *                 Content-Encoding: String (Optional)
+     *                 Content-Language: String (Optional)
+     *                 Content-MD5: byte[] (Optional)
+     *                 Content-Disposition: String (Optional)
+     *                 Cache-Control: String (Optional)
+     *                 x-ms-blob-sequence-number: Long (Optional)
+     *                 BlobType: String(BlockBlob/PageBlob/AppendBlob) (Optional)
+     *                 LeaseStatus: String(unlocked/locked) (Optional)
+     *                 LeaseState: String(available/leased/expired/breaking/broken) (Optional)
+     *                 LeaseDuration: String(infinite/fixed) (Optional)
+     *                 CopyId: String (Optional)
+     *                 CopyStatus: String(pending/success/failed/aborted) (Optional)
+     *                 CopySource: String (Optional)
+     *                 CopyProgress: String (Optional)
+     *                 CopyCompletionTime: DateTimeRfc1123 (Optional)
+     *                 CopyStatusDescription: String (Optional)
+     *                 ServerEncrypted: Boolean (Optional)
+     *                 IncrementalCopy: Boolean (Optional)
+     *                 DestinationSnapshot: String (Optional)
+     *                 DeletedTime: DateTimeRfc1123 (Optional)
+     *                 RemainingRetentionDays: Integer (Optional)
+     *                 AccessTier: String(P4/P6/P10/P15/P20/P30/P40/P50/P60/P70/P80/Hot/Cool/Archive/Premium/Cold/Smart) (Optional)
+     *                 AccessTierInferred: Boolean (Optional)
+     *                 ArchiveStatus: String(rehydrate-pending-to-hot/rehydrate-pending-to-cool/rehydrate-pending-to-cold/rehydrate-pending-to-smart) (Optional)
+     *                 SmartAccessTier: String(P4/P6/P10/P15/P20/P30/P40/P50/P60/P70/P80/Hot/Cool/Archive/Premium/Cold/Smart) (Optional)
+     *                 CustomerProvidedKeySha256: String (Optional)
+     *                 EncryptionScope: String (Optional)
+     *                 AccessTierChangeTime: DateTimeRfc1123 (Optional)
+     *                 TagCount: Integer (Optional)
+     *                 Expiry-Time: DateTimeRfc1123 (Optional)
+     *                 Sealed: Boolean (Optional)
+     *                 RehydratePriority: String(High/Standard) (Optional)
+     *                 LastAccessTime: DateTimeRfc1123 (Optional)
+     *                 ImmutabilityPolicyUntilDate: DateTimeRfc1123 (Optional)
+     *                 ImmutabilityPolicyMode: String(mutable/locked/unlocked) (Optional)
+     *                 LegalHold: Boolean (Optional)
+     *             }
+     *             Metadata (Optional): {
+     *                 String: String (Required)
+     *             }
+     *             Tags (Optional): {
+     *                 TagSet (Required): [
+     *                      (Required){
+     *                         Key: String (Required)
+     *                         Value: String (Required)
+     *                     }
+     *                 ]
+     *             }
+     *             OrMetadata (Optional): {
+     *                 String: String (Required)
+     *             }
+     *             HasVersionsOnly: Boolean (Optional)
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the List Blobs API along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> listBlobFlatSegmentWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.listBlobFlatSegmentWithResponseInternalAsync(requestOptions); + } + + /** + * Returns a list of the blobs in Apache Arrow format as raw data, to be deserialized by the client. + *

Query Parameters

+ * + * + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
prefixStringNoFilters the results to return only resources whose name begins + * with the specified prefix.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
startFromStringNoSpecifies the relative path to list paths from. For + * non-recursive list, only one entity level is supported; for recursive list, multiple entity levels are supported. + * (Inclusive)
endBeforeStringNoFilters the results to return only names that are ordered + * before this value. Currently only applies to Apache Arrow scenario.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
Content-TypeStringContent-Type header
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return represent a byte array along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listBlobFlatSegmentApacheArrowWithResponse(RequestOptions requestOptions) { + return this.serviceClient.listBlobFlatSegmentApacheArrowWithResponseAsync(requestOptions); + } + + /** + * Returns a list of the blobs in the specified container. A delimiter can be used to traverse a virtual hierarchy + * of blobs as though it were a file system. + *

Query Parameters

+ * + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
prefixStringNoFilters the results to return only resources whose name begins + * with the specified prefix.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
startFromStringNoSpecifies the relative path to list paths from. For + * non-recursive list, only one entity level is supported; for recursive list, multiple entity levels are supported. + * (Inclusive)
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     ServiceEndpoint: String (Required)
+     *     ContainerName: String (Required)
+     *     Delimiter: String (Optional)
+     *     Prefix: String (Optional)
+     *     Marker: String (Optional)
+     *     MaxResults: Integer (Optional)
+     *     Blobs (Required): {
+     *         Blob (Optional): [
+     *              (Optional){
+     *                 Name (Required): {
+     *                     Encoded: Boolean (Optional)
+     *                     content: String (Optional)
+     *                 }
+     *                 Deleted: boolean (Required)
+     *                 Snapshot: String (Required)
+     *                 VersionId: String (Optional)
+     *                 IsCurrentVersion: Boolean (Optional)
+     *                 Properties (Required): {
+     *                     Creation-Time: DateTimeRfc1123 (Optional)
+     *                     Last-Modified: DateTimeRfc1123 (Required)
+     *                     Etag: String (Required)
+     *                     Content-Length: Long (Optional)
+     *                     Content-Type: String (Optional)
+     *                     Content-Encoding: String (Optional)
+     *                     Content-Language: String (Optional)
+     *                     Content-MD5: byte[] (Optional)
+     *                     Content-Disposition: String (Optional)
+     *                     Cache-Control: String (Optional)
+     *                     x-ms-blob-sequence-number: Long (Optional)
+     *                     BlobType: String(BlockBlob/PageBlob/AppendBlob) (Optional)
+     *                     LeaseStatus: String(unlocked/locked) (Optional)
+     *                     LeaseState: String(available/leased/expired/breaking/broken) (Optional)
+     *                     LeaseDuration: String(infinite/fixed) (Optional)
+     *                     CopyId: String (Optional)
+     *                     CopyStatus: String(pending/success/failed/aborted) (Optional)
+     *                     CopySource: String (Optional)
+     *                     CopyProgress: String (Optional)
+     *                     CopyCompletionTime: DateTimeRfc1123 (Optional)
+     *                     CopyStatusDescription: String (Optional)
+     *                     ServerEncrypted: Boolean (Optional)
+     *                     IncrementalCopy: Boolean (Optional)
+     *                     DestinationSnapshot: String (Optional)
+     *                     DeletedTime: DateTimeRfc1123 (Optional)
+     *                     RemainingRetentionDays: Integer (Optional)
+     *                     AccessTier: String(P4/P6/P10/P15/P20/P30/P40/P50/P60/P70/P80/Hot/Cool/Archive/Premium/Cold/Smart) (Optional)
+     *                     AccessTierInferred: Boolean (Optional)
+     *                     ArchiveStatus: String(rehydrate-pending-to-hot/rehydrate-pending-to-cool/rehydrate-pending-to-cold/rehydrate-pending-to-smart) (Optional)
+     *                     SmartAccessTier: String(P4/P6/P10/P15/P20/P30/P40/P50/P60/P70/P80/Hot/Cool/Archive/Premium/Cold/Smart) (Optional)
+     *                     CustomerProvidedKeySha256: String (Optional)
+     *                     EncryptionScope: String (Optional)
+     *                     AccessTierChangeTime: DateTimeRfc1123 (Optional)
+     *                     TagCount: Integer (Optional)
+     *                     Expiry-Time: DateTimeRfc1123 (Optional)
+     *                     Sealed: Boolean (Optional)
+     *                     RehydratePriority: String(High/Standard) (Optional)
+     *                     LastAccessTime: DateTimeRfc1123 (Optional)
+     *                     ImmutabilityPolicyUntilDate: DateTimeRfc1123 (Optional)
+     *                     ImmutabilityPolicyMode: String(mutable/locked/unlocked) (Optional)
+     *                     LegalHold: Boolean (Optional)
+     *                 }
+     *                 Metadata (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *                 Tags (Optional): {
+     *                     TagSet (Required): [
+     *                          (Required){
+     *                             Key: String (Required)
+     *                             Value: String (Required)
+     *                         }
+     *                     ]
+     *                 }
+     *                 OrMetadata (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *                 HasVersionsOnly: Boolean (Optional)
+     *             }
+     *         ]
+     *         BlobPrefix (Optional): [
+     *              (Optional){
+     *                 Name (Required): (recursive schema, see Name above)
+     *             }
+     *         ]
+     *     }
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param delimiter If specified, the operation returns a BlobPrefix element 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the List Blobs Hierarchical API along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> listBlobHierarchySegmentWithResponseInternal(String delimiter, + RequestOptions requestOptions) { + return this.serviceClient.listBlobHierarchySegmentWithResponseInternalAsync(delimiter, requestOptions); + } + + /** + * Returns a list of the blobs in Apache Arrow format as raw data, to be deserialized by the client. A delimiter can + * be used to traverse a virtual hierarchy of blobs as though it were a file system. + *

Query Parameters

+ * + * + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
prefixStringNoFilters the results to return only resources whose name begins + * with the specified prefix.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
startFromStringNoSpecifies the relative path to list paths from. For + * non-recursive list, only one entity level is supported; for recursive list, multiple entity levels are supported. + * (Inclusive)
endBeforeStringNoFilters the results to return only names that are ordered + * before this value. Currently only applies to Apache Arrow scenario.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
Content-TypeStringContent-Type header
+ * + * @param delimiter If specified, the operation returns a BlobPrefix element 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return represent a byte array along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listBlobHierarchySegmentApacheArrowWithResponse(String delimiter, + RequestOptions requestOptions) { + return this.serviceClient.listBlobHierarchySegmentApacheArrowWithResponseAsync(delimiter, requestOptions); + } + + /** + * Returns information about the storage account. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-sku-nameStringThe SKU name of the account.
x-ms-account-kindStringThe account kind.
x-ms-is-hns-enabledbooleanIndicates if the account has a hierarchical namespace + * enabled.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getAccountInfoWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getAccountInfoWithResponseInternalAsync(requestOptions); + } + + /** + * Creates a new container in the specified account. If the container with the same name already exists, the + * operation fails. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 The metadata headers. + * @param access The public access setting for the container. + * @param defaultEncryptionScope Specifies the default encryption scope to set on the container and use for all + * future requests. + * @param preventEncryptionScopeOverride Whether to prevent encryption scope override. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createWithResponse(Integer timeout, + Map metadata, PublicAccessType access, String defaultEncryptionScope, + Boolean preventEncryptionScopeOverride, RequestOptions requestOptions) { + // Generated convenience method for createWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (access != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-public-access"), access.toString()); + } + if (defaultEncryptionScope != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-default-encryption-scope"), + defaultEncryptionScope); + } + if (preventEncryptionScopeOverride != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-deny-encryption-scope-override"), + String.valueOf(preventEncryptionScopeOverride)); + } + return createWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new ContainersCreateHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Creates a new container in the specified account. If the container with the same name already exists, the + * operation fails. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 The metadata headers. + * @param access The public access setting for the container. + * @param defaultEncryptionScope Specifies the default encryption scope to set on the container and use for all + * future requests. + * @param preventEncryptionScopeOverride Whether to prevent encryption scope override. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono create(Integer timeout, Map metadata, PublicAccessType access, + String defaultEncryptionScope, Boolean preventEncryptionScopeOverride) { + // Generated convenience method for createWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (access != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-public-access"), access.toString()); + } + if (defaultEncryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-default-encryption-scope"), + defaultEncryptionScope); + } + if (preventEncryptionScopeOverride != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-deny-encryption-scope-override"), + String.valueOf(preventEncryptionScopeOverride)); + } + return createWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Creates a new container in the specified account. If the container with the same name already exists, the + * operation fails. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono create() { + // Generated convenience method for createWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return createWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * 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 timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getPropertiesWithResponse(Integer timeout, + String leaseId, RequestOptions requestOptions) { + // Generated convenience method for getPropertiesWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + return getPropertiesWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new ContainersGetPropertiesHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * 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 timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getProperties(Integer timeout, String leaseId) { + // Generated convenience method for getPropertiesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + return getPropertiesWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Returns all user-defined metadata and system properties for the specified container. The data returned does not + * include the container's list of blobs. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getProperties() { + // Generated convenience method for getPropertiesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getPropertiesWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Deletes the specified container. + * + * When a container is deleted, a container with the same name can't be created for at least 30 seconds. The + * container might not be available for more than 30 seconds if the service is still processing the request. While + * the container is being deleted, attempts to create a container of the same name fail with status code 409 + * (Conflict). The service indicates that the container is being deleted. Operations on blobs within the container, + * including reads and writes, may continue to succeed for up to 30 seconds after the delete request is accepted. + * After this period, all operations on the container and its blobs fail with status code 404 (Not Found). + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponse(Integer timeout, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, RequestOptions requestOptions) { + // Generated convenience method for deleteWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + return deleteWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new ContainersDeleteHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Deletes the specified container. + * + * When a container is deleted, a container with the same name can't be created for at least 30 seconds. The + * container might not be available for more than 30 seconds if the service is still processing the request. While + * the container is being deleted, attempts to create a container of the same name fail with status code 409 + * (Conflict). The service indicates that the container is being deleted. Operations on blobs within the container, + * including reads and writes, may continue to succeed for up to 30 seconds after the delete request is accepted. + * After this period, all operations on the container and its blobs fail with status code 404 (Not Found). + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono delete(Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince) { + // Generated convenience method for deleteWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + return deleteWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Deletes the specified container. + * + * When a container is deleted, a container with the same name can't be created for at least 30 seconds. The + * container might not be available for more than 30 seconds if the service is still processing the request. While + * the container is being deleted, attempts to create a container of the same name fail with status code 409 + * (Conflict). The service indicates that the container is being deleted. Operations on blobs within the container, + * including reads and writes, may continue to succeed for up to 30 seconds after the delete request is accepted. + * After this period, all operations on the container and its blobs fail with status code 404 (Not Found). + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono delete() { + // Generated convenience method for deleteWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return deleteWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Sets user-defined metadata for the specified 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param metadata The metadata headers. + * @param ifModifiedSince Specify this value to operate only on a blob if it has been modified since the specified + * date-time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setMetadataWithResponse(Integer timeout, + String leaseId, Map metadata, OffsetDateTime ifModifiedSince, RequestOptions requestOptions) { + // Generated convenience method for setMetadataWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (ifModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + return setMetadataWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new ContainersSetMetadataHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Sets user-defined metadata for the specified 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param metadata The metadata headers. + * @param ifModifiedSince Specify this value to operate only on a blob if it has been modified since the specified + * date-time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setMetadata(Integer timeout, String leaseId, Map metadata, + OffsetDateTime ifModifiedSince) { + // Generated convenience method for setMetadataWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + return setMetadataWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Sets user-defined metadata for the specified container. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setMetadata() { + // Generated convenience method for setMetadataWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return setMetadataWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Gets the permissions for the specified 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + getAccessPolicyWithResponse(Integer timeout, String leaseId, RequestOptions requestOptions) { + // Generated convenience method for getAccessPolicyWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + return getAccessPolicyWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(BlobSignedIdentifiers.class, XML_SERIALIZER), + new ContainersGetAccessPolicyHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Gets the permissions for the specified 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 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 BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAccessPolicy(Integer timeout, String leaseId) { + // Generated convenience method for getAccessPolicyWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + return getAccessPolicyWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(BlobSignedIdentifiers.class, XML_SERIALIZER)); + } + + /** + * Gets the permissions for the specified container. + * + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAccessPolicy() { + // Generated convenience method for getAccessPolicyWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getAccessPolicyWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(BlobSignedIdentifiers.class, XML_SERIALIZER)); + } + + /** + * Sets the permissions for the specified 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param access The public access setting for the container. + * @param ifModifiedSince Specify this value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param containerAcl The access control list for the container. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setAccessPolicyWithResponse(Integer timeout, + String leaseId, PublicAccessType access, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + BlobSignedIdentifiers containerAcl, RequestOptions requestOptions) { + // Generated convenience method for setAccessPolicyWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (access != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-public-access"), access.toString()); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (containerAcl != null) { + requestOptions.setBody(BinaryData.fromObject(containerAcl, XML_SERIALIZER)); + } + return setAccessPolicyWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new ContainersSetAccessPolicyHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Sets the permissions for the specified 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param access The public access setting for the container. + * @param ifModifiedSince Specify this value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param containerAcl The access control list for the container. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setAccessPolicy(Integer timeout, String leaseId, PublicAccessType access, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, BlobSignedIdentifiers containerAcl) { + // Generated convenience method for setAccessPolicyWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (access != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-public-access"), access.toString()); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (containerAcl != null) { + requestOptions.setBody(BinaryData.fromObject(containerAcl, XML_SERIALIZER)); + } + return setAccessPolicyWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Sets the permissions for the specified container. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setAccessPolicy() { + // Generated convenience method for setAccessPolicyWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return setAccessPolicyWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Restores the specified previously-deleted container. + * + * @param deletedContainerName Specifies the name of the deleted container to restore. + * @param deletedContainerVersion Specifies the version of the deleted container to restore. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> restoreWithResponse(String deletedContainerName, + String deletedContainerVersion, Integer timeout, RequestOptions requestOptions) { + // Generated convenience method for restoreWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (deletedContainerName != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-deleted-container-name"), deletedContainerName); + } + if (deletedContainerVersion != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-deleted-container-version"), + deletedContainerVersion); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return restoreWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new ContainersRestoreHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Restores the specified previously-deleted container. + * + * @param deletedContainerName Specifies the name of the deleted container to restore. + * @param deletedContainerVersion Specifies the version of the deleted container to restore. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono restore(String deletedContainerName, String deletedContainerVersion, Integer timeout) { + // Generated convenience method for restoreWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (deletedContainerName != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-deleted-container-name"), deletedContainerName); + } + if (deletedContainerVersion != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-deleted-container-version"), + deletedContainerVersion); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return restoreWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Restores the specified previously-deleted container. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono restore() { + // Generated convenience method for restoreWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return restoreWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Renames the specified existing container. + * + * @param sourceContainerName Specifies the name of the container to rename. + * @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 timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> renameWithResponse(String sourceContainerName, + String sourceLeaseId, Integer timeout, RequestOptions requestOptions) { + // Generated convenience method for renameWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (sourceLeaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-lease-id"), sourceLeaseId); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return renameWithResponseInternal(sourceContainerName, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new ContainersRenameHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Renames the specified existing container. + * + * @param sourceContainerName Specifies the name of the container to rename. + * @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 timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono rename(String sourceContainerName, String sourceLeaseId, Integer timeout) { + // Generated convenience method for renameWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (sourceLeaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-lease-id"), sourceLeaseId); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return renameWithResponseInternal(sourceContainerName, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Renames the specified existing container. + * + * @param sourceContainerName Specifies the name of the container to rename. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono rename(String sourceContainerName) { + // Generated convenience method for renameWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return renameWithResponseInternal(sourceContainerName, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * The Create Session operation enables users to create a session scoped to a container. + * + * @param createSessionConfiguration The configuration used to create the session. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 of the Create Session API along with {@link ResponseBase} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createSessionWithResponse( + CreateSessionConfiguration createSessionConfiguration, Integer timeout, RequestOptions requestOptions) { + // Generated convenience method for createSessionWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return createSessionWithResponseInternal(BinaryData.fromObject(createSessionConfiguration, XML_SERIALIZER), + requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(CreateSessionResponse.class, XML_SERIALIZER), + new ContainersCreateSessionHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * The Create Session operation enables users to create a session scoped to a container. + * + * @param createSessionConfiguration The configuration used to create the session. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 of the Create Session API on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createSession(CreateSessionConfiguration createSessionConfiguration, + Integer timeout) { + // Generated convenience method for createSessionWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return createSessionWithResponseInternal(BinaryData.fromObject(createSessionConfiguration, XML_SERIALIZER), + requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(CreateSessionResponse.class, XML_SERIALIZER)); + } + + /** + * The Create Session operation enables users to create a session scoped to a container. + * + * @param createSessionConfiguration The configuration used to create the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 of the Create Session API on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createSession(CreateSessionConfiguration createSessionConfiguration) { + // Generated convenience method for createSessionWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return createSessionWithResponseInternal(BinaryData.fromObject(createSessionConfiguration, XML_SERIALIZER), + requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(CreateSessionResponse.class, XML_SERIALIZER)); + } + + /** + * Lists blobs in the specified container whose tags match a given search expression. + * + * @param filterExpression Filters the results to return only blobs whose tags match the specified expression. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param include Specify to include additional, optional information. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Find Blobs by Tags API along with {@link ResponseBase} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> filterBlobsWithResponse( + String filterExpression, Integer timeout, String marker, Integer maxresults, + List include, RequestOptions requestOptions) { + // Generated convenience method for filterBlobsWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (include != null) { + requestOptions.addQueryParam("include", + include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + return filterBlobsWithResponseInternal(filterExpression, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(FilterBlobSegment.class, XML_SERIALIZER), + new ContainersFilterBlobsHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Lists blobs in the specified container whose tags match a given search expression. + * + * @param filterExpression Filters the results to return only blobs whose tags match the specified expression. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param include Specify to include additional, optional information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Find Blobs by Tags API on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono filterBlobs(String filterExpression, Integer timeout, String marker, + Integer maxresults, List include) { + // Generated convenience method for filterBlobsWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (include != null) { + requestOptions.addQueryParam("include", + include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + return filterBlobsWithResponseInternal(filterExpression, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(FilterBlobSegment.class, XML_SERIALIZER)); + } + + /** + * Lists blobs in the specified container whose tags match a given search expression. + * + * @param filterExpression Filters the results to return only blobs whose tags match the specified expression. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Find Blobs by Tags API on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono filterBlobs(String filterExpression) { + // Generated convenience method for filterBlobsWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return filterBlobsWithResponseInternal(filterExpression, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(FilterBlobSegment.class, XML_SERIALIZER)); + } + + /** + * Requests a new lease on the specified container. + * + * @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. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param ifModifiedSince Specify this value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> acquireLeaseWithResponse(int duration, + Integer timeout, String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + RequestOptions requestOptions) { + // Generated convenience method for acquireLeaseWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (proposedLeaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-proposed-lease-id"), proposedLeaseId); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + return acquireLeaseWithResponseInternal(duration, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new ContainersAcquireLeaseHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Requests a new lease on the specified container. + * + * @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. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param ifModifiedSince Specify this value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono acquireLease(int duration, Integer timeout, String proposedLeaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince) { + // Generated convenience method for acquireLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (proposedLeaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-proposed-lease-id"), proposedLeaseId); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + return acquireLeaseWithResponseInternal(duration, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Requests a new lease on the specified container. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono acquireLease(int duration) { + // Generated convenience method for acquireLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return acquireLeaseWithResponseInternal(duration, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the + * container. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> releaseLeaseWithResponse(String leaseId, + Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + RequestOptions requestOptions) { + // Generated convenience method for releaseLeaseWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + return releaseLeaseWithResponseInternal(leaseId, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new ContainersReleaseLeaseHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the + * container. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono releaseLease(String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince) { + // Generated convenience method for releaseLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + return releaseLeaseWithResponseInternal(leaseId, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the + * container. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono releaseLease(String leaseId) { + // Generated convenience method for releaseLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return releaseLeaseWithResponseInternal(leaseId, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Renews an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> renewLeaseWithResponse(String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, RequestOptions requestOptions) { + // Generated convenience method for renewLeaseWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + return renewLeaseWithResponseInternal(leaseId, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new ContainersRenewLeaseHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Renews an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono renewLease(String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince) { + // Generated convenience method for renewLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + return renewLeaseWithResponseInternal(leaseId, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Renews an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono renewLease(String leaseId) { + // Generated convenience method for renewLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return renewLeaseWithResponseInternal(leaseId, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Ends a lease and ensures that another client can't acquire a new lease until the current lease period has + * expired. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param breakPeriod 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> breakLeaseWithResponse(Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, Integer breakPeriod, + RequestOptions requestOptions) { + // Generated convenience method for breakLeaseWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (breakPeriod != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-break-period"), String.valueOf(breakPeriod)); + } + return breakLeaseWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new ContainersBreakLeaseHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Ends a lease and ensures that another client can't acquire a new lease until the current lease period has + * expired. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param breakPeriod 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono breakLease(Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + Integer breakPeriod) { + // Generated convenience method for breakLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (breakPeriod != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-break-period"), String.valueOf(breakPeriod)); + } + return breakLeaseWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Ends a lease and ensures that another client can't acquire a new lease until the current lease period has + * expired. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono breakLease() { + // Generated convenience method for breakLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return breakLeaseWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Change the ID of an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> changeLeaseWithResponse(String leaseId, + String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + RequestOptions requestOptions) { + // Generated convenience method for changeLeaseWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + return changeLeaseWithResponseInternal(leaseId, proposedLeaseId, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new ContainersChangeLeaseHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Change the ID of an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono changeLease(String leaseId, String proposedLeaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince) { + // Generated convenience method for changeLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + return changeLeaseWithResponseInternal(leaseId, proposedLeaseId, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Change the ID of an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param proposedLeaseId The proposed lease ID for the lease. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono changeLease(String leaseId, String proposedLeaseId) { + // Generated convenience method for changeLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return changeLeaseWithResponseInternal(leaseId, proposedLeaseId, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Returns a list of the blobs in the specified container. + * + * @param prefix Filters the results to return only resources whose name begins with the specified prefix. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param include Specify to include additional, optional 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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; for recursive list, multiple entity levels are supported. (Inclusive). + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the List Blobs API along with {@link ResponseBase} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + listBlobFlatSegmentWithResponse(String prefix, String marker, Integer maxresults, + List include, Integer timeout, String startFrom, RequestOptions requestOptions) { + // Generated convenience method for listBlobFlatSegmentWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (prefix != null) { + requestOptions.addQueryParam("prefix", prefix, false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (include != null) { + requestOptions.addQueryParam("include", + include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (startFrom != null) { + requestOptions.addQueryParam("startFrom", startFrom, false); + } + return listBlobFlatSegmentWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(ListBlobsFlatSegmentResponse.class, XML_SERIALIZER), + new ContainersListBlobFlatSegmentHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Returns a list of the blobs in the specified container. + * + * @param prefix Filters the results to return only resources whose name begins with the specified prefix. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param include Specify to include additional, optional 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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; for recursive list, multiple entity levels are supported. (Inclusive). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the List Blobs API on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listBlobFlatSegment(String prefix, String marker, Integer maxresults, + List include, Integer timeout, String startFrom) { + // Generated convenience method for listBlobFlatSegmentWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (prefix != null) { + requestOptions.addQueryParam("prefix", prefix, false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (include != null) { + requestOptions.addQueryParam("include", + include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (startFrom != null) { + requestOptions.addQueryParam("startFrom", startFrom, false); + } + return listBlobFlatSegmentWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(ListBlobsFlatSegmentResponse.class, XML_SERIALIZER)); + } + + /** + * Returns a list of the blobs in the specified container. + * + * @throws BlobStorageErrorException 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 the List Blobs API on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listBlobFlatSegment() { + // Generated convenience method for listBlobFlatSegmentWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return listBlobFlatSegmentWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(ListBlobsFlatSegmentResponse.class, XML_SERIALIZER)); + } + + /** + * Returns a list of the blobs in the specified container. A delimiter can be used to traverse a virtual hierarchy + * of blobs as though it were a file system. + * + * @param delimiter If specified, the operation returns a BlobPrefix element 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 resources whose name begins with the specified prefix. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param include Specify to include additional, optional 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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; for recursive list, multiple entity levels are supported. (Inclusive). + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the List Blobs Hierarchical API along with {@link ResponseBase} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + listBlobHierarchySegmentWithResponse(String delimiter, String prefix, String marker, Integer maxresults, + List include, Integer timeout, String startFrom, RequestOptions requestOptions) { + // Generated convenience method for listBlobHierarchySegmentWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (prefix != null) { + requestOptions.addQueryParam("prefix", prefix, false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (include != null) { + requestOptions.addQueryParam("include", + include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (startFrom != null) { + requestOptions.addQueryParam("startFrom", startFrom, false); + } + return listBlobHierarchySegmentWithResponseInternal(delimiter, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(ListBlobsHierarchySegmentResponse.class, XML_SERIALIZER), + new ContainersListBlobHierarchySegmentHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Returns a list of the blobs in the specified container. A delimiter can be used to traverse a virtual hierarchy + * of blobs as though it were a file system. + * + * @param delimiter If specified, the operation returns a BlobPrefix element 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 resources whose name begins with the specified prefix. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param include Specify to include additional, optional 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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; for recursive list, multiple entity levels are supported. (Inclusive). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the List Blobs Hierarchical API on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listBlobHierarchySegment(String delimiter, String prefix, + String marker, Integer maxresults, List include, Integer timeout, String startFrom) { + // Generated convenience method for listBlobHierarchySegmentWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (prefix != null) { + requestOptions.addQueryParam("prefix", prefix, false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (include != null) { + requestOptions.addQueryParam("include", + include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (startFrom != null) { + requestOptions.addQueryParam("startFrom", startFrom, false); + } + return listBlobHierarchySegmentWithResponseInternal(delimiter, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(ListBlobsHierarchySegmentResponse.class, + XML_SERIALIZER)); + } + + /** + * Returns a list of the blobs in the specified container. A delimiter can be used to traverse a virtual hierarchy + * of blobs as though it were a file system. + * + * @param delimiter If specified, the operation returns a BlobPrefix element 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the List Blobs Hierarchical API on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listBlobHierarchySegment(String delimiter) { + // Generated convenience method for listBlobHierarchySegmentWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return listBlobHierarchySegmentWithResponseInternal(delimiter, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(ListBlobsHierarchySegmentResponse.class, + XML_SERIALIZER)); + } + + /** + * Returns information about 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAccountInfoWithResponse(Integer timeout, + RequestOptions requestOptions) { + // Generated convenience method for getAccountInfoWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return getAccountInfoWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new ContainersGetAccountInfoHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Returns information about 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>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAccountInfo(Integer timeout) { + // Generated convenience method for getAccountInfoWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return getAccountInfoWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Returns information about the storage account. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAccountInfo() { + // Generated convenience method for getAccountInfoWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getAccountInfoWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobContainerClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobContainerClientInternal.java new file mode 100644 index 0000000000000..063aa967c8e1a --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobContainerClientInternal.java @@ -0,0 +1,3144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; +import com.azure.core.util.BinaryData; +import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.serializer.ObjectSerializer; +import com.azure.storage.blob.implementation.models.BlobSignedIdentifiers; +import com.azure.storage.blob.implementation.models.BlobStorageErrorException; +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.ContainersCreateHeaders; +import com.azure.storage.blob.implementation.models.ContainersCreateSessionHeaders; +import com.azure.storage.blob.implementation.models.ContainersDeleteHeaders; +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.ContainersReleaseLeaseHeaders; +import com.azure.storage.blob.implementation.models.ContainersRenameHeaders; +import com.azure.storage.blob.implementation.models.ContainersRenewLeaseHeaders; +import com.azure.storage.blob.implementation.models.ContainersRestoreHeaders; +import com.azure.storage.blob.implementation.models.ContainersSetAccessPolicyHeaders; +import com.azure.storage.blob.implementation.models.ContainersSetMetadataHeaders; +import com.azure.storage.blob.implementation.models.CreateSessionConfiguration; +import com.azure.storage.blob.implementation.models.CreateSessionResponse; +import com.azure.storage.blob.implementation.models.FilterBlobSegment; +import com.azure.storage.blob.implementation.models.FilterBlobsIncludeItem; +import com.azure.storage.blob.implementation.models.ListBlobsFlatSegmentResponse; +import com.azure.storage.blob.implementation.models.ListBlobsHierarchySegmentResponse; +import com.azure.storage.blob.models.ListBlobsIncludeItem; +import com.azure.storage.blob.models.PublicAccessType; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * Initializes a new instance of the synchronous AzureBlobStorage type. + */ +public final class BlobContainerClientInternal { + @Generated + private static final ObjectSerializer XML_SERIALIZER = XmlSerializerProviders.createInstance(); + + @Generated + private final ContainersImpl serviceClient; + + /** + * Initializes an instance of BlobContainerClientInternal class. + * + * @param serviceClient the service client implementation. + */ + @Generated + public BlobContainerClientInternal(ContainersImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Creates a new container in the specified account. If the container with the same name already exists, the + * operation fails. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-blob-public-accessStringNoThe public access setting for the container. + * Allowed values: "blob", "container".
x-ms-default-encryption-scopeStringNoSpecifies the default encryption scope to + * set on the container and use for all future requests.
x-ms-deny-encryption-scope-overrideBooleanNoWhether to prevent encryption + * scope override.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response createWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.createWithResponseInternal(requestOptions); + } + + /** + * Returns all user-defined metadata and system properties for the specified container. The data returned does not + * include the container's list of blobs. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-metaMap<String, String>The metadata headers.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-lease-durationStringSpecifies the duration of the lease.
x-ms-lease-stateStringThe lease state of the blob.
x-ms-lease-statusStringThe lease status of the blob.
x-ms-blob-public-accessStringThe public access setting for the container.
x-ms-has-immutability-policybooleanIndicates whether the container has an immutability + * policy set on it.
x-ms-has-legal-holdbooleanIndicates whether the container has a legal hold.
x-ms-default-encryption-scopeStringThe default encryption scope for the + * container.
x-ms-deny-encryption-scope-overridebooleanWhether to prevent encryption scope + * override.
x-ms-immutable-storage-with-versioning-enabledbooleanIndicates whether version level + * WORM (Write Once, Read Many) is enabled on a container.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPropertiesWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getPropertiesWithResponseInternal(requestOptions); + } + + /** + * Deletes the specified container. + * + * When a container is deleted, a container with the same name can't be created for at least 30 seconds. The + * container might not be available for more than 30 seconds if the service is still processing the request. While + * the container is being deleted, attempts to create a container of the same name fail with status code 409 + * (Conflict). The service indicates that the container is being deleted. Operations on blobs within the container, + * including reads and writes, may continue to succeed for up to 30 seconds after the delete request is accepted. + * After this period, all operations on the container and its blobs fail with status code 404 (Not Found). + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.deleteWithResponseInternal(requestOptions); + } + + /** + * Sets user-defined metadata for the specified container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-metaMap<String, String>NoThe metadata headers.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response setMetadataWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.setMetadataWithResponseInternal(requestOptions); + } + + /** + * Gets the permissions for the specified container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     SignedIdentifier (Required): [
+     *          (Required){
+     *             Id: String (Required)
+     *             AccessPolicy (Optional): {
+     *                 Start: OffsetDateTime (Optional)
+     *                 Expiry: OffsetDateTime (Optional)
+     *                 Permission: String (Optional)
+     *             }
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-blob-public-accessStringThe public access setting for the container.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the permissions for the specified container along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAccessPolicyWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getAccessPolicyWithResponseInternal(requestOptions); + } + + /** + * Sets the permissions for the specified container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/xml".
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-public-accessStringNoThe public access setting for the container. + * Allowed values: "blob", "container".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     SignedIdentifier (Required): [
+     *          (Required){
+     *             Id: String (Required)
+     *             AccessPolicy (Optional): {
+     *                 Start: OffsetDateTime (Optional)
+     *                 Expiry: OffsetDateTime (Optional)
+     *                 Permission: String (Optional)
+     *             }
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response setAccessPolicyWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.setAccessPolicyWithResponseInternal(requestOptions); + } + + /** + * Restores the specified previously-deleted container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-deleted-container-nameStringNoSpecifies the name of the deleted container + * to restore.
x-ms-deleted-container-versionStringNoSpecifies the version of the deleted + * container to restore.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response restoreWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.restoreWithResponseInternal(requestOptions); + } + + /** + * Renames the specified existing container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-source-lease-idStringNoA lease ID for the source path. If specified, the + * source path must have an active lease and the lease ID must match.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param sourceContainerName Specifies the name of the container to rename. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response renameWithResponseInternal(String sourceContainerName, RequestOptions requestOptions) { + return this.serviceClient.renameWithResponseInternal(sourceContainerName, requestOptions); + } + + /** + * The Create Session operation enables users to create a session scoped to a container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     AuthenticationType: String(HMAC) (Required)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     Id: String (Optional)
+     *     Expiration: DateTimeRfc1123 (Optional)
+     *     AuthenticationType: String(HMAC) (Optional)
+     *     Credentials (Optional): {
+     *         SessionToken: String (Optional)
+     *         SessionKey: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param createSessionConfiguration The configuration used to create the session. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the response of the Create Session API along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response createSessionWithResponseInternal(BinaryData createSessionConfiguration, + RequestOptions requestOptions) { + return this.serviceClient.createSessionWithResponseInternal(createSessionConfiguration, requestOptions); + } + + /** + * Allows multiple API calls to be embedded into a single HTTP request. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     body (Required): {
+     *         content: BinaryData (Required)
+     *         filename: String (Optional)
+     *         contentType: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     body (Required): {
+     *         content: BinaryData (Required)
+     *         filename: String (Optional)
+     *         contentType: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
+ * + * @param contentLength The length of the request. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response submitBatchWithResponse(long contentLength, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.submitBatchWithResponse(contentLength, body, requestOptions); + } + + /** + * Lists blobs in the specified container whose tags match a given search expression. + *

Query Parameters

+ * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     ServiceEndpoint: String (Required)
+     *     Where: String (Required)
+     *     Blobs (Required): [
+     *          (Required){
+     *             Name: String (Required)
+     *             ContainerName: String (Required)
+     *             Tags (Optional): {
+     *                 TagSet (Required): [
+     *                      (Required){
+     *                         Key: String (Required)
+     *                         Value: String (Required)
+     *                     }
+     *                 ]
+     *             }
+     *             VersionId: String (Optional)
+     *             IsCurrentVersion: Boolean (Optional)
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param filterExpression Filters the results to return only blobs whose tags match the specified expression. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the Find Blobs by Tags API along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response filterBlobsWithResponseInternal(String filterExpression, RequestOptions requestOptions) { + return this.serviceClient.filterBlobsWithResponseInternal(filterExpression, requestOptions); + } + + /** + * Requests a new lease on the specified container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-proposed-lease-idStringNoThe proposed lease ID for the lease.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-lease-idStringUniquely identifies a blob's lease.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response acquireLeaseWithResponseInternal(int duration, RequestOptions requestOptions) { + return this.serviceClient.acquireLeaseWithResponseInternal(duration, requestOptions); + } + + /** + * Frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the + * container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response releaseLeaseWithResponseInternal(String leaseId, RequestOptions requestOptions) { + return this.serviceClient.releaseLeaseWithResponseInternal(leaseId, requestOptions); + } + + /** + * Renews an existing lease. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-lease-idStringUniquely identifies a blob's lease.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response renewLeaseWithResponseInternal(String leaseId, RequestOptions requestOptions) { + return this.serviceClient.renewLeaseWithResponseInternal(leaseId, requestOptions); + } + + /** + * Ends a lease and ensures that another client can't acquire a new lease until the current lease period has + * expired. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
x-ms-lease-break-periodIntegerNoProposed 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.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-lease-timeintApproximate time remaining in the lease period, in seconds.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response breakLeaseWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.breakLeaseWithResponseInternal(requestOptions); + } + + /** + * Change the ID of an existing lease. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-lease-idStringUniquely identifies a blob's lease.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response changeLeaseWithResponseInternal(String leaseId, String proposedLeaseId, + RequestOptions requestOptions) { + return this.serviceClient.changeLeaseWithResponseInternal(leaseId, proposedLeaseId, requestOptions); + } + + /** + * Returns a list of the blobs in the specified container. + *

Query Parameters

+ * + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
prefixStringNoFilters the results to return only resources whose name begins + * with the specified prefix.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
startFromStringNoSpecifies the relative path to list paths from. For + * non-recursive list, only one entity level is supported; for recursive list, multiple entity levels are supported. + * (Inclusive)
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     ServiceEndpoint: String (Required)
+     *     ContainerName: String (Required)
+     *     Prefix: String (Optional)
+     *     Marker: String (Optional)
+     *     MaxResults: Integer (Optional)
+     *     Blobs (Required): [
+     *          (Required){
+     *             Name (Required): {
+     *                 Encoded: Boolean (Optional)
+     *                 content: String (Optional)
+     *             }
+     *             Deleted: boolean (Required)
+     *             Snapshot: String (Required)
+     *             VersionId: String (Optional)
+     *             IsCurrentVersion: Boolean (Optional)
+     *             Properties (Required): {
+     *                 Creation-Time: DateTimeRfc1123 (Optional)
+     *                 Last-Modified: DateTimeRfc1123 (Required)
+     *                 Etag: String (Required)
+     *                 Content-Length: Long (Optional)
+     *                 Content-Type: String (Optional)
+     *                 Content-Encoding: String (Optional)
+     *                 Content-Language: String (Optional)
+     *                 Content-MD5: byte[] (Optional)
+     *                 Content-Disposition: String (Optional)
+     *                 Cache-Control: String (Optional)
+     *                 x-ms-blob-sequence-number: Long (Optional)
+     *                 BlobType: String(BlockBlob/PageBlob/AppendBlob) (Optional)
+     *                 LeaseStatus: String(unlocked/locked) (Optional)
+     *                 LeaseState: String(available/leased/expired/breaking/broken) (Optional)
+     *                 LeaseDuration: String(infinite/fixed) (Optional)
+     *                 CopyId: String (Optional)
+     *                 CopyStatus: String(pending/success/failed/aborted) (Optional)
+     *                 CopySource: String (Optional)
+     *                 CopyProgress: String (Optional)
+     *                 CopyCompletionTime: DateTimeRfc1123 (Optional)
+     *                 CopyStatusDescription: String (Optional)
+     *                 ServerEncrypted: Boolean (Optional)
+     *                 IncrementalCopy: Boolean (Optional)
+     *                 DestinationSnapshot: String (Optional)
+     *                 DeletedTime: DateTimeRfc1123 (Optional)
+     *                 RemainingRetentionDays: Integer (Optional)
+     *                 AccessTier: String(P4/P6/P10/P15/P20/P30/P40/P50/P60/P70/P80/Hot/Cool/Archive/Premium/Cold/Smart) (Optional)
+     *                 AccessTierInferred: Boolean (Optional)
+     *                 ArchiveStatus: String(rehydrate-pending-to-hot/rehydrate-pending-to-cool/rehydrate-pending-to-cold/rehydrate-pending-to-smart) (Optional)
+     *                 SmartAccessTier: String(P4/P6/P10/P15/P20/P30/P40/P50/P60/P70/P80/Hot/Cool/Archive/Premium/Cold/Smart) (Optional)
+     *                 CustomerProvidedKeySha256: String (Optional)
+     *                 EncryptionScope: String (Optional)
+     *                 AccessTierChangeTime: DateTimeRfc1123 (Optional)
+     *                 TagCount: Integer (Optional)
+     *                 Expiry-Time: DateTimeRfc1123 (Optional)
+     *                 Sealed: Boolean (Optional)
+     *                 RehydratePriority: String(High/Standard) (Optional)
+     *                 LastAccessTime: DateTimeRfc1123 (Optional)
+     *                 ImmutabilityPolicyUntilDate: DateTimeRfc1123 (Optional)
+     *                 ImmutabilityPolicyMode: String(mutable/locked/unlocked) (Optional)
+     *                 LegalHold: Boolean (Optional)
+     *             }
+     *             Metadata (Optional): {
+     *                 String: String (Required)
+     *             }
+     *             Tags (Optional): {
+     *                 TagSet (Required): [
+     *                      (Required){
+     *                         Key: String (Required)
+     *                         Value: String (Required)
+     *                     }
+     *                 ]
+     *             }
+     *             OrMetadata (Optional): {
+     *                 String: String (Required)
+     *             }
+     *             HasVersionsOnly: Boolean (Optional)
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the List Blobs API along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response listBlobFlatSegmentWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.listBlobFlatSegmentWithResponseInternal(requestOptions); + } + + /** + * Returns a list of the blobs in Apache Arrow format as raw data, to be deserialized by the client. + *

Query Parameters

+ * + * + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
prefixStringNoFilters the results to return only resources whose name begins + * with the specified prefix.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
startFromStringNoSpecifies the relative path to list paths from. For + * non-recursive list, only one entity level is supported; for recursive list, multiple entity levels are supported. + * (Inclusive)
endBeforeStringNoFilters the results to return only names that are ordered + * before this value. Currently only applies to Apache Arrow scenario.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
Content-TypeStringContent-Type header
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return represent a byte array along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listBlobFlatSegmentApacheArrowWithResponse(RequestOptions requestOptions) { + return this.serviceClient.listBlobFlatSegmentApacheArrowWithResponse(requestOptions); + } + + /** + * Returns a list of the blobs in the specified container. A delimiter can be used to traverse a virtual hierarchy + * of blobs as though it were a file system. + *

Query Parameters

+ * + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
prefixStringNoFilters the results to return only resources whose name begins + * with the specified prefix.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
startFromStringNoSpecifies the relative path to list paths from. For + * non-recursive list, only one entity level is supported; for recursive list, multiple entity levels are supported. + * (Inclusive)
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     ServiceEndpoint: String (Required)
+     *     ContainerName: String (Required)
+     *     Delimiter: String (Optional)
+     *     Prefix: String (Optional)
+     *     Marker: String (Optional)
+     *     MaxResults: Integer (Optional)
+     *     Blobs (Required): {
+     *         Blob (Optional): [
+     *              (Optional){
+     *                 Name (Required): {
+     *                     Encoded: Boolean (Optional)
+     *                     content: String (Optional)
+     *                 }
+     *                 Deleted: boolean (Required)
+     *                 Snapshot: String (Required)
+     *                 VersionId: String (Optional)
+     *                 IsCurrentVersion: Boolean (Optional)
+     *                 Properties (Required): {
+     *                     Creation-Time: DateTimeRfc1123 (Optional)
+     *                     Last-Modified: DateTimeRfc1123 (Required)
+     *                     Etag: String (Required)
+     *                     Content-Length: Long (Optional)
+     *                     Content-Type: String (Optional)
+     *                     Content-Encoding: String (Optional)
+     *                     Content-Language: String (Optional)
+     *                     Content-MD5: byte[] (Optional)
+     *                     Content-Disposition: String (Optional)
+     *                     Cache-Control: String (Optional)
+     *                     x-ms-blob-sequence-number: Long (Optional)
+     *                     BlobType: String(BlockBlob/PageBlob/AppendBlob) (Optional)
+     *                     LeaseStatus: String(unlocked/locked) (Optional)
+     *                     LeaseState: String(available/leased/expired/breaking/broken) (Optional)
+     *                     LeaseDuration: String(infinite/fixed) (Optional)
+     *                     CopyId: String (Optional)
+     *                     CopyStatus: String(pending/success/failed/aborted) (Optional)
+     *                     CopySource: String (Optional)
+     *                     CopyProgress: String (Optional)
+     *                     CopyCompletionTime: DateTimeRfc1123 (Optional)
+     *                     CopyStatusDescription: String (Optional)
+     *                     ServerEncrypted: Boolean (Optional)
+     *                     IncrementalCopy: Boolean (Optional)
+     *                     DestinationSnapshot: String (Optional)
+     *                     DeletedTime: DateTimeRfc1123 (Optional)
+     *                     RemainingRetentionDays: Integer (Optional)
+     *                     AccessTier: String(P4/P6/P10/P15/P20/P30/P40/P50/P60/P70/P80/Hot/Cool/Archive/Premium/Cold/Smart) (Optional)
+     *                     AccessTierInferred: Boolean (Optional)
+     *                     ArchiveStatus: String(rehydrate-pending-to-hot/rehydrate-pending-to-cool/rehydrate-pending-to-cold/rehydrate-pending-to-smart) (Optional)
+     *                     SmartAccessTier: String(P4/P6/P10/P15/P20/P30/P40/P50/P60/P70/P80/Hot/Cool/Archive/Premium/Cold/Smart) (Optional)
+     *                     CustomerProvidedKeySha256: String (Optional)
+     *                     EncryptionScope: String (Optional)
+     *                     AccessTierChangeTime: DateTimeRfc1123 (Optional)
+     *                     TagCount: Integer (Optional)
+     *                     Expiry-Time: DateTimeRfc1123 (Optional)
+     *                     Sealed: Boolean (Optional)
+     *                     RehydratePriority: String(High/Standard) (Optional)
+     *                     LastAccessTime: DateTimeRfc1123 (Optional)
+     *                     ImmutabilityPolicyUntilDate: DateTimeRfc1123 (Optional)
+     *                     ImmutabilityPolicyMode: String(mutable/locked/unlocked) (Optional)
+     *                     LegalHold: Boolean (Optional)
+     *                 }
+     *                 Metadata (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *                 Tags (Optional): {
+     *                     TagSet (Required): [
+     *                          (Required){
+     *                             Key: String (Required)
+     *                             Value: String (Required)
+     *                         }
+     *                     ]
+     *                 }
+     *                 OrMetadata (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *                 HasVersionsOnly: Boolean (Optional)
+     *             }
+     *         ]
+     *         BlobPrefix (Optional): [
+     *              (Optional){
+     *                 Name (Required): (recursive schema, see Name above)
+     *             }
+     *         ]
+     *     }
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param delimiter If specified, the operation returns a BlobPrefix element 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the List Blobs Hierarchical API along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response listBlobHierarchySegmentWithResponseInternal(String delimiter, RequestOptions requestOptions) { + return this.serviceClient.listBlobHierarchySegmentWithResponseInternal(delimiter, requestOptions); + } + + /** + * Returns a list of the blobs in Apache Arrow format as raw data, to be deserialized by the client. A delimiter can + * be used to traverse a virtual hierarchy of blobs as though it were a file system. + *

Query Parameters

+ * + * + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
prefixStringNoFilters the results to return only resources whose name begins + * with the specified prefix.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
startFromStringNoSpecifies the relative path to list paths from. For + * non-recursive list, only one entity level is supported; for recursive list, multiple entity levels are supported. + * (Inclusive)
endBeforeStringNoFilters the results to return only names that are ordered + * before this value. Currently only applies to Apache Arrow scenario.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
Content-TypeStringContent-Type header
+ * + * @param delimiter If specified, the operation returns a BlobPrefix element 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return represent a byte array along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listBlobHierarchySegmentApacheArrowWithResponse(String delimiter, + RequestOptions requestOptions) { + return this.serviceClient.listBlobHierarchySegmentApacheArrowWithResponse(delimiter, requestOptions); + } + + /** + * Returns information about the storage account. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-sku-nameStringThe SKU name of the account.
x-ms-account-kindStringThe account kind.
x-ms-is-hns-enabledbooleanIndicates if the account has a hierarchical namespace + * enabled.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAccountInfoWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getAccountInfoWithResponseInternal(requestOptions); + } + + /** + * Creates a new container in the specified account. If the container with the same name already exists, the + * operation fails. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 The metadata headers. + * @param access The public access setting for the container. + * @param defaultEncryptionScope Specifies the default encryption scope to set on the container and use for all + * future requests. + * @param preventEncryptionScopeOverride Whether to prevent encryption scope override. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase createWithResponse(Integer timeout, Map metadata, + PublicAccessType access, String defaultEncryptionScope, Boolean preventEncryptionScopeOverride, + RequestOptions requestOptions) { + // Generated convenience method for createWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (access != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-public-access"), access.toString()); + } + if (defaultEncryptionScope != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-default-encryption-scope"), + defaultEncryptionScope); + } + if (preventEncryptionScopeOverride != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-deny-encryption-scope-override"), + String.valueOf(preventEncryptionScopeOverride)); + } + Response protocolMethodResponse = createWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new ContainersCreateHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Creates a new container in the specified account. If the container with the same name already exists, the + * operation fails. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 The metadata headers. + * @param access The public access setting for the container. + * @param defaultEncryptionScope Specifies the default encryption scope to set on the container and use for all + * future requests. + * @param preventEncryptionScopeOverride Whether to prevent encryption scope override. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void create(Integer timeout, Map metadata, PublicAccessType access, + String defaultEncryptionScope, Boolean preventEncryptionScopeOverride) { + // Generated convenience method for createWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (access != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-public-access"), access.toString()); + } + if (defaultEncryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-default-encryption-scope"), + defaultEncryptionScope); + } + if (preventEncryptionScopeOverride != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-deny-encryption-scope-override"), + String.valueOf(preventEncryptionScopeOverride)); + } + createWithResponseInternal(requestOptions).getValue(); + } + + /** + * Creates a new container in the specified account. If the container with the same name already exists, the + * operation fails. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void create() { + // Generated convenience method for createWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + createWithResponseInternal(requestOptions).getValue(); + } + + /** + * 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 timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getPropertiesWithResponse(Integer timeout, String leaseId, + RequestOptions requestOptions) { + // Generated convenience method for getPropertiesWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + Response protocolMethodResponse = getPropertiesWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new ContainersGetPropertiesHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * 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 timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void getProperties(Integer timeout, String leaseId) { + // Generated convenience method for getPropertiesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + getPropertiesWithResponseInternal(requestOptions).getValue(); + } + + /** + * Returns all user-defined metadata and system properties for the specified container. The data returned does not + * include the container's list of blobs. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void getProperties() { + // Generated convenience method for getPropertiesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + getPropertiesWithResponseInternal(requestOptions).getValue(); + } + + /** + * Deletes the specified container. + * + * When a container is deleted, a container with the same name can't be created for at least 30 seconds. The + * container might not be available for more than 30 seconds if the service is still processing the request. While + * the container is being deleted, attempts to create a container of the same name fail with status code 409 + * (Conflict). The service indicates that the container is being deleted. Operations on blobs within the container, + * including reads and writes, may continue to succeed for up to 30 seconds after the delete request is accepted. + * After this period, all operations on the container and its blobs fail with status code 404 (Not Found). + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase deleteWithResponse(Integer timeout, String leaseId, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, RequestOptions requestOptions) { + // Generated convenience method for deleteWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + Response protocolMethodResponse = deleteWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new ContainersDeleteHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Deletes the specified container. + * + * When a container is deleted, a container with the same name can't be created for at least 30 seconds. The + * container might not be available for more than 30 seconds if the service is still processing the request. While + * the container is being deleted, attempts to create a container of the same name fail with status code 409 + * (Conflict). The service indicates that the container is being deleted. Operations on blobs within the container, + * including reads and writes, may continue to succeed for up to 30 seconds after the delete request is accepted. + * After this period, all operations on the container and its blobs fail with status code 404 (Not Found). + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince) { + // Generated convenience method for deleteWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + deleteWithResponseInternal(requestOptions).getValue(); + } + + /** + * Deletes the specified container. + * + * When a container is deleted, a container with the same name can't be created for at least 30 seconds. The + * container might not be available for more than 30 seconds if the service is still processing the request. While + * the container is being deleted, attempts to create a container of the same name fail with status code 409 + * (Conflict). The service indicates that the container is being deleted. Operations on blobs within the container, + * including reads and writes, may continue to succeed for up to 30 seconds after the delete request is accepted. + * After this period, all operations on the container and its blobs fail with status code 404 (Not Found). + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete() { + // Generated convenience method for deleteWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + deleteWithResponseInternal(requestOptions).getValue(); + } + + /** + * Sets user-defined metadata for the specified 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param metadata The metadata headers. + * @param ifModifiedSince Specify this value to operate only on a blob if it has been modified since the specified + * date-time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setMetadataWithResponse(Integer timeout, String leaseId, + Map metadata, OffsetDateTime ifModifiedSince, RequestOptions requestOptions) { + // Generated convenience method for setMetadataWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (ifModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + Response protocolMethodResponse = setMetadataWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new ContainersSetMetadataHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Sets user-defined metadata for the specified 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param metadata The metadata headers. + * @param ifModifiedSince Specify this value to operate only on a blob if it has been modified since the specified + * date-time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setMetadata(Integer timeout, String leaseId, Map metadata, + OffsetDateTime ifModifiedSince) { + // Generated convenience method for setMetadataWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + setMetadataWithResponseInternal(requestOptions).getValue(); + } + + /** + * Sets user-defined metadata for the specified container. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setMetadata() { + // Generated convenience method for setMetadataWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + setMetadataWithResponseInternal(requestOptions).getValue(); + } + + /** + * Gets the permissions for the specified 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase + getAccessPolicyWithResponse(Integer timeout, String leaseId, RequestOptions requestOptions) { + // Generated convenience method for getAccessPolicyWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + Response protocolMethodResponse = getAccessPolicyWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(BlobSignedIdentifiers.class, XML_SERIALIZER), + new ContainersGetAccessPolicyHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Gets the permissions for the specified 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 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 BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobSignedIdentifiers getAccessPolicy(Integer timeout, String leaseId) { + // Generated convenience method for getAccessPolicyWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + return getAccessPolicyWithResponseInternal(requestOptions).getValue() + .toObject(BlobSignedIdentifiers.class, XML_SERIALIZER); + } + + /** + * Gets the permissions for the specified container. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobSignedIdentifiers getAccessPolicy() { + // Generated convenience method for getAccessPolicyWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getAccessPolicyWithResponseInternal(requestOptions).getValue() + .toObject(BlobSignedIdentifiers.class, XML_SERIALIZER); + } + + /** + * Sets the permissions for the specified 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param access The public access setting for the container. + * @param ifModifiedSince Specify this value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param containerAcl The access control list for the container. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setAccessPolicyWithResponse(Integer timeout, + String leaseId, PublicAccessType access, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + BlobSignedIdentifiers containerAcl, RequestOptions requestOptions) { + // Generated convenience method for setAccessPolicyWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (access != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-public-access"), access.toString()); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (containerAcl != null) { + requestOptions.setBody(BinaryData.fromObject(containerAcl, XML_SERIALIZER)); + } + Response protocolMethodResponse = setAccessPolicyWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new ContainersSetAccessPolicyHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Sets the permissions for the specified 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param access The public access setting for the container. + * @param ifModifiedSince Specify this value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param containerAcl The access control list for the container. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setAccessPolicy(Integer timeout, String leaseId, PublicAccessType access, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, BlobSignedIdentifiers containerAcl) { + // Generated convenience method for setAccessPolicyWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (access != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-public-access"), access.toString()); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (containerAcl != null) { + requestOptions.setBody(BinaryData.fromObject(containerAcl, XML_SERIALIZER)); + } + setAccessPolicyWithResponseInternal(requestOptions).getValue(); + } + + /** + * Sets the permissions for the specified container. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setAccessPolicy() { + // Generated convenience method for setAccessPolicyWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + setAccessPolicyWithResponseInternal(requestOptions).getValue(); + } + + /** + * Restores the specified previously-deleted container. + * + * @param deletedContainerName Specifies the name of the deleted container to restore. + * @param deletedContainerVersion Specifies the version of the deleted container to restore. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase restoreWithResponse(String deletedContainerName, + String deletedContainerVersion, Integer timeout, RequestOptions requestOptions) { + // Generated convenience method for restoreWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (deletedContainerName != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-deleted-container-name"), deletedContainerName); + } + if (deletedContainerVersion != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-deleted-container-version"), + deletedContainerVersion); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + Response protocolMethodResponse = restoreWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new ContainersRestoreHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Restores the specified previously-deleted container. + * + * @param deletedContainerName Specifies the name of the deleted container to restore. + * @param deletedContainerVersion Specifies the version of the deleted container to restore. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void restore(String deletedContainerName, String deletedContainerVersion, Integer timeout) { + // Generated convenience method for restoreWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (deletedContainerName != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-deleted-container-name"), deletedContainerName); + } + if (deletedContainerVersion != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-deleted-container-version"), + deletedContainerVersion); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + restoreWithResponseInternal(requestOptions).getValue(); + } + + /** + * Restores the specified previously-deleted container. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void restore() { + // Generated convenience method for restoreWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + restoreWithResponseInternal(requestOptions).getValue(); + } + + /** + * Renames the specified existing container. + * + * @param sourceContainerName Specifies the name of the container to rename. + * @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 timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase renameWithResponse(String sourceContainerName, + String sourceLeaseId, Integer timeout, RequestOptions requestOptions) { + // Generated convenience method for renameWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (sourceLeaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-lease-id"), sourceLeaseId); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + Response protocolMethodResponse = renameWithResponseInternal(sourceContainerName, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new ContainersRenameHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Renames the specified existing container. + * + * @param sourceContainerName Specifies the name of the container to rename. + * @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 timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void rename(String sourceContainerName, String sourceLeaseId, Integer timeout) { + // Generated convenience method for renameWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (sourceLeaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-lease-id"), sourceLeaseId); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + renameWithResponseInternal(sourceContainerName, requestOptions).getValue(); + } + + /** + * Renames the specified existing container. + * + * @param sourceContainerName Specifies the name of the container to rename. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void rename(String sourceContainerName) { + // Generated convenience method for renameWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + renameWithResponseInternal(sourceContainerName, requestOptions).getValue(); + } + + /** + * The Create Session operation enables users to create a session scoped to a container. + * + * @param createSessionConfiguration The configuration used to create the session. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 of the Create Session API along with {@link ResponseBase}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase createSessionWithResponse( + CreateSessionConfiguration createSessionConfiguration, Integer timeout, RequestOptions requestOptions) { + // Generated convenience method for createSessionWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + Response protocolMethodResponse = createSessionWithResponseInternal( + BinaryData.fromObject(createSessionConfiguration, XML_SERIALIZER), requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(CreateSessionResponse.class, XML_SERIALIZER), + new ContainersCreateSessionHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * The Create Session operation enables users to create a session scoped to a container. + * + * @param createSessionConfiguration The configuration used to create the session. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 of the Create Session API. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public CreateSessionResponse createSession(CreateSessionConfiguration createSessionConfiguration, Integer timeout) { + // Generated convenience method for createSessionWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return createSessionWithResponseInternal(BinaryData.fromObject(createSessionConfiguration, XML_SERIALIZER), + requestOptions).getValue().toObject(CreateSessionResponse.class, XML_SERIALIZER); + } + + /** + * The Create Session operation enables users to create a session scoped to a container. + * + * @param createSessionConfiguration The configuration used to create the session. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 of the Create Session API. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public CreateSessionResponse createSession(CreateSessionConfiguration createSessionConfiguration) { + // Generated convenience method for createSessionWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return createSessionWithResponseInternal(BinaryData.fromObject(createSessionConfiguration, XML_SERIALIZER), + requestOptions).getValue().toObject(CreateSessionResponse.class, XML_SERIALIZER); + } + + /** + * Lists blobs in the specified container whose tags match a given search expression. + * + * @param filterExpression Filters the results to return only blobs whose tags match the specified expression. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param include Specify to include additional, optional information. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Find Blobs by Tags API along with {@link ResponseBase}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase filterBlobsWithResponse( + String filterExpression, Integer timeout, String marker, Integer maxresults, + List include, RequestOptions requestOptions) { + // Generated convenience method for filterBlobsWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (include != null) { + requestOptions.addQueryParam("include", + include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + Response protocolMethodResponse = filterBlobsWithResponseInternal(filterExpression, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(FilterBlobSegment.class, XML_SERIALIZER), + new ContainersFilterBlobsHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Lists blobs in the specified container whose tags match a given search expression. + * + * @param filterExpression Filters the results to return only blobs whose tags match the specified expression. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param include Specify to include additional, optional information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Find Blobs by Tags API. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public FilterBlobSegment filterBlobs(String filterExpression, Integer timeout, String marker, Integer maxresults, + List include) { + // Generated convenience method for filterBlobsWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (include != null) { + requestOptions.addQueryParam("include", + include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + return filterBlobsWithResponseInternal(filterExpression, requestOptions).getValue() + .toObject(FilterBlobSegment.class, XML_SERIALIZER); + } + + /** + * Lists blobs in the specified container whose tags match a given search expression. + * + * @param filterExpression Filters the results to return only blobs whose tags match the specified expression. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Find Blobs by Tags API. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public FilterBlobSegment filterBlobs(String filterExpression) { + // Generated convenience method for filterBlobsWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return filterBlobsWithResponseInternal(filterExpression, requestOptions).getValue() + .toObject(FilterBlobSegment.class, XML_SERIALIZER); + } + + /** + * Requests a new lease on the specified container. + * + * @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. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param ifModifiedSince Specify this value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase acquireLeaseWithResponse(int duration, Integer timeout, + String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + RequestOptions requestOptions) { + // Generated convenience method for acquireLeaseWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (proposedLeaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-proposed-lease-id"), proposedLeaseId); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + Response protocolMethodResponse = acquireLeaseWithResponseInternal(duration, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new ContainersAcquireLeaseHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Requests a new lease on the specified container. + * + * @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. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param ifModifiedSince Specify this value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void acquireLease(int duration, Integer timeout, String proposedLeaseId, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince) { + // Generated convenience method for acquireLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (proposedLeaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-proposed-lease-id"), proposedLeaseId); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + acquireLeaseWithResponseInternal(duration, requestOptions).getValue(); + } + + /** + * Requests a new lease on the specified container. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void acquireLease(int duration) { + // Generated convenience method for acquireLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + acquireLeaseWithResponseInternal(duration, requestOptions).getValue(); + } + + /** + * Frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the + * container. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase releaseLeaseWithResponse(String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, RequestOptions requestOptions) { + // Generated convenience method for releaseLeaseWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + Response protocolMethodResponse = releaseLeaseWithResponseInternal(leaseId, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new ContainersReleaseLeaseHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the + * container. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void releaseLease(String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince) { + // Generated convenience method for releaseLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + releaseLeaseWithResponseInternal(leaseId, requestOptions).getValue(); + } + + /** + * Frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the + * container. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void releaseLease(String leaseId) { + // Generated convenience method for releaseLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + releaseLeaseWithResponseInternal(leaseId, requestOptions).getValue(); + } + + /** + * Renews an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase renewLeaseWithResponse(String leaseId, Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, RequestOptions requestOptions) { + // Generated convenience method for renewLeaseWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + Response protocolMethodResponse = renewLeaseWithResponseInternal(leaseId, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new ContainersRenewLeaseHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Renews an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void renewLease(String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince) { + // Generated convenience method for renewLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + renewLeaseWithResponseInternal(leaseId, requestOptions).getValue(); + } + + /** + * Renews an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void renewLease(String leaseId) { + // Generated convenience method for renewLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + renewLeaseWithResponseInternal(leaseId, requestOptions).getValue(); + } + + /** + * Ends a lease and ensures that another client can't acquire a new lease until the current lease period has + * expired. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param breakPeriod 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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase breakLeaseWithResponse(Integer timeout, + OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, Integer breakPeriod, + RequestOptions requestOptions) { + // Generated convenience method for breakLeaseWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (breakPeriod != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-break-period"), String.valueOf(breakPeriod)); + } + Response protocolMethodResponse = breakLeaseWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new ContainersBreakLeaseHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Ends a lease and ensures that another client can't acquire a new lease until the current lease period has + * expired. + * + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param breakPeriod 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void breakLease(Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + Integer breakPeriod) { + // Generated convenience method for breakLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (breakPeriod != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-break-period"), String.valueOf(breakPeriod)); + } + breakLeaseWithResponseInternal(requestOptions).getValue(); + } + + /** + * Ends a lease and ensures that another client can't acquire a new lease until the current lease period has + * expired. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void breakLease() { + // Generated convenience method for breakLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + breakLeaseWithResponseInternal(requestOptions).getValue(); + } + + /** + * Change the ID of an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase changeLeaseWithResponse(String leaseId, + String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, + RequestOptions requestOptions) { + // Generated convenience method for changeLeaseWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + Response protocolMethodResponse + = changeLeaseWithResponseInternal(leaseId, proposedLeaseId, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new ContainersChangeLeaseHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Change the ID of an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 value to operate only on a blob if it has been modified since the specified + * date-time. + * @param ifUnmodifiedSince Specify this value to operate only on a blob if it has not been modified since the + * specified date-time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void changeLease(String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, + OffsetDateTime ifUnmodifiedSince) { + // Generated convenience method for changeLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + changeLeaseWithResponseInternal(leaseId, proposedLeaseId, requestOptions).getValue(); + } + + /** + * Change the ID of an existing lease. + * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param proposedLeaseId The proposed lease ID for the lease. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void changeLease(String leaseId, String proposedLeaseId) { + // Generated convenience method for changeLeaseWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + changeLeaseWithResponseInternal(leaseId, proposedLeaseId, requestOptions).getValue(); + } + + /** + * Returns a list of the blobs in the specified container. + * + * @param prefix Filters the results to return only resources whose name begins with the specified prefix. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param include Specify to include additional, optional 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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; for recursive list, multiple entity levels are supported. (Inclusive). + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the List Blobs API along with {@link ResponseBase}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase + listBlobFlatSegmentWithResponse(String prefix, String marker, Integer maxresults, + List include, Integer timeout, String startFrom, RequestOptions requestOptions) { + // Generated convenience method for listBlobFlatSegmentWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (prefix != null) { + requestOptions.addQueryParam("prefix", prefix, false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (include != null) { + requestOptions.addQueryParam("include", + include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (startFrom != null) { + requestOptions.addQueryParam("startFrom", startFrom, false); + } + Response protocolMethodResponse = listBlobFlatSegmentWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(ListBlobsFlatSegmentResponse.class, XML_SERIALIZER), + new ContainersListBlobFlatSegmentHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Returns a list of the blobs in the specified container. + * + * @param prefix Filters the results to return only resources whose name begins with the specified prefix. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param include Specify to include additional, optional 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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; for recursive list, multiple entity levels are supported. (Inclusive). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the List Blobs API. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ListBlobsFlatSegmentResponse listBlobFlatSegment(String prefix, String marker, Integer maxresults, + List include, Integer timeout, String startFrom) { + // Generated convenience method for listBlobFlatSegmentWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (prefix != null) { + requestOptions.addQueryParam("prefix", prefix, false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (include != null) { + requestOptions.addQueryParam("include", + include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (startFrom != null) { + requestOptions.addQueryParam("startFrom", startFrom, false); + } + return listBlobFlatSegmentWithResponseInternal(requestOptions).getValue() + .toObject(ListBlobsFlatSegmentResponse.class, XML_SERIALIZER); + } + + /** + * Returns a list of the blobs in the specified container. + * + * @throws BlobStorageErrorException 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 the List Blobs API. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ListBlobsFlatSegmentResponse listBlobFlatSegment() { + // Generated convenience method for listBlobFlatSegmentWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return listBlobFlatSegmentWithResponseInternal(requestOptions).getValue() + .toObject(ListBlobsFlatSegmentResponse.class, XML_SERIALIZER); + } + + /** + * Returns a list of the blobs in the specified container. A delimiter can be used to traverse a virtual hierarchy + * of blobs as though it were a file system. + * + * @param delimiter If specified, the operation returns a BlobPrefix element 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 resources whose name begins with the specified prefix. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param include Specify to include additional, optional 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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; for recursive list, multiple entity levels are supported. (Inclusive). + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the List Blobs Hierarchical API along with {@link ResponseBase}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase + listBlobHierarchySegmentWithResponse(String delimiter, String prefix, String marker, Integer maxresults, + List include, Integer timeout, String startFrom, RequestOptions requestOptions) { + // Generated convenience method for listBlobHierarchySegmentWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (prefix != null) { + requestOptions.addQueryParam("prefix", prefix, false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (include != null) { + requestOptions.addQueryParam("include", + include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (startFrom != null) { + requestOptions.addQueryParam("startFrom", startFrom, false); + } + Response protocolMethodResponse + = listBlobHierarchySegmentWithResponseInternal(delimiter, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(ListBlobsHierarchySegmentResponse.class, XML_SERIALIZER), + new ContainersListBlobHierarchySegmentHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Returns a list of the blobs in the specified container. A delimiter can be used to traverse a virtual hierarchy + * of blobs as though it were a file system. + * + * @param delimiter If specified, the operation returns a BlobPrefix element 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 resources whose name begins with the specified prefix. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param include Specify to include additional, optional 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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is + * supported; for recursive list, multiple entity levels are supported. (Inclusive). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the List Blobs Hierarchical API. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ListBlobsHierarchySegmentResponse listBlobHierarchySegment(String delimiter, String prefix, String marker, + Integer maxresults, List include, Integer timeout, String startFrom) { + // Generated convenience method for listBlobHierarchySegmentWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (prefix != null) { + requestOptions.addQueryParam("prefix", prefix, false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (include != null) { + requestOptions.addQueryParam("include", + include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (startFrom != null) { + requestOptions.addQueryParam("startFrom", startFrom, false); + } + return listBlobHierarchySegmentWithResponseInternal(delimiter, requestOptions).getValue() + .toObject(ListBlobsHierarchySegmentResponse.class, XML_SERIALIZER); + } + + /** + * Returns a list of the blobs in the specified container. A delimiter can be used to traverse a virtual hierarchy + * of blobs as though it were a file system. + * + * @param delimiter If specified, the operation returns a BlobPrefix element 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the List Blobs Hierarchical API. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ListBlobsHierarchySegmentResponse listBlobHierarchySegment(String delimiter) { + // Generated convenience method for listBlobHierarchySegmentWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return listBlobHierarchySegmentWithResponseInternal(delimiter, requestOptions).getValue() + .toObject(ListBlobsHierarchySegmentResponse.class, XML_SERIALIZER); + } + + /** + * Returns information about 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getAccountInfoWithResponse(Integer timeout, + RequestOptions requestOptions) { + // Generated convenience method for getAccountInfoWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + Response protocolMethodResponse = getAccountInfoWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new ContainersGetAccountInfoHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Returns information about 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>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void getAccountInfo(Integer timeout) { + // Generated convenience method for getAccountInfoWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + getAccountInfoWithResponseInternal(requestOptions).getValue(); + } + + /** + * Returns information about the storage account. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void getAccountInfo() { + // Generated convenience method for getAccountInfoWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + getAccountInfoWithResponseInternal(requestOptions).getValue(); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobServiceAsyncClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobServiceAsyncClientInternal.java new file mode 100644 index 0000000000000..71be8cb53924b --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobServiceAsyncClientInternal.java @@ -0,0 +1,1175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; +import com.azure.core.util.BinaryData; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.serializer.ObjectSerializer; +import com.azure.storage.blob.implementation.models.BlobContainersSegment; +import com.azure.storage.blob.implementation.models.BlobStorageErrorException; +import com.azure.storage.blob.implementation.models.FilterBlobSegment; +import com.azure.storage.blob.implementation.models.FilterBlobsIncludeItem; +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.models.ServicesListContainersSegmentHeaders; +import com.azure.storage.blob.implementation.models.ServicesSetPropertiesHeaders; +import com.azure.storage.blob.models.BlobServiceProperties; +import com.azure.storage.blob.models.BlobServiceStatistics; +import com.azure.storage.blob.models.KeyInfo; +import com.azure.storage.blob.models.ListBlobContainersIncludeType; +import com.azure.storage.blob.models.UserDelegationKey; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous AzureBlobStorage type. + */ +public final class BlobServiceAsyncClientInternal { + @Generated + private static final ObjectSerializer XML_SERIALIZER = XmlSerializerProviders.createInstance(); + + @Generated + private final ServicesImpl serviceClient; + + /** + * Initializes an instance of BlobServiceAsyncClientInternal class. + * + * @param serviceClient the service client implementation. + */ + @Generated + public BlobServiceAsyncClientInternal(ServicesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and + * CORS (Cross-Origin Resource Sharing) rules. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     Logging (Optional): {
+     *         Version: String (Required)
+     *         Delete: boolean (Required)
+     *         Read: boolean (Required)
+     *         Write: boolean (Required)
+     *         RetentionPolicy (Required): {
+     *             Enabled: boolean (Required)
+     *             Days: Integer (Optional)
+     *             AllowPermanentDelete: Boolean (Optional)
+     *         }
+     *     }
+     *     HourMetrics (Optional): {
+     *         Version: String (Optional)
+     *         Enabled: boolean (Required)
+     *         IncludeAPIs: Boolean (Optional)
+     *         RetentionPolicy (Optional): (recursive schema, see RetentionPolicy above)
+     *     }
+     *     MinuteMetrics (Optional): (recursive schema, see MinuteMetrics above)
+     *     Cors (Optional): [
+     *          (Optional){
+     *             AllowedOrigins: String (Required)
+     *             AllowedMethods: String (Required)
+     *             AllowedHeaders: String (Required)
+     *             ExposedHeaders: String (Required)
+     *             MaxAgeInSeconds: int (Required)
+     *         }
+     *     ]
+     *     DefaultServiceVersion: String (Optional)
+     *     DeleteRetentionPolicy (Optional): (recursive schema, see DeleteRetentionPolicy above)
+     *     StaticWebsite (Optional): {
+     *         Enabled: boolean (Required)
+     *         IndexDocument: String (Optional)
+     *         ErrorDocument404Path: String (Optional)
+     *         DefaultIndexDocumentPath: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param storageServiceProperties The storage service properties to set. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> setPropertiesWithResponseInternal(BinaryData storageServiceProperties, + RequestOptions requestOptions) { + return this.serviceClient.setPropertiesWithResponseInternalAsync(storageServiceProperties, requestOptions); + } + + /** + * Retrieves properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     Logging (Optional): {
+     *         Version: String (Required)
+     *         Delete: boolean (Required)
+     *         Read: boolean (Required)
+     *         Write: boolean (Required)
+     *         RetentionPolicy (Required): {
+     *             Enabled: boolean (Required)
+     *             Days: Integer (Optional)
+     *             AllowPermanentDelete: Boolean (Optional)
+     *         }
+     *     }
+     *     HourMetrics (Optional): {
+     *         Version: String (Optional)
+     *         Enabled: boolean (Required)
+     *         IncludeAPIs: Boolean (Optional)
+     *         RetentionPolicy (Optional): (recursive schema, see RetentionPolicy above)
+     *     }
+     *     MinuteMetrics (Optional): (recursive schema, see MinuteMetrics above)
+     *     Cors (Optional): [
+     *          (Optional){
+     *             AllowedOrigins: String (Required)
+     *             AllowedMethods: String (Required)
+     *             AllowedHeaders: String (Required)
+     *             ExposedHeaders: String (Required)
+     *             MaxAgeInSeconds: int (Required)
+     *         }
+     *     ]
+     *     DefaultServiceVersion: String (Optional)
+     *     DeleteRetentionPolicy (Optional): (recursive schema, see DeleteRetentionPolicy above)
+     *     StaticWebsite (Optional): {
+     *         Enabled: boolean (Required)
+     *         IndexDocument: String (Optional)
+     *         ErrorDocument404Path: String (Optional)
+     *         DefaultIndexDocumentPath: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the blob service properties along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getPropertiesWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getPropertiesWithResponseInternalAsync(requestOptions); + } + + /** + * 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. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     GeoReplication (Optional): {
+     *         Status: String(live/bootstrap/unavailable) (Required)
+     *         LastSyncTime: DateTimeRfc1123 (Required)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return stats for the storage service along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getStatisticsWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getStatisticsWithResponseInternalAsync(requestOptions); + } + + /** + * Returns a list of the containers in the specified account. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
prefixStringNoFilters the results to return only resources whose name begins + * with the specified prefix.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     ServiceEndpoint: String (Required)
+     *     Prefix: String (Optional)
+     *     Marker: String (Optional)
+     *     MaxResults: Integer (Optional)
+     *     Containers (Required): [
+     *          (Required){
+     *             Name: String (Required)
+     *             Deleted: Boolean (Optional)
+     *             Version: String (Optional)
+     *             Properties (Required): {
+     *                 Last-Modified: DateTimeRfc1123 (Required)
+     *                 Etag: String (Required)
+     *                 LeaseStatus: String(unlocked/locked) (Optional)
+     *                 LeaseState: String(available/leased/expired/breaking/broken) (Optional)
+     *                 LeaseDuration: String(infinite/fixed) (Optional)
+     *                 PublicAccess: String(blob/container) (Optional)
+     *                 HasImmutabilityPolicy: Boolean (Optional)
+     *                 HasLegalHold: Boolean (Optional)
+     *                 DefaultEncryptionScope: String (Optional)
+     *                 DenyEncryptionScopeOverride: Boolean (Optional)
+     *                 DeletedTime: DateTimeRfc1123 (Optional)
+     *                 RemainingRetentionDays: Integer (Optional)
+     *                 ImmutableStorageWithVersioningEnabled: Boolean (Optional)
+     *             }
+     *             Metadata (Optional): {
+     *                 String: String (Required)
+     *             }
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the List Containers API along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> listContainersSegmentWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.listContainersSegmentWithResponseInternalAsync(requestOptions); + } + + /** + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token + * authentication. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     Start: String (Required)
+     *     Expiry: String (Required)
+     *     DelegatedUserTid: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     SignedOid: String (Required)
+     *     SignedTid: String (Required)
+     *     SignedStart: OffsetDateTime (Required)
+     *     SignedExpiry: OffsetDateTime (Required)
+     *     SignedService: String (Required)
+     *     SignedVersion: String (Required)
+     *     SignedDelegatedUserTid: String (Optional)
+     *     Value: String (Required)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param keyInfo Key information provided in the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return a user delegation key along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getUserDelegationKeyWithResponseInternal(BinaryData keyInfo, + RequestOptions requestOptions) { + return this.serviceClient.getUserDelegationKeyWithResponseInternalAsync(keyInfo, requestOptions); + } + + /** + * Returns information about the storage account. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-sku-nameStringThe SKU name of the account.
x-ms-account-kindStringThe account kind.
x-ms-is-hns-enabledbooleanIndicates if the account has hierarchical namespace + * enabled.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getAccountInfoWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getAccountInfoWithResponseInternalAsync(requestOptions); + } + + /** + * Allows multiple API calls to be embedded into a single HTTP request. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     body (Required): {
+     *         content: BinaryData (Required)
+     *         filename: String (Optional)
+     *         contentType: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     body (Required): {
+     *         content: BinaryData (Required)
+     *         filename: String (Optional)
+     *         contentType: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param contentLength The length of the request. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> submitBatchWithResponse(long contentLength, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.submitBatchWithResponseAsync(contentLength, body, requestOptions); + } + + /** + * Lists blobs across all containers whose tags match a given search expression. + *

Query Parameters

+ * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     ServiceEndpoint: String (Required)
+     *     Where: String (Required)
+     *     Blobs (Required): [
+     *          (Required){
+     *             Name: String (Required)
+     *             ContainerName: String (Required)
+     *             Tags (Optional): {
+     *                 TagSet (Required): [
+     *                      (Required){
+     *                         Key: String (Required)
+     *                         Value: String (Required)
+     *                     }
+     *                 ]
+     *             }
+     *             VersionId: String (Optional)
+     *             IsCurrentVersion: Boolean (Optional)
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param filterExpression Filters the results to return only blobs whose tags match the specified expression. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the Find Blobs by Tags API along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> filterBlobsWithResponseInternal(String filterExpression, RequestOptions requestOptions) { + return this.serviceClient.filterBlobsWithResponseInternalAsync(filterExpression, requestOptions); + } + + /** + * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and + * CORS (Cross-Origin Resource Sharing) rules. + * + * @param storageServiceProperties The storage service properties to set. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setPropertiesWithResponse( + BlobServiceProperties storageServiceProperties, Integer timeout, RequestOptions requestOptions) { + // Generated convenience method for setPropertiesWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return setPropertiesWithResponseInternal(BinaryData.fromObject(storageServiceProperties, XML_SERIALIZER), + requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new ServicesSetPropertiesHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and + * CORS (Cross-Origin Resource Sharing) rules. + * + * @param storageServiceProperties The storage service properties to set. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setProperties(BlobServiceProperties storageServiceProperties, Integer timeout) { + // Generated convenience method for setPropertiesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return setPropertiesWithResponseInternal(BinaryData.fromObject(storageServiceProperties, XML_SERIALIZER), + requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and + * CORS (Cross-Origin Resource Sharing) rules. + * + * @param storageServiceProperties The storage service properties to set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setProperties(BlobServiceProperties storageServiceProperties) { + // Generated convenience method for setPropertiesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return setPropertiesWithResponseInternal(BinaryData.fromObject(storageServiceProperties, XML_SERIALIZER), + requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Retrieves 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the blob service properties along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + getPropertiesWithResponse(Integer timeout, RequestOptions requestOptions) { + // Generated convenience method for getPropertiesWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return getPropertiesWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(BlobServiceProperties.class, XML_SERIALIZER), + new ServicesGetPropertiesHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Retrieves 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>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the blob service properties on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getProperties(Integer timeout) { + // Generated convenience method for getPropertiesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return getPropertiesWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(BlobServiceProperties.class, XML_SERIALIZER)); + } + + /** + * Retrieves properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the blob service properties on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getProperties() { + // Generated convenience method for getPropertiesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getPropertiesWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(BlobServiceProperties.class, XML_SERIALIZER)); + } + + /** + * 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + getStatisticsWithResponse(Integer timeout, RequestOptions requestOptions) { + // Generated convenience method for getStatisticsWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return getStatisticsWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(BlobServiceStatistics.class, XML_SERIALIZER), + new ServicesGetStatisticsHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * 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>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getStatistics(Integer timeout) { + // Generated convenience method for getStatisticsWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return getStatisticsWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(BlobServiceStatistics.class, XML_SERIALIZER)); + } + + /** + * 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. + * + * @throws BlobStorageErrorException 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 on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getStatistics() { + // Generated convenience method for getStatisticsWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getStatisticsWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(BlobServiceStatistics.class, XML_SERIALIZER)); + } + + /** + * Returns a list of the containers in the specified account. + * + * @param prefix Filters the results to return only resources whose name begins with the specified prefix. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param include Specify to include additional, optional information. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the List Containers API along with {@link ResponseBase} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + listContainersSegmentWithResponse(String prefix, String marker, Integer maxresults, Integer timeout, + List include, RequestOptions requestOptions) { + // Generated convenience method for listContainersSegmentWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (prefix != null) { + requestOptions.addQueryParam("prefix", prefix, false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (include != null) { + requestOptions.addQueryParam("include", + include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + return listContainersSegmentWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(BlobContainersSegment.class, XML_SERIALIZER), + new ServicesListContainersSegmentHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Returns a list of the containers in the specified account. + * + * @param prefix Filters the results to return only resources whose name begins with the specified prefix. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param include Specify to include additional, optional information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the List Containers API on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listContainersSegment(String prefix, String marker, Integer maxresults, + Integer timeout, List include) { + // Generated convenience method for listContainersSegmentWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (prefix != null) { + requestOptions.addQueryParam("prefix", prefix, false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (include != null) { + requestOptions.addQueryParam("include", + include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + return listContainersSegmentWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(BlobContainersSegment.class, XML_SERIALIZER)); + } + + /** + * Returns a list of the containers in the specified account. + * + * @throws BlobStorageErrorException 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 the List Containers API on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listContainersSegment() { + // Generated convenience method for listContainersSegmentWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return listContainersSegmentWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(BlobContainersSegment.class, XML_SERIALIZER)); + } + + /** + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information provided in 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> + getUserDelegationKeyWithResponse(KeyInfo keyInfo, Integer timeout, RequestOptions requestOptions) { + // Generated convenience method for getUserDelegationKeyWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return getUserDelegationKeyWithResponseInternal(BinaryData.fromObject(keyInfo, XML_SERIALIZER), requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(UserDelegationKey.class, XML_SERIALIZER), + new ServicesGetUserDelegationKeyHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information provided in 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>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getUserDelegationKey(KeyInfo keyInfo, Integer timeout) { + // Generated convenience method for getUserDelegationKeyWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return getUserDelegationKeyWithResponseInternal(BinaryData.fromObject(keyInfo, XML_SERIALIZER), requestOptions) + .flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(UserDelegationKey.class, XML_SERIALIZER)); + } + + /** + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information provided in the request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getUserDelegationKey(KeyInfo keyInfo) { + // Generated convenience method for getUserDelegationKeyWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getUserDelegationKeyWithResponseInternal(BinaryData.fromObject(keyInfo, XML_SERIALIZER), requestOptions) + .flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(UserDelegationKey.class, XML_SERIALIZER)); + } + + /** + * Returns information about 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAccountInfoWithResponse(Integer timeout, + RequestOptions requestOptions) { + // Generated convenience method for getAccountInfoWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return getAccountInfoWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new ServicesGetAccountInfoHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Returns information about 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>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAccountInfo(Integer timeout) { + // Generated convenience method for getAccountInfoWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return getAccountInfoWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Returns information about the storage account. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAccountInfo() { + // Generated convenience method for getAccountInfoWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getAccountInfoWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Lists blobs across all containers whose tags match a given search expression. + * + * @param filterExpression Filters the results to return only blobs whose tags match the specified expression. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param include Specify to include additional, optional information. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Find Blobs by Tags API along with {@link ResponseBase} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> filterBlobsWithResponse( + String filterExpression, Integer timeout, String marker, Integer maxresults, + List include, RequestOptions requestOptions) { + // Generated convenience method for filterBlobsWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (include != null) { + requestOptions.addQueryParam("include", + include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + return filterBlobsWithResponseInternal(filterExpression, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(FilterBlobSegment.class, XML_SERIALIZER), + new ServicesFilterBlobsHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Lists blobs across all containers whose tags match a given search expression. + * + * @param filterExpression Filters the results to return only blobs whose tags match the specified expression. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param include Specify to include additional, optional information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Find Blobs by Tags API on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono filterBlobs(String filterExpression, Integer timeout, String marker, + Integer maxresults, List include) { + // Generated convenience method for filterBlobsWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (include != null) { + requestOptions.addQueryParam("include", + include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + return filterBlobsWithResponseInternal(filterExpression, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(FilterBlobSegment.class, XML_SERIALIZER)); + } + + /** + * Lists blobs across all containers whose tags match a given search expression. + * + * @param filterExpression Filters the results to return only blobs whose tags match the specified expression. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Find Blobs by Tags API on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono filterBlobs(String filterExpression) { + // Generated convenience method for filterBlobsWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return filterBlobsWithResponseInternal(filterExpression, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(FilterBlobSegment.class, XML_SERIALIZER)); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobServiceClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobServiceClientInternal.java new file mode 100644 index 0000000000000..e20a7b8268ee4 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobServiceClientInternal.java @@ -0,0 +1,1165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; +import com.azure.core.util.BinaryData; +import com.azure.core.util.serializer.ObjectSerializer; +import com.azure.storage.blob.implementation.models.BlobContainersSegment; +import com.azure.storage.blob.implementation.models.BlobStorageErrorException; +import com.azure.storage.blob.implementation.models.FilterBlobSegment; +import com.azure.storage.blob.implementation.models.FilterBlobsIncludeItem; +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.models.ServicesListContainersSegmentHeaders; +import com.azure.storage.blob.implementation.models.ServicesSetPropertiesHeaders; +import com.azure.storage.blob.models.BlobServiceProperties; +import com.azure.storage.blob.models.BlobServiceStatistics; +import com.azure.storage.blob.models.KeyInfo; +import com.azure.storage.blob.models.ListBlobContainersIncludeType; +import com.azure.storage.blob.models.UserDelegationKey; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * Initializes a new instance of the synchronous AzureBlobStorage type. + */ +public final class BlobServiceClientInternal { + @Generated + private static final ObjectSerializer XML_SERIALIZER = XmlSerializerProviders.createInstance(); + + @Generated + private final ServicesImpl serviceClient; + + /** + * Initializes an instance of BlobServiceClientInternal class. + * + * @param serviceClient the service client implementation. + */ + @Generated + public BlobServiceClientInternal(ServicesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and + * CORS (Cross-Origin Resource Sharing) rules. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     Logging (Optional): {
+     *         Version: String (Required)
+     *         Delete: boolean (Required)
+     *         Read: boolean (Required)
+     *         Write: boolean (Required)
+     *         RetentionPolicy (Required): {
+     *             Enabled: boolean (Required)
+     *             Days: Integer (Optional)
+     *             AllowPermanentDelete: Boolean (Optional)
+     *         }
+     *     }
+     *     HourMetrics (Optional): {
+     *         Version: String (Optional)
+     *         Enabled: boolean (Required)
+     *         IncludeAPIs: Boolean (Optional)
+     *         RetentionPolicy (Optional): (recursive schema, see RetentionPolicy above)
+     *     }
+     *     MinuteMetrics (Optional): (recursive schema, see MinuteMetrics above)
+     *     Cors (Optional): [
+     *          (Optional){
+     *             AllowedOrigins: String (Required)
+     *             AllowedMethods: String (Required)
+     *             AllowedHeaders: String (Required)
+     *             ExposedHeaders: String (Required)
+     *             MaxAgeInSeconds: int (Required)
+     *         }
+     *     ]
+     *     DefaultServiceVersion: String (Optional)
+     *     DeleteRetentionPolicy (Optional): (recursive schema, see DeleteRetentionPolicy above)
+     *     StaticWebsite (Optional): {
+     *         Enabled: boolean (Required)
+     *         IndexDocument: String (Optional)
+     *         ErrorDocument404Path: String (Optional)
+     *         DefaultIndexDocumentPath: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param storageServiceProperties The storage service properties to set. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response setPropertiesWithResponseInternal(BinaryData storageServiceProperties, + RequestOptions requestOptions) { + return this.serviceClient.setPropertiesWithResponseInternal(storageServiceProperties, requestOptions); + } + + /** + * Retrieves properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     Logging (Optional): {
+     *         Version: String (Required)
+     *         Delete: boolean (Required)
+     *         Read: boolean (Required)
+     *         Write: boolean (Required)
+     *         RetentionPolicy (Required): {
+     *             Enabled: boolean (Required)
+     *             Days: Integer (Optional)
+     *             AllowPermanentDelete: Boolean (Optional)
+     *         }
+     *     }
+     *     HourMetrics (Optional): {
+     *         Version: String (Optional)
+     *         Enabled: boolean (Required)
+     *         IncludeAPIs: Boolean (Optional)
+     *         RetentionPolicy (Optional): (recursive schema, see RetentionPolicy above)
+     *     }
+     *     MinuteMetrics (Optional): (recursive schema, see MinuteMetrics above)
+     *     Cors (Optional): [
+     *          (Optional){
+     *             AllowedOrigins: String (Required)
+     *             AllowedMethods: String (Required)
+     *             AllowedHeaders: String (Required)
+     *             ExposedHeaders: String (Required)
+     *             MaxAgeInSeconds: int (Required)
+     *         }
+     *     ]
+     *     DefaultServiceVersion: String (Optional)
+     *     DeleteRetentionPolicy (Optional): (recursive schema, see DeleteRetentionPolicy above)
+     *     StaticWebsite (Optional): {
+     *         Enabled: boolean (Required)
+     *         IndexDocument: String (Optional)
+     *         ErrorDocument404Path: String (Optional)
+     *         DefaultIndexDocumentPath: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the blob service properties along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPropertiesWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getPropertiesWithResponseInternal(requestOptions); + } + + /** + * 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. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     GeoReplication (Optional): {
+     *         Status: String(live/bootstrap/unavailable) (Required)
+     *         LastSyncTime: DateTimeRfc1123 (Required)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return stats for the storage service along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response getStatisticsWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getStatisticsWithResponseInternal(requestOptions); + } + + /** + * Returns a list of the containers in the specified account. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
prefixStringNoFilters the results to return only resources whose name begins + * with the specified prefix.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     ServiceEndpoint: String (Required)
+     *     Prefix: String (Optional)
+     *     Marker: String (Optional)
+     *     MaxResults: Integer (Optional)
+     *     Containers (Required): [
+     *          (Required){
+     *             Name: String (Required)
+     *             Deleted: Boolean (Optional)
+     *             Version: String (Optional)
+     *             Properties (Required): {
+     *                 Last-Modified: DateTimeRfc1123 (Required)
+     *                 Etag: String (Required)
+     *                 LeaseStatus: String(unlocked/locked) (Optional)
+     *                 LeaseState: String(available/leased/expired/breaking/broken) (Optional)
+     *                 LeaseDuration: String(infinite/fixed) (Optional)
+     *                 PublicAccess: String(blob/container) (Optional)
+     *                 HasImmutabilityPolicy: Boolean (Optional)
+     *                 HasLegalHold: Boolean (Optional)
+     *                 DefaultEncryptionScope: String (Optional)
+     *                 DenyEncryptionScopeOverride: Boolean (Optional)
+     *                 DeletedTime: DateTimeRfc1123 (Optional)
+     *                 RemainingRetentionDays: Integer (Optional)
+     *                 ImmutableStorageWithVersioningEnabled: Boolean (Optional)
+     *             }
+     *             Metadata (Optional): {
+     *                 String: String (Required)
+     *             }
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the List Containers API along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response listContainersSegmentWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.listContainersSegmentWithResponseInternal(requestOptions); + } + + /** + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token + * authentication. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     Start: String (Required)
+     *     Expiry: String (Required)
+     *     DelegatedUserTid: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     SignedOid: String (Required)
+     *     SignedTid: String (Required)
+     *     SignedStart: OffsetDateTime (Required)
+     *     SignedExpiry: OffsetDateTime (Required)
+     *     SignedService: String (Required)
+     *     SignedVersion: String (Required)
+     *     SignedDelegatedUserTid: String (Optional)
+     *     Value: String (Required)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param keyInfo Key information provided in the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return a user delegation key along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response getUserDelegationKeyWithResponseInternal(BinaryData keyInfo, RequestOptions requestOptions) { + return this.serviceClient.getUserDelegationKeyWithResponseInternal(keyInfo, requestOptions); + } + + /** + * Returns information about the storage account. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-sku-nameStringThe SKU name of the account.
x-ms-account-kindStringThe account kind.
x-ms-is-hns-enabledbooleanIndicates if the account has hierarchical namespace + * enabled.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAccountInfoWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getAccountInfoWithResponseInternal(requestOptions); + } + + /** + * Allows multiple API calls to be embedded into a single HTTP request. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     body (Required): {
+     *         content: BinaryData (Required)
+     *         filename: String (Optional)
+     *         contentType: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     body (Required): {
+     *         content: BinaryData (Required)
+     *         filename: String (Optional)
+     *         contentType: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param contentLength The length of the request. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response submitBatchWithResponse(long contentLength, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.submitBatchWithResponse(contentLength, body, requestOptions); + } + + /** + * Lists blobs across all containers whose tags match a given search expression. + *

Query Parameters

+ * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     ServiceEndpoint: String (Required)
+     *     Where: String (Required)
+     *     Blobs (Required): [
+     *          (Required){
+     *             Name: String (Required)
+     *             ContainerName: String (Required)
+     *             Tags (Optional): {
+     *                 TagSet (Required): [
+     *                      (Required){
+     *                         Key: String (Required)
+     *                         Value: String (Required)
+     *                     }
+     *                 ]
+     *             }
+     *             VersionId: String (Optional)
+     *             IsCurrentVersion: Boolean (Optional)
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param filterExpression Filters the results to return only blobs whose tags match the specified expression. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the Find Blobs by Tags API along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response filterBlobsWithResponseInternal(String filterExpression, RequestOptions requestOptions) { + return this.serviceClient.filterBlobsWithResponseInternal(filterExpression, requestOptions); + } + + /** + * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and + * CORS (Cross-Origin Resource Sharing) rules. + * + * @param storageServiceProperties The storage service properties to set. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setPropertiesWithResponse( + BlobServiceProperties storageServiceProperties, Integer timeout, RequestOptions requestOptions) { + // Generated convenience method for setPropertiesWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + Response protocolMethodResponse = setPropertiesWithResponseInternal( + BinaryData.fromObject(storageServiceProperties, XML_SERIALIZER), requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new ServicesSetPropertiesHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and + * CORS (Cross-Origin Resource Sharing) rules. + * + * @param storageServiceProperties The storage service properties to set. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setProperties(BlobServiceProperties storageServiceProperties, Integer timeout) { + // Generated convenience method for setPropertiesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + setPropertiesWithResponseInternal(BinaryData.fromObject(storageServiceProperties, XML_SERIALIZER), + requestOptions).getValue(); + } + + /** + * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and + * CORS (Cross-Origin Resource Sharing) rules. + * + * @param storageServiceProperties The storage service properties to set. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setProperties(BlobServiceProperties storageServiceProperties) { + // Generated convenience method for setPropertiesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + setPropertiesWithResponseInternal(BinaryData.fromObject(storageServiceProperties, XML_SERIALIZER), + requestOptions).getValue(); + } + + /** + * Retrieves 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the blob service properties along with {@link ResponseBase}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getPropertiesWithResponse(Integer timeout, + RequestOptions requestOptions) { + // Generated convenience method for getPropertiesWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + Response protocolMethodResponse = getPropertiesWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(BlobServiceProperties.class, XML_SERIALIZER), + new ServicesGetPropertiesHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Retrieves 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>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the blob service properties. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobServiceProperties getProperties(Integer timeout) { + // Generated convenience method for getPropertiesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return getPropertiesWithResponseInternal(requestOptions).getValue() + .toObject(BlobServiceProperties.class, XML_SERIALIZER); + } + + /** + * Retrieves properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the blob service properties. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobServiceProperties getProperties() { + // Generated convenience method for getPropertiesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getPropertiesWithResponseInternal(requestOptions).getValue() + .toObject(BlobServiceProperties.class, XML_SERIALIZER); + } + + /** + * 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getStatisticsWithResponse(Integer timeout, + RequestOptions requestOptions) { + // Generated convenience method for getStatisticsWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + Response protocolMethodResponse = getStatisticsWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(BlobServiceStatistics.class, XML_SERIALIZER), + new ServicesGetStatisticsHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * 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>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobServiceStatistics getStatistics(Integer timeout) { + // Generated convenience method for getStatisticsWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return getStatisticsWithResponseInternal(requestOptions).getValue() + .toObject(BlobServiceStatistics.class, XML_SERIALIZER); + } + + /** + * 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. + * + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobServiceStatistics getStatistics() { + // Generated convenience method for getStatisticsWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getStatisticsWithResponseInternal(requestOptions).getValue() + .toObject(BlobServiceStatistics.class, XML_SERIALIZER); + } + + /** + * Returns a list of the containers in the specified account. + * + * @param prefix Filters the results to return only resources whose name begins with the specified prefix. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param include Specify to include additional, optional information. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the List Containers API along with {@link ResponseBase}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase listContainersSegmentWithResponse( + String prefix, String marker, Integer maxresults, Integer timeout, List include, + RequestOptions requestOptions) { + // Generated convenience method for listContainersSegmentWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (prefix != null) { + requestOptions.addQueryParam("prefix", prefix, false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (include != null) { + requestOptions.addQueryParam("include", + include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + Response protocolMethodResponse = listContainersSegmentWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(BlobContainersSegment.class, XML_SERIALIZER), + new ServicesListContainersSegmentHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Returns a list of the containers in the specified account. + * + * @param prefix Filters the results to return only resources whose name begins with the specified prefix. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param include Specify to include additional, optional information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the List Containers API. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobContainersSegment listContainersSegment(String prefix, String marker, Integer maxresults, + Integer timeout, List include) { + // Generated convenience method for listContainersSegmentWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (prefix != null) { + requestOptions.addQueryParam("prefix", prefix, false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (include != null) { + requestOptions.addQueryParam("include", + include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + return listContainersSegmentWithResponseInternal(requestOptions).getValue() + .toObject(BlobContainersSegment.class, XML_SERIALIZER); + } + + /** + * Returns a list of the containers in the specified account. + * + * @throws BlobStorageErrorException 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 the List Containers API. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BlobContainersSegment listContainersSegment() { + // Generated convenience method for listContainersSegmentWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return listContainersSegmentWithResponseInternal(requestOptions).getValue() + .toObject(BlobContainersSegment.class, XML_SERIALIZER); + } + + /** + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information provided in 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase + getUserDelegationKeyWithResponse(KeyInfo keyInfo, Integer timeout, RequestOptions requestOptions) { + // Generated convenience method for getUserDelegationKeyWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + Response protocolMethodResponse + = getUserDelegationKeyWithResponseInternal(BinaryData.fromObject(keyInfo, XML_SERIALIZER), requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(UserDelegationKey.class, XML_SERIALIZER), + new ServicesGetUserDelegationKeyHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information provided in 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>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public UserDelegationKey getUserDelegationKey(KeyInfo keyInfo, Integer timeout) { + // Generated convenience method for getUserDelegationKeyWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + return getUserDelegationKeyWithResponseInternal(BinaryData.fromObject(keyInfo, XML_SERIALIZER), requestOptions) + .getValue() + .toObject(UserDelegationKey.class, XML_SERIALIZER); + } + + /** + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token + * authentication. + * + * @param keyInfo Key information provided in the request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public UserDelegationKey getUserDelegationKey(KeyInfo keyInfo) { + // Generated convenience method for getUserDelegationKeyWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getUserDelegationKeyWithResponseInternal(BinaryData.fromObject(keyInfo, XML_SERIALIZER), requestOptions) + .getValue() + .toObject(UserDelegationKey.class, XML_SERIALIZER); + } + + /** + * Returns information about 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getAccountInfoWithResponse(Integer timeout, + RequestOptions requestOptions) { + // Generated convenience method for getAccountInfoWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + Response protocolMethodResponse = getAccountInfoWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new ServicesGetAccountInfoHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Returns information about 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>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void getAccountInfo(Integer timeout) { + // Generated convenience method for getAccountInfoWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + getAccountInfoWithResponseInternal(requestOptions).getValue(); + } + + /** + * Returns information about the storage account. + * + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void getAccountInfo() { + // Generated convenience method for getAccountInfoWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + getAccountInfoWithResponseInternal(requestOptions).getValue(); + } + + /** + * Lists blobs across all containers whose tags match a given search expression. + * + * @param filterExpression Filters the results to return only blobs whose tags match the specified expression. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param include Specify to include additional, optional information. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Find Blobs by Tags API along with {@link ResponseBase}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase filterBlobsWithResponse(String filterExpression, + Integer timeout, String marker, Integer maxresults, List include, + RequestOptions requestOptions) { + // Generated convenience method for filterBlobsWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (include != null) { + requestOptions.addQueryParam("include", + include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + Response protocolMethodResponse = filterBlobsWithResponseInternal(filterExpression, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(FilterBlobSegment.class, XML_SERIALIZER), + new ServicesFilterBlobsHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Lists blobs across all containers whose tags match a given search expression. + * + * @param filterExpression Filters the results to return only blobs whose tags match the specified expression. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param include Specify to include additional, optional information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Find Blobs by Tags API. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public FilterBlobSegment filterBlobs(String filterExpression, Integer timeout, String marker, Integer maxresults, + List include) { + // Generated convenience method for filterBlobsWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (include != null) { + requestOptions.addQueryParam("include", + include.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + return filterBlobsWithResponseInternal(filterExpression, requestOptions).getValue() + .toObject(FilterBlobSegment.class, XML_SERIALIZER); + } + + /** + * Lists blobs across all containers whose tags match a given search expression. + * + * @param filterExpression Filters the results to return only blobs whose tags match the specified expression. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Find Blobs by Tags API. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public FilterBlobSegment filterBlobs(String filterExpression) { + // Generated convenience method for filterBlobsWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return filterBlobsWithResponseInternal(filterExpression, requestOptions).getValue() + .toObject(FilterBlobSegment.class, XML_SERIALIZER); + } +} 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 0b446913c2db9..17230e450666e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation; import com.azure.core.annotation.BodyParam; @@ -11,7 +11,6 @@ import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; @@ -19,61 +18,17 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.ResponseBase; import com.azure.core.http.rest.RestProxy; -import com.azure.core.http.rest.StreamResponse; -import com.azure.core.util.Base64Util; +import com.azure.core.util.BinaryData; 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.BlobDeleteType; -import com.azure.storage.blob.implementation.models.BlobExpiryOptions; -import com.azure.storage.blob.implementation.models.BlobLayoutInternal; -import com.azure.storage.blob.implementation.models.BlobStorageExceptionInternal; -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; -import com.azure.storage.blob.implementation.models.BlobsChangeLeaseHeaders; -import com.azure.storage.blob.implementation.models.BlobsCopyFromURLHeaders; -import com.azure.storage.blob.implementation.models.BlobsCreateSnapshotHeaders; -import com.azure.storage.blob.implementation.models.BlobsDeleteHeaders; -import com.azure.storage.blob.implementation.models.BlobsDeleteImmutabilityPolicyHeaders; -import com.azure.storage.blob.implementation.models.BlobsDownloadHeaders; -import com.azure.storage.blob.implementation.models.BlobsGetAccountInfoHeaders; -import com.azure.storage.blob.implementation.models.BlobsGetLayoutHeaders; -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.BlobsReleaseLeaseHeaders; -import com.azure.storage.blob.implementation.models.BlobsRenewLeaseHeaders; -import com.azure.storage.blob.implementation.models.BlobsSetExpiryHeaders; -import com.azure.storage.blob.implementation.models.BlobsSetHttpHeadersHeaders; -import com.azure.storage.blob.implementation.models.BlobsSetImmutabilityPolicyHeaders; -import com.azure.storage.blob.implementation.models.BlobsSetLegalHoldHeaders; -import com.azure.storage.blob.implementation.models.BlobsSetMetadataHeaders; -import com.azure.storage.blob.implementation.models.BlobsSetTagsHeaders; -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.EncryptionScope; -import com.azure.storage.blob.implementation.models.QueryRequest; +import com.azure.storage.blob.BlobServiceVersion; +import com.azure.storage.blob.implementation.models.BlobStorageErrorException; import com.azure.storage.blob.implementation.util.ModelHelper; -import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobCopySourceTagsMode; -import com.azure.storage.blob.models.BlobHttpHeaders; -import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; -import com.azure.storage.blob.models.CpkInfo; -import com.azure.storage.blob.models.DeleteSnapshotsOptionType; -import com.azure.storage.blob.models.EncryptionAlgorithmType; -import com.azure.storage.blob.models.FileShareTokenIntent; -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; /** @@ -101,6 +56,19 @@ public final class BlobsImpl { this.client = client; } + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public BlobServiceVersion getServiceVersion() { + try { + return client.getServiceVersion(); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } + } + /** * The interface defining all the services for AzureBlobStorageBlobs to be used by the proxy service to perform REST * calls. @@ -109,11900 +77,4164 @@ public final class BlobsImpl { @ServiceInterface(name = "AzureBlobStorageBlobs") public interface BlobsService { - @Get("/{containerName}/{blob}") + @Get("/") @ExpectedResponses({ 200, 206 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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-structured-body") String structuredBodyType, - @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(BlobStorageExceptionInternal.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-structured-body") String structuredBodyType, - @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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> download(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); - @Get("/{containerName}/{blob}") + @Get("/") @ExpectedResponses({ 200, 206 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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-structured-body") String structuredBodyType, - @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(BlobStorageExceptionInternal.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-structured-body") String structuredBodyType, - @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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response downloadSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Head("/{containerName}/{blob}") + @Head("/") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> getProperties(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Head("/{containerName}/{blob}") + @Head("/") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response getPropertiesSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Delete("/{containerName}/{blob}") + @Delete("/") @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-access-tier-if-modified-since") DateTimeRfc1123 accessTierIfModifiedSince, - @HeaderParam("x-ms-access-tier-if-unmodified-since") DateTimeRfc1123 accessTierIfUnmodifiedSince, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> delete(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Delete("/{containerName}/{blob}") + @Delete("/") @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-access-tier-if-modified-since") DateTimeRfc1123 accessTierIfModifiedSince, - @HeaderParam("x-ms-access-tier-if-unmodified-since") DateTimeRfc1123 accessTierIfUnmodifiedSince, - @HeaderParam("Accept") String accept, Context context); - - @Delete("/{containerName}/{blob}") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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("x-ms-access-tier-if-modified-since") DateTimeRfc1123 accessTierIfModifiedSince, - @HeaderParam("x-ms-access-tier-if-unmodified-since") DateTimeRfc1123 accessTierIfUnmodifiedSince, - @HeaderParam("Accept") String accept, Context context); - - @Delete("/{containerName}/{blob}") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-access-tier-if-modified-since") DateTimeRfc1123 accessTierIfModifiedSince, - @HeaderParam("x-ms-access-tier-if-unmodified-since") DateTimeRfc1123 accessTierIfUnmodifiedSince, - @HeaderParam("Accept") String accept, Context context); - - @Get("/{containerName}/{blob}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - Mono> getLayout(@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("marker") String marker, - @QueryParam("maxresults") Integer maxresults, @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-if-tags") String ifTags, - @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-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @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, 204 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - Mono> getLayoutNoCustomHeaders(@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("marker") String marker, - @QueryParam("maxresults") Integer maxresults, @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-if-tags") String ifTags, - @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-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @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, 204 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - ResponseBase getLayoutSync(@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("marker") String marker, - @QueryParam("maxresults") Integer maxresults, @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-if-tags") String ifTags, - @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-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @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, 204 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - Response getLayoutNoCustomHeadersSync(@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("marker") String marker, - @QueryParam("maxresults") Integer maxresults, @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-lease-id") String leaseId, - @HeaderParam("x-ms-if-tags") String ifTags, - @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-encryption-key") String encryptionKey, - @HeaderParam("x-ms-encryption-key-sha256") String encryptionKeySha256, - @HeaderParam("x-ms-encryption-algorithm") EncryptionAlgorithmType encryptionAlgorithm, - @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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.class) - 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 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, - @HeaderParam("Accept") String accept, Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response deleteSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=undelete") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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, - @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> undelete(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=undelete") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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, - @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response undeleteSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Delete("/{containerName}/{blob}") + @Put("?comp=expiry") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> setExpiry(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-expiry-option") String expiryOptions, RequestOptions requestOptions, Context context); - @Delete("/{containerName}/{blob}") + @Put("?comp=expiry") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response setExpirySync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-expiry-option") String expiryOptions, RequestOptions requestOptions, Context context); - @Delete("/{containerName}/{blob}") + @Put("?comp=properties") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> setHttpHeaders(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, RequestOptions requestOptions, Context context); - @Delete("/{containerName}/{blob}") + @Put("?comp=properties") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @QueryParam("snapshot") String snapshot, @QueryParam("versionid") String versionId, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response setHttpHeadersSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=immutabilityPolicies") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, @QueryParam("snapshot") String snapshot, - @QueryParam("versionid") String versionId, @HeaderParam("Accept") String accept, Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, @QueryParam("snapshot") String snapshot, - @QueryParam("versionid") String versionId, @HeaderParam("Accept") String accept, Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, @QueryParam("snapshot") String snapshot, - @QueryParam("versionid") String versionId, @HeaderParam("Accept") String accept, Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, @QueryParam("snapshot") String snapshot, - @QueryParam("versionid") String versionId, @HeaderParam("Accept") String accept, Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> setImmutabilityPolicy(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 expiry, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=immutabilityPolicies") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response setImmutabilityPolicySync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-immutability-policy-until-date") DateTimeRfc1123 expiry, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Delete("?comp=immutabilityPolicies") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> deleteImmutabilityPolicy(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Delete("?comp=immutabilityPolicies") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response deleteImmutabilityPolicySync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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}") + @Put("?comp=legalhold") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> setLegalHold(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-legal-hold") boolean legalHold, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=legalhold") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response setLegalHoldSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-legal-hold") boolean legalHold, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=metadata") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> setMetadata(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=metadata") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response setMetadataSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @Put("?comp=lease") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> acquireLease(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-lease-duration") int duration, @HeaderParam("x-ms-lease-action") String action, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @Put("?comp=lease") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response acquireLeaseSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-lease-duration") int duration, @HeaderParam("x-ms-lease-action") String action, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=lease") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> releaseLease(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-lease-action") String action, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=lease") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response releaseLeaseSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-lease-action") String action, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=lease") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> renewLease(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-lease-action") String action, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=lease") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response renewLeaseSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-lease-action") String action, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=lease") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> changeLease(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, + @HeaderParam("x-ms-lease-action") String action, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=lease") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response changeLeaseSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, + @HeaderParam("x-ms-lease-action") String action, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=lease") @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> breakLease(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-lease-action") String action, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=lease") @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response breakLeaseSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-lease-action") String action, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=snapshot") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> createSnapshot(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=snapshot") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response createSnapshotSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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}") + @Put("/") @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> startCopyFromUrl(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("x-ms-copy-source") String copySource, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("/") @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-file-request-intent") FileShareTokenIntent fileRequestIntent, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response startCopyFromUrlSync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("x-ms-copy-source") String copySource, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("/") @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-file-request-intent") FileShareTokenIntent fileRequestIntent, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> copyFromUrl(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-copy-source") String copySource, @HeaderParam("x-ms-requires-sync") String requiresSync, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("/") @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-file-request-intent") FileShareTokenIntent fileRequestIntent, - @HeaderParam("Accept") String accept, Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-file-request-intent") FileShareTokenIntent fileRequestIntent, - @HeaderParam("Accept") String accept, Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response copyFromUrlSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-copy-source") String copySource, @HeaderParam("x-ms-requires-sync") String requiresSync, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=copy") @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> abortCopyFromUrl(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @QueryParam("copyid") String copyId, + @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=copy") @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response abortCopyFromUrlSync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @QueryParam("copyid") String copyId, + @HeaderParam("x-ms-copy-action") String copyActionAbortConstant, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=tier") @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> setTier(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-access-tier") String tier, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=tier") @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response setTierSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-access-tier") String tier, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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); - - @Get("/{containerName}/{blob}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); - - @Get("/{containerName}/{blob}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - ResponseBase getAccountInfoSync(@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); - - @Get("/{containerName}/{blob}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - Response getAccountInfoNoCustomHeadersSync(@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); - - @Post("/{containerName}/{blob}") - @ExpectedResponses({ 200, 206 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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); - - @Post("/{containerName}/{blob}") - @ExpectedResponses({ 200, 206 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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}") + @Get("?restype=account&comp=properties") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-blob-if-modified-since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("x-ms-blob-if-unmodified-since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-blob-if-match") String ifMatch, - @HeaderParam("x-ms-blob-if-none-match") String ifNoneMatch, @HeaderParam("Accept") String accept, - Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> getAccountInfo(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, RequestOptions requestOptions, Context context); - @Get("/{containerName}/{blob}") + @Get("?restype=account&comp=properties") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-blob-if-modified-since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("x-ms-blob-if-unmodified-since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-blob-if-match") String ifMatch, - @HeaderParam("x-ms-blob-if-none-match") String ifNoneMatch, @HeaderParam("Accept") String accept, - Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response getAccountInfoSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Get("/{containerName}/{blob}") + @Get("?comp=tags") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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("x-ms-blob-if-modified-since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("x-ms-blob-if-unmodified-since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-blob-if-match") String ifMatch, - @HeaderParam("x-ms-blob-if-none-match") String ifNoneMatch, @HeaderParam("Accept") String accept, - Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> getTags(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Get("/{containerName}/{blob}") + @Get("?comp=tags") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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("x-ms-blob-if-modified-since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("x-ms-blob-if-unmodified-since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-blob-if-match") String ifMatch, - @HeaderParam("x-ms-blob-if-none-match") String ifNoneMatch, @HeaderParam("Accept") String accept, - Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response getTagsSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=tags") @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-blob-if-modified-since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("x-ms-blob-if-unmodified-since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-blob-if-match") String ifMatch, - @HeaderParam("x-ms-blob-if-none-match") String ifNoneMatch, @BodyParam("application/xml") BlobTags tags, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> setTags(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/xml") BinaryData tags, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=tags") @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-blob-if-modified-since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("x-ms-blob-if-unmodified-since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-blob-if-match") String ifMatch, - @HeaderParam("x-ms-blob-if-none-match") String ifNoneMatch, @BodyParam("application/xml") BlobTags tags, - @HeaderParam("Accept") String accept, Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-blob-if-modified-since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("x-ms-blob-if-unmodified-since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-blob-if-match") String ifMatch, - @HeaderParam("x-ms-blob-if-none-match") String ifNoneMatch, @BodyParam("application/xml") BlobTags tags, - @HeaderParam("Accept") String accept, Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-blob-if-modified-since") DateTimeRfc1123 ifModifiedSince, - @HeaderParam("x-ms-blob-if-unmodified-since") DateTimeRfc1123 ifUnmodifiedSince, - @HeaderParam("x-ms-blob-if-match") String ifMatch, - @HeaderParam("x-ms-blob-if-none-match") String ifNoneMatch, @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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Specifies the response content should be returned as a structured message and specifies - * the message schema version and properties. - * @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 BlobStorageExceptionInternal 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} 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, String structuredBodyType, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, - String ifTags, String requestId, CpkInfo cpkInfo) { - return FluxUtil - .withContext(context -> downloadWithResponseAsync(containerName, blob, snapshot, versionId, timeout, range, - leaseId, rangeGetContentMD5, rangeGetContentCRC64, structuredBodyType, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Specifies the response content should be returned as a structured message and specifies - * the message schema version and properties. - * @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 BlobStorageExceptionInternal 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} 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, String structuredBodyType, - 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 - .download(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, range, leaseId, - rangeGetContentMD5, rangeGetContentCRC64, structuredBodyType, encryptionKey, encryptionKeySha256, - encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Specifies the response content should be returned as a structured message and specifies - * the message schema version and properties. - * @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 BlobStorageExceptionInternal 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 downloadAsync(String containerName, String blob, String snapshot, String versionId, - Integer timeout, String range, String leaseId, Boolean rangeGetContentMD5, Boolean rangeGetContentCRC64, - String structuredBodyType, 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, structuredBodyType, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, ifTags, requestId, cpkInfo) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Specifies the response content should be returned as a structured message and specifies - * the message schema version and properties. - * @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 BlobStorageExceptionInternal 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 downloadAsync(String containerName, String blob, String snapshot, String versionId, - Integer timeout, String range, String leaseId, Boolean rangeGetContentMD5, Boolean rangeGetContentCRC64, - String structuredBodyType, 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, structuredBodyType, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, ifTags, requestId, cpkInfo, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Specifies the response content should be returned as a structured message and specifies - * the message schema version and properties. - * @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 BlobStorageExceptionInternal 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 downloadNoCustomHeadersWithResponseAsync(String containerName, String blob, - String snapshot, String versionId, Integer timeout, String range, String leaseId, Boolean rangeGetContentMD5, - Boolean rangeGetContentCRC64, String structuredBodyType, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, - CpkInfo cpkInfo) { - return FluxUtil - .withContext(context -> downloadNoCustomHeadersWithResponseAsync(containerName, blob, snapshot, versionId, - timeout, range, leaseId, rangeGetContentMD5, rangeGetContentCRC64, structuredBodyType, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Specifies the response content should be returned as a structured message and specifies - * the message schema version and properties. - * @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 BlobStorageExceptionInternal 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 downloadNoCustomHeadersWithResponseAsync(String containerName, String blob, - String snapshot, String versionId, Integer timeout, String range, String leaseId, Boolean rangeGetContentMD5, - Boolean rangeGetContentCRC64, String structuredBodyType, 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, structuredBodyType, encryptionKey, - encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, - ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Specifies the response content should be returned as a structured message and specifies - * the message schema version and properties. - * @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 BlobStorageExceptionInternal 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 downloadWithResponse(String containerName, String blob, - String snapshot, String versionId, Integer timeout, String range, String leaseId, Boolean rangeGetContentMD5, - Boolean rangeGetContentCRC64, String structuredBodyType, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, - CpkInfo cpkInfo, Context context) { - try { - 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.downloadSync(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, range, - leaseId, rangeGetContentMD5, rangeGetContentCRC64, structuredBodyType, encryptionKey, - encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, - ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response setTagsSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/xml") BinaryData tags, + RequestOptions requestOptions, 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Specifies the response content should be returned as a structured message and specifies - * the message schema version and properties. - * @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 BlobStorageExceptionInternal 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 download(String containerName, String blob, String snapshot, String versionId, Integer timeout, - String range, String leaseId, Boolean rangeGetContentMD5, Boolean rangeGetContentCRC64, - String structuredBodyType, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, - String ifNoneMatch, String ifTags, String requestId, CpkInfo cpkInfo) { - try { - return downloadWithResponse(containerName, blob, snapshot, versionId, timeout, range, leaseId, - rangeGetContentMD5, rangeGetContentCRC64, structuredBodyType, ifModifiedSince, ifUnmodifiedSince, - ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, Context.NONE).getValue(); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } + @Get("?comp=layout") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> getLayout(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Specifies the response content should be returned as a structured message and specifies - * the message schema version and properties. - * @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 BlobStorageExceptionInternal 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 downloadNoCustomHeadersWithResponse(String containerName, String blob, String snapshot, - String versionId, Integer timeout, String range, String leaseId, Boolean rangeGetContentMD5, - Boolean rangeGetContentCRC64, String structuredBodyType, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId, - CpkInfo cpkInfo, Context context) { - try { - 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, structuredBodyType, encryptionKey, - encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, - ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, context); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } + @Get("?comp=layout") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response getLayoutSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> getPropertiesWithResponseAsync(containerName, blob, snapshot, versionId, timeout, - leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } + @Post("?comp=query") + @ExpectedResponses({ 200, 206 }) + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> query(@HostParam("url") String url, @HeaderParam("Content-Type") String contentType, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Accept") String accept, + @BodyParam("application/xml") BinaryData queryRequest, RequestOptions requestOptions, Context 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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 - .getProperties(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, leaseId, - encryptionKey, encryptionKeySha256, encryptionAlgorithm, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, this.client.getVersion(), requestId, accept, - context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> getPropertiesNoCustomHeadersWithResponseAsync(containerName, blob, snapshot, - versionId, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, - requestId, cpkInfo, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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 - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 accessTierIfModifiedSince Specify this header value to operate only on a blob if the access-tier has been - * modified since the specified date/time. - * @param accessTierIfUnmodifiedSince Specify this header value to operate only on a blob if the access-tier has not - * been modified since the specified date/time. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, OffsetDateTime accessTierIfModifiedSince, - OffsetDateTime accessTierIfUnmodifiedSince) { - return FluxUtil - .withContext(context -> deleteWithResponseAsync(containerName, blob, snapshot, versionId, timeout, leaseId, - deleteSnapshots, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, - blobDeleteType, accessTierIfModifiedSince, accessTierIfUnmodifiedSince, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 accessTierIfModifiedSince Specify this header value to operate only on a blob if the access-tier has been - * modified since the specified date/time. - * @param accessTierIfUnmodifiedSince Specify this header value to operate only on a blob if the access-tier has not - * been modified since the specified date/time. - * @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. - * @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, OffsetDateTime accessTierIfModifiedSince, - OffsetDateTime accessTierIfUnmodifiedSince, Context context) { - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 accessTierIfModifiedSinceConverted - = accessTierIfModifiedSince == null ? null : new DateTimeRfc1123(accessTierIfModifiedSince); - DateTimeRfc1123 accessTierIfUnmodifiedSinceConverted - = accessTierIfUnmodifiedSince == null ? null : new DateTimeRfc1123(accessTierIfUnmodifiedSince); - return service - .delete(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, leaseId, deleteSnapshots, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, blobDeleteType, accessTierIfModifiedSinceConverted, - accessTierIfUnmodifiedSinceConverted, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 accessTierIfModifiedSince Specify this header value to operate only on a blob if the access-tier has been - * modified since the specified date/time. - * @param accessTierIfUnmodifiedSince Specify this header value to operate only on a blob if the access-tier has not - * been modified since the specified date/time. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, OffsetDateTime accessTierIfModifiedSince, - OffsetDateTime accessTierIfUnmodifiedSince) { - return deleteWithResponseAsync(containerName, blob, snapshot, versionId, timeout, leaseId, deleteSnapshots, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobDeleteType, - accessTierIfModifiedSince, accessTierIfUnmodifiedSince) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 accessTierIfModifiedSince Specify this header value to operate only on a blob if the access-tier has been - * modified since the specified date/time. - * @param accessTierIfUnmodifiedSince Specify this header value to operate only on a blob if the access-tier has not - * been modified since the specified date/time. - * @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. - * @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, OffsetDateTime accessTierIfModifiedSince, - OffsetDateTime accessTierIfUnmodifiedSince, Context context) { - return deleteWithResponseAsync(containerName, blob, snapshot, versionId, timeout, leaseId, deleteSnapshots, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobDeleteType, - accessTierIfModifiedSince, accessTierIfUnmodifiedSince, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 accessTierIfModifiedSince Specify this header value to operate only on a blob if the access-tier has been - * modified since the specified date/time. - * @param accessTierIfUnmodifiedSince Specify this header value to operate only on a blob if the access-tier has not - * been modified since the specified date/time. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, OffsetDateTime accessTierIfModifiedSince, - OffsetDateTime accessTierIfUnmodifiedSince) { - return FluxUtil - .withContext(context -> deleteNoCustomHeadersWithResponseAsync(containerName, blob, snapshot, versionId, - timeout, leaseId, deleteSnapshots, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, - requestId, blobDeleteType, accessTierIfModifiedSince, accessTierIfUnmodifiedSince, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 accessTierIfModifiedSince Specify this header value to operate only on a blob if the access-tier has been - * modified since the specified date/time. - * @param accessTierIfUnmodifiedSince Specify this header value to operate only on a blob if the access-tier has not - * been modified since the specified date/time. - * @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. - * @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, OffsetDateTime accessTierIfModifiedSince, - OffsetDateTime accessTierIfUnmodifiedSince, Context context) { - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 accessTierIfModifiedSinceConverted - = accessTierIfModifiedSince == null ? null : new DateTimeRfc1123(accessTierIfModifiedSince); - DateTimeRfc1123 accessTierIfUnmodifiedSinceConverted - = accessTierIfUnmodifiedSince == null ? null : new DateTimeRfc1123(accessTierIfUnmodifiedSince); - return service - .deleteNoCustomHeaders(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, leaseId, - deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, blobDeleteType, accessTierIfModifiedSinceConverted, - accessTierIfUnmodifiedSinceConverted, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 accessTierIfModifiedSince Specify this header value to operate only on a blob if the access-tier has been - * modified since the specified date/time. - * @param accessTierIfUnmodifiedSince Specify this header value to operate only on a blob if the access-tier has not - * been modified since the specified date/time. - * @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. - * @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, OffsetDateTime accessTierIfModifiedSince, - OffsetDateTime accessTierIfUnmodifiedSince, Context context) { - try { - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 accessTierIfModifiedSinceConverted - = accessTierIfModifiedSince == null ? null : new DateTimeRfc1123(accessTierIfModifiedSince); - DateTimeRfc1123 accessTierIfUnmodifiedSinceConverted - = accessTierIfUnmodifiedSince == null ? null : new DateTimeRfc1123(accessTierIfUnmodifiedSince); - return service.deleteSync(this.client.getUrl(), containerName, blob, snapshot, versionId, timeout, leaseId, - deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, blobDeleteType, accessTierIfModifiedSinceConverted, - accessTierIfUnmodifiedSinceConverted, accept, context); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 accessTierIfModifiedSince Specify this header value to operate only on a blob if the access-tier has been - * modified since the specified date/time. - * @param accessTierIfUnmodifiedSince Specify this header value to operate only on a blob if the access-tier has not - * been modified since the specified date/time. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, OffsetDateTime accessTierIfModifiedSince, - OffsetDateTime accessTierIfUnmodifiedSince) { - deleteWithResponse(containerName, blob, snapshot, versionId, timeout, leaseId, deleteSnapshots, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobDeleteType, accessTierIfModifiedSince, - accessTierIfUnmodifiedSince, 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 accessTierIfModifiedSince Specify this header value to operate only on a blob if the access-tier has been - * modified since the specified date/time. - * @param accessTierIfUnmodifiedSince Specify this header value to operate only on a blob if the access-tier has not - * been modified since the specified date/time. - * @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. - * @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, OffsetDateTime accessTierIfModifiedSince, - OffsetDateTime accessTierIfUnmodifiedSince, Context context) { - try { - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - DateTimeRfc1123 accessTierIfModifiedSinceConverted - = accessTierIfModifiedSince == null ? null : new DateTimeRfc1123(accessTierIfModifiedSince); - DateTimeRfc1123 accessTierIfUnmodifiedSinceConverted - = accessTierIfUnmodifiedSince == null ? null : new DateTimeRfc1123(accessTierIfUnmodifiedSince); - return service.deleteNoCustomHeadersSync(this.client.getUrl(), containerName, blob, snapshot, versionId, - timeout, leaseId, deleteSnapshots, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, - ifNoneMatch, ifTags, this.client.getVersion(), requestId, blobDeleteType, - accessTierIfModifiedSinceConverted, accessTierIfUnmodifiedSinceConverted, accept, context); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * The Get Blob Layout operation returns all user-defined metadata, standard HTTP properties, and system properties - * for the blob. In addition, it may optionally return the layout 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://learn.microsoft.com/rest/api/storageservices/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 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 timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 ifTags 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 requestId Provides 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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getLayoutWithResponseAsync( - String containerName, String blob, String snapshot, String versionId, String marker, Integer maxresults, - Integer timeout, String range, String leaseId, String ifTags, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, CpkInfo cpkInfo) { - return FluxUtil - .withContext(context -> getLayoutWithResponseAsync(containerName, blob, snapshot, versionId, marker, - maxresults, timeout, range, leaseId, ifTags, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, - requestId, cpkInfo, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * The Get Blob Layout operation returns all user-defined metadata, standard HTTP properties, and system properties - * for the blob. In addition, it may optionally return the layout 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://learn.microsoft.com/rest/api/storageservices/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 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 timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 ifTags 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 requestId Provides 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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getLayoutWithResponseAsync( - String containerName, String blob, String snapshot, String versionId, String marker, Integer maxresults, - Integer timeout, String range, String leaseId, String ifTags, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String requestId, CpkInfo cpkInfo, - Context context) { - final String comp = "layout"; - 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 - .getLayout(this.client.getUrl(), containerName, blob, comp, snapshot, versionId, marker, maxresults, - timeout, range, leaseId, ifTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, - ifNoneMatch, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), - requestId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * The Get Blob Layout operation returns all user-defined metadata, standard HTTP properties, and system properties - * for the blob. In addition, it may optionally return the layout 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://learn.microsoft.com/rest/api/storageservices/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 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 timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 ifTags 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 requestId Provides 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 BlobStorageExceptionInternal 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 getLayoutAsync(String containerName, String blob, String snapshot, String versionId, - String marker, Integer maxresults, Integer timeout, String range, String leaseId, String ifTags, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, - String requestId, CpkInfo cpkInfo) { - return getLayoutWithResponseAsync(containerName, blob, snapshot, versionId, marker, maxresults, timeout, range, - leaseId, ifTags, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, requestId, cpkInfo) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * The Get Blob Layout operation returns all user-defined metadata, standard HTTP properties, and system properties - * for the blob. In addition, it may optionally return the layout 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://learn.microsoft.com/rest/api/storageservices/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 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 timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 ifTags 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 requestId Provides 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 BlobStorageExceptionInternal 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 getLayoutAsync(String containerName, String blob, String snapshot, String versionId, - String marker, Integer maxresults, Integer timeout, String range, String leaseId, String ifTags, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, - String requestId, CpkInfo cpkInfo, Context context) { - return getLayoutWithResponseAsync(containerName, blob, snapshot, versionId, marker, maxresults, timeout, range, - leaseId, ifTags, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, requestId, cpkInfo, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * The Get Blob Layout operation returns all user-defined metadata, standard HTTP properties, and system properties - * for the blob. In addition, it may optionally return the layout 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://learn.microsoft.com/rest/api/storageservices/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 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 timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 ifTags 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 requestId Provides 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 BlobStorageExceptionInternal 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> getLayoutNoCustomHeadersWithResponseAsync(String containerName, - String blob, String snapshot, String versionId, String marker, Integer maxresults, Integer timeout, - String range, String leaseId, String ifTags, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String ifMatch, String ifNoneMatch, String requestId, CpkInfo cpkInfo) { - return FluxUtil - .withContext(context -> getLayoutNoCustomHeadersWithResponseAsync(containerName, blob, snapshot, versionId, - marker, maxresults, timeout, range, leaseId, ifTags, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, requestId, cpkInfo, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * The Get Blob Layout operation returns all user-defined metadata, standard HTTP properties, and system properties - * for the blob. In addition, it may optionally return the layout 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://learn.microsoft.com/rest/api/storageservices/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 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 timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 ifTags 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 requestId Provides 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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + @Post("?comp=query") + @ExpectedResponses({ 200, 206 }) + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response querySync(@HostParam("url") String url, @HeaderParam("Content-Type") String contentType, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Accept") String accept, + @BodyParam("application/xml") BinaryData queryRequest, RequestOptions requestOptions, Context context); + } + + /** + * Downloads the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
RangeStringNoSpecifies the range of the blob to operate on.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-range-get-content-md5BooleanNoWhen set to true and specified together + * with the `Range` header, the service returns the MD5 hash for the range, as long as the range is less than or + * equal to 4 MiB in size.
x-ms-range-get-content-crc64BooleanNoWhen set to true and the request includes + * a Range header, the service returns the CRC64 hash for the range, as long as the range is less than or equal to 4 + * MiB in size.
x-ms-structured-bodyStringNoSpecifies the response content should be returned + * as a structured message and specifies the message schema version and properties.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
x-ms-metaMap<String, String>The metadata headers.
x-ms-orMap<String, String>The object replication status headers.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-creation-timeOffsetDateTimeThe date-time the blob was created.
x-ms-or-policy-idStringThe object replication policy ID.
Content-LengthlongThe number of bytes present in the response body.
Content-RangeStringIndicates the range of bytes returned in this response.
ETagStringAn opaque identifier for the current state of the resource.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
Content-EncodingStringThe Content-Encoding of the blob.
Cache-ControlStringThe Cache-Control of the blob.
Content-DispositionStringThe Content-Disposition of the blob.
Content-LanguageStringThe Content-Language of the blob.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
x-ms-blob-typeStringThe type of the blob.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-copy-completion-timeOffsetDateTimeIf this blob was the destination of a copy, + * specifies the completion time of the last attempted copy operation.
x-ms-copy-status-descriptionStringIf this blob was the destination of a copy, specifies + * the cause of the copy operation failure.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-progressStringIf this blob was the destination of a copy, specifies the + * number of bytes copied and the total bytes in the source.
x-ms-copy-statusStringStatus of the copy operation.
x-ms-copy-sourceStringIf this blob was the destination of a copy, specifies the source + * URL.
x-ms-lease-durationStringSpecifies the duration of the lease.
x-ms-lease-stateStringThe lease state of the blob.
x-ms-lease-statusStringThe lease status of the blob.
x-ms-version-idStringThe version ID of the blob.
x-ms-is-current-versionbooleanIndicates whether this is the current version of the + * blob.
Accept-RangesStringIndicates that the service supports requests for partial blob + * content.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-blob-content-md5byte[]MD5 hash of the full blob content only returned for ranged + * reads. This is the hash of the complete blob, not just the requested range.
x-ms-tag-countlongThe number of tags associated with the blob.
x-ms-blob-sealedbooleanWhether the blob is sealed.
x-ms-last-access-timeOffsetDateTimeThe date-time value that indicates the time at which + * the blob was last read or written.
x-ms-immutability-policy-until-dateOffsetDateTimeThe date-time that indicates the time + * at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringIndicates the immutability policy mode of the + * blob.
x-ms-legal-holdbooleanIndicates whether the blob has a legal hold.
x-ms-structured-bodyStringIndicates if the response body contains a structured message + * and specifies the message schema version and properties.
x-ms-structured-content-lengthlongThe length of the blob/file content inside the + * message body when the response body is returned as a structured message. Will always be smaller than + * Content-Length.
x-ms-access-tierStringThe access tier of the blob.
x-ms-access-tier-inferredbooleanIncluded if the access tier is inferred.
x-ms-access-tier-change-timeOffsetDateTimeThe time the tier was changed on the blob. + * This is only returned if the tier on the blob was ever set.
x-ms-smart-access-tierStringThe underlying tier of a smart tier blob. Only returned if + * the blob is in Smart tier.
x-ms-download-hintStringIndicates the download hint for the blob.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getLayoutNoCustomHeadersWithResponseAsync(String containerName, - String blob, String snapshot, String versionId, String marker, Integer maxresults, Integer timeout, - String range, String leaseId, String ifTags, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String ifMatch, String ifNoneMatch, String requestId, CpkInfo cpkInfo, Context context) { - final String comp = "layout"; - 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 - .getLayoutNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, snapshot, versionId, marker, - maxresults, timeout, range, leaseId, ifTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, - ifMatch, ifNoneMatch, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), - requestId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * The Get Blob Layout operation returns all user-defined metadata, standard HTTP properties, and system properties - * for the blob. In addition, it may optionally return the layout 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://learn.microsoft.com/rest/api/storageservices/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 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 timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 ifTags 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 requestId Provides 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 BlobStorageExceptionInternal 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 getLayoutWithResponse(String containerName, - String blob, String snapshot, String versionId, String marker, Integer maxresults, Integer timeout, - String range, String leaseId, String ifTags, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String ifMatch, String ifNoneMatch, String requestId, CpkInfo cpkInfo, Context context) { - try { - final String comp = "layout"; - 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.getLayoutSync(this.client.getUrl(), containerName, blob, comp, snapshot, versionId, marker, - maxresults, timeout, range, leaseId, ifTags, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, - ifMatch, ifNoneMatch, encryptionKey, encryptionKeySha256, encryptionAlgorithm, this.client.getVersion(), - requestId, accept, context); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * The Get Blob Layout operation returns all user-defined metadata, standard HTTP properties, and system properties - * for the blob. In addition, it may optionally return the layout 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://learn.microsoft.com/rest/api/storageservices/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 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 timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 ifTags 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 requestId Provides 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 BlobStorageExceptionInternal 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 BlobLayoutInternal getLayout(String containerName, String blob, String snapshot, String versionId, - String marker, Integer maxresults, Integer timeout, String range, String leaseId, String ifTags, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, - String requestId, CpkInfo cpkInfo) { - try { - return getLayoutWithResponse(containerName, blob, snapshot, versionId, marker, maxresults, timeout, range, - leaseId, ifTags, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, requestId, cpkInfo, - Context.NONE).getValue(); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * The Get Blob Layout operation returns all user-defined metadata, standard HTTP properties, and system properties - * for the blob. In addition, it may optionally return the layout 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://learn.microsoft.com/rest/api/storageservices/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 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 timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 ifTags 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 requestId Provides 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 BlobStorageExceptionInternal 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 getLayoutNoCustomHeadersWithResponse(String containerName, String blob, - String snapshot, String versionId, String marker, Integer maxresults, Integer timeout, String range, - String leaseId, String ifTags, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, - String ifNoneMatch, String requestId, CpkInfo cpkInfo, Context context) { - try { - final String comp = "layout"; - 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.getLayoutNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, snapshot, - versionId, marker, maxresults, timeout, range, leaseId, ifTags, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, encryptionKey, encryptionKeySha256, - encryptionAlgorithm, 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> undeleteWithResponseAsync(containerName, blob, timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 undeleteAsync(String containerName, String blob, Integer timeout, String requestId) { - return undeleteWithResponseAsync(containerName, blob, timeout, requestId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 undeleteAsync(String containerName, String blob, Integer timeout, String requestId, - Context context) { - return undeleteWithResponseAsync(containerName, blob, timeout, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext( - context -> undeleteNoCustomHeadersWithResponseAsync(containerName, blob, timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> setExpiryWithResponseAsync(String containerName, String blob, - BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn) { - return FluxUtil - .withContext(context -> setExpiryWithResponseAsync(containerName, blob, expiryOptions, timeout, requestId, - expiresOn, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 setExpiryAsync(String containerName, String blob, BlobExpiryOptions expiryOptions, - Integer timeout, String requestId, String expiresOn) { - return setExpiryWithResponseAsync(containerName, blob, expiryOptions, timeout, requestId, expiresOn) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 setExpiryAsync(String containerName, String blob, BlobExpiryOptions expiryOptions, - Integer timeout, String requestId, String expiresOn, Context context) { - return setExpiryWithResponseAsync(containerName, blob, expiryOptions, timeout, requestId, expiresOn, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> setExpiryNoCustomHeadersWithResponseAsync(String containerName, String blob, - BlobExpiryOptions expiryOptions, Integer timeout, String requestId, String expiresOn) { - return FluxUtil - .withContext(context -> setExpiryNoCustomHeadersWithResponseAsync(containerName, blob, expiryOptions, - timeout, requestId, expiresOn, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> setHttpHeadersWithResponseAsync(String containerName, - String blob, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String ifMatch, String ifNoneMatch, String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders) { - return FluxUtil - .withContext(context -> setHttpHeadersWithResponseAsync(containerName, blob, timeout, leaseId, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobHttpHeaders, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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; - 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 - .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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> setHttpHeadersNoCustomHeadersWithResponseAsync(String containerName, String blob, - Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String ifMatch, String ifNoneMatch, String ifTags, String requestId, BlobHttpHeaders blobHttpHeaders) { - return FluxUtil - .withContext(context -> setHttpHeadersNoCustomHeadersWithResponseAsync(containerName, blob, timeout, - leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobHttpHeaders, - context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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; - 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 - .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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) { - try { - 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.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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 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://learn.microsoft.com/rest/api/storageservices/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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, String snapshot, - String versionId) { - return FluxUtil - .withContext(context -> setImmutabilityPolicyWithResponseAsync(containerName, blob, timeout, requestId, - ifUnmodifiedSince, immutabilityPolicyExpiry, immutabilityPolicyMode, snapshot, versionId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 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://learn.microsoft.com/rest/api/storageservices/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 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. - * @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, String snapshot, - String versionId, 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, - snapshot, versionId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 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://learn.microsoft.com/rest/api/storageservices/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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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 setImmutabilityPolicyAsync(String containerName, String blob, Integer timeout, String requestId, - OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, String snapshot, String versionId) { - return setImmutabilityPolicyWithResponseAsync(containerName, blob, timeout, requestId, ifUnmodifiedSince, - immutabilityPolicyExpiry, immutabilityPolicyMode, snapshot, versionId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 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://learn.microsoft.com/rest/api/storageservices/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 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. - * @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 setImmutabilityPolicyAsync(String containerName, String blob, Integer timeout, String requestId, - OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, String snapshot, String versionId, Context context) { - return setImmutabilityPolicyWithResponseAsync(containerName, blob, timeout, requestId, ifUnmodifiedSince, - immutabilityPolicyExpiry, immutabilityPolicyMode, snapshot, versionId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 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://learn.microsoft.com/rest/api/storageservices/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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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> setImmutabilityPolicyNoCustomHeadersWithResponseAsync(String containerName, String blob, - Integer timeout, String requestId, OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, String snapshot, String versionId) { - return FluxUtil - .withContext(context -> setImmutabilityPolicyNoCustomHeadersWithResponseAsync(containerName, blob, timeout, - requestId, ifUnmodifiedSince, immutabilityPolicyExpiry, immutabilityPolicyMode, snapshot, versionId, - context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 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://learn.microsoft.com/rest/api/storageservices/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 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. - * @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> setImmutabilityPolicyNoCustomHeadersWithResponseAsync(String containerName, String blob, - Integer timeout, String requestId, OffsetDateTime ifUnmodifiedSince, OffsetDateTime immutabilityPolicyExpiry, - BlobImmutabilityPolicyMode immutabilityPolicyMode, String snapshot, String versionId, 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, snapshot, versionId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 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://learn.microsoft.com/rest/api/storageservices/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 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. - * @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, String snapshot, - String versionId, Context context) { - try { - 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, snapshot, versionId, 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 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://learn.microsoft.com/rest/api/storageservices/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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, String snapshot, String versionId) { - setImmutabilityPolicyWithResponse(containerName, blob, timeout, requestId, ifUnmodifiedSince, - immutabilityPolicyExpiry, immutabilityPolicyMode, snapshot, versionId, 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://learn.microsoft.com/rest/api/storageservices/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 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://learn.microsoft.com/rest/api/storageservices/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 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. - * @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, String snapshot, String versionId, Context context) { - try { - 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.setImmutabilityPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, - timeout, this.client.getVersion(), requestId, ifUnmodifiedSinceConverted, - immutabilityPolicyExpiryConverted, immutabilityPolicyMode, snapshot, versionId, 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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> deleteImmutabilityPolicyWithResponseAsync( - String containerName, String blob, Integer timeout, String requestId, String snapshot, String versionId) { - return FluxUtil - .withContext(context -> deleteImmutabilityPolicyWithResponseAsync(containerName, blob, timeout, requestId, - snapshot, versionId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 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. - * @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> deleteImmutabilityPolicyWithResponseAsync( - String containerName, String blob, Integer timeout, String requestId, String snapshot, String versionId, - 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, snapshot, versionId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, String snapshot, String versionId) { - return deleteImmutabilityPolicyWithResponseAsync(containerName, blob, timeout, requestId, snapshot, versionId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 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. - * @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, String snapshot, String versionId, Context context) { - return deleteImmutabilityPolicyWithResponseAsync(containerName, blob, timeout, requestId, snapshot, versionId, - context).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, String snapshot, String versionId) { - return FluxUtil - .withContext(context -> deleteImmutabilityPolicyNoCustomHeadersWithResponseAsync(containerName, blob, - timeout, requestId, snapshot, versionId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 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. - * @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, String snapshot, String versionId, 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, snapshot, versionId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 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. - * @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, String snapshot, String versionId, - Context context) { - try { - final String comp = "immutabilityPolicies"; - final String accept = "application/xml"; - return service.deleteImmutabilityPolicySync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, snapshot, versionId, 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, - String snapshot, String versionId) { - deleteImmutabilityPolicyWithResponse(containerName, blob, timeout, requestId, snapshot, versionId, - 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 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. - * @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, String snapshot, String versionId, Context context) { - try { - final String comp = "immutabilityPolicies"; - final String accept = "application/xml"; - return service.deleteImmutabilityPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, - timeout, this.client.getVersion(), requestId, snapshot, versionId, 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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, String snapshot, String versionId) { - return FluxUtil - .withContext(context -> setLegalHoldWithResponseAsync(containerName, blob, legalHold, timeout, requestId, - snapshot, versionId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 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. - * @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, String snapshot, String versionId, - 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, snapshot, versionId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, String snapshot, String versionId) { - return setLegalHoldWithResponseAsync(containerName, blob, legalHold, timeout, requestId, snapshot, versionId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 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. - * @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, String snapshot, String versionId, Context context) { - return setLegalHoldWithResponseAsync(containerName, blob, legalHold, timeout, requestId, snapshot, versionId, - context).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, String snapshot, String versionId) { - return FluxUtil - .withContext(context -> setLegalHoldNoCustomHeadersWithResponseAsync(containerName, blob, legalHold, - timeout, requestId, snapshot, versionId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 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. - * @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, String snapshot, String versionId, 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, snapshot, versionId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 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. - * @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, String snapshot, String versionId, Context context) { - try { - final String comp = "legalhold"; - final String accept = "application/xml"; - return service.setLegalHoldSync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, legalHold, snapshot, versionId, 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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, - String snapshot, String versionId) { - setLegalHoldWithResponse(containerName, blob, legalHold, timeout, requestId, snapshot, versionId, 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 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. - * @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, String snapshot, String versionId, Context context) { - try { - final String comp = "legalhold"; - final String accept = "application/xml"; - return service.setLegalHoldNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, legalHold, snapshot, versionId, 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> setMetadataWithResponseAsync(containerName, blob, timeout, metadata, leaseId, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, - encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> setMetadataNoCustomHeadersWithResponseAsync(containerName, blob, timeout, metadata, - leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, - encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> acquireLeaseWithResponseAsync(containerName, blob, timeout, duration, - proposedLeaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> acquireLeaseNoCustomHeadersWithResponseAsync(containerName, blob, timeout, duration, - proposedLeaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, String blob, Integer timeout, - Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { - try { - 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.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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> releaseLeaseWithResponseAsync(containerName, blob, leaseId, timeout, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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 - .releaseLease(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Context context) { - return releaseLeaseWithResponseAsync(containerName, blob, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, - ifMatch, ifNoneMatch, ifTags, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> releaseLeaseNoCustomHeadersWithResponseAsync(containerName, blob, leaseId, timeout, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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 - .releaseLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 blob, - String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { - try { - 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.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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 blob, String leaseId, - Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, - String ifNoneMatch, String ifTags, String requestId, Context context) { - try { - 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); - } 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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> renewLeaseWithResponseAsync(containerName, blob, leaseId, timeout, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 blob, - String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String ifMatch, String ifNoneMatch, String ifTags, String requestId) { - return FluxUtil - .withContext(context -> renewLeaseNoCustomHeadersWithResponseAsync(containerName, blob, leaseId, timeout, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 blob, - String leaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { - try { - 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); - } 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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 blob, String leaseId, - Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, - String ifNoneMatch, String ifTags, String requestId, Context context) { - try { - 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.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. - * @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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> changeLeaseWithResponseAsync(String containerName, - String blob, String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId) { - return FluxUtil - .withContext(context -> changeLeaseWithResponseAsync(containerName, blob, leaseId, proposedLeaseId, timeout, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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 = "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, blob, comp, action, timeout, leaseId, proposedLeaseId, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext( - context -> changeLeaseNoCustomHeadersWithResponseAsync(containerName, blob, leaseId, proposedLeaseId, - timeout, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, - 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 - .changeLeaseNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, action, timeout, leaseId, - proposedLeaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) { - try { - 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.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. - * @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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) { - try { - 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); - } 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs 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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> breakLeaseWithResponseAsync(containerName, blob, timeout, breakPeriod, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs 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 BlobStorageExceptionInternal 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, - 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 - .breakLease(this.client.getUrl(), containerName, blob, comp, action, timeout, breakPeriod, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, - this.client.getVersion(), requestId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs 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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs 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 BlobStorageExceptionInternal 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, Context context) { - return breakLeaseWithResponseAsync(containerName, blob, timeout, breakPeriod, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs 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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> breakLeaseNoCustomHeadersWithResponseAsync(containerName, blob, timeout, - breakPeriod, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs 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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs 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 BlobStorageExceptionInternal 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 breakLeaseWithResponse(String containerName, String blob, - Integer timeout, Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String ifMatch, String ifNoneMatch, String ifTags, String requestId, Context context) { - try { - 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); - } 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs 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 BlobStorageExceptionInternal 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 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 timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 ifMatch Specify an ETag value to operate only on blobs with a matching value. - * @param ifNoneMatch Specify an ETag value to operate only on blobs 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 BlobStorageExceptionInternal 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 breakLeaseNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, - Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, - String ifNoneMatch, String ifTags, String requestId, Context context) { - try { - 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.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); - } - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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) { - return FluxUtil - .withContext(context -> createSnapshotWithResponseAsync(containerName, blob, timeout, metadata, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, cpkInfo, - encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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. - * @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. - * @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> 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"; - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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. - * @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. - * @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 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> createSnapshotNoCustomHeadersWithResponseAsync(containerName, blob, timeout, - metadata, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, cpkInfo, - encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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. - * @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. - * @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"; - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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. - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - 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) { - try { - 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 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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://learn.microsoft.com/rest/api/storageservices/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. - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - 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) { - try { - 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 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); - } - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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) { - return FluxUtil - .withContext( - context -> 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)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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. - * @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. - * @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> 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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. - * @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. - * @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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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) { - return FluxUtil - .withContext(context -> startCopyFromURLNoCustomHeadersWithResponseAsync(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)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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. - * @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. - * @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> 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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. - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - 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) { - try { - 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); - } 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 - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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. - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - 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) { - try { - 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); - } 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 - * 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, FileShareTokenIntent fileRequestIntent, - EncryptionScope encryptionScopeParam) { - return FluxUtil - .withContext(context -> 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, - fileRequestIntent, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param encryptionScopeParam Parameter group. - * @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. - * @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, FileShareTokenIntent fileRequestIntent, - 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, fileRequestIntent, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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 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, FileShareTokenIntent fileRequestIntent, - 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, - fileRequestIntent, encryptionScopeParam) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param encryptionScopeParam Parameter group. - * @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. - * @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 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, FileShareTokenIntent fileRequestIntent, - 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, - fileRequestIntent, encryptionScopeParam, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, FileShareTokenIntent fileRequestIntent, - EncryptionScope encryptionScopeParam) { - return FluxUtil - .withContext(context -> copyFromURLNoCustomHeadersWithResponseAsync(containerName, blob, copySource, - timeout, metadata, tier, sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, - sourceIfNoneMatch, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, leaseId, requestId, - sourceContentMD5, blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, legalHold, - copySourceAuthorization, copySourceTags, fileRequestIntent, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param encryptionScopeParam Parameter group. - * @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. - * @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, FileShareTokenIntent fileRequestIntent, - 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, fileRequestIntent, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param encryptionScopeParam Parameter group. - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - 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, FileShareTokenIntent fileRequestIntent, - EncryptionScope encryptionScopeParam, Context context) { - try { - 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, fileRequestIntent, 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 - * 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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 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, FileShareTokenIntent fileRequestIntent, - 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, fileRequestIntent, - 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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param encryptionScopeParam Parameter group. - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - 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, FileShareTokenIntent fileRequestIntent, - EncryptionScope encryptionScopeParam, Context context) { - try { - 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.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, fileRequestIntent, 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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> abortCopyFromURLWithResponseAsync( - String containerName, String blob, String copyId, Integer timeout, String leaseId, String requestId) { - return FluxUtil - .withContext(context -> abortCopyFromURLWithResponseAsync(containerName, blob, copyId, timeout, leaseId, - requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> abortCopyFromURLWithResponseAsync( - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return abortCopyFromURLWithResponseAsync(containerName, blob, copyId, timeout, leaseId, requestId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Context context) { - return abortCopyFromURLWithResponseAsync(containerName, blob, copyId, timeout, leaseId, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> abortCopyFromURLNoCustomHeadersWithResponseAsync(containerName, blob, copyId, - timeout, leaseId, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> setTierWithResponseAsync(String containerName, String blob, - AccessTier tier, String snapshot, String versionId, Integer timeout, RehydratePriority rehydratePriority, - String requestId, String leaseId, String ifTags) { - return FluxUtil - .withContext(context -> setTierWithResponseAsync(containerName, blob, tier, snapshot, versionId, timeout, - rehydratePriority, requestId, leaseId, ifTags, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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. + public Mono> downloadWithResponseInternalAsync(RequestOptions requestOptions) { + final String accept = "application/octet-stream"; + return FluxUtil + .withContext(context -> service.download(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + accept, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Downloads the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
RangeStringNoSpecifies the range of the blob to operate on.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-range-get-content-md5BooleanNoWhen set to true and specified together + * with the `Range` header, the service returns the MD5 hash for the range, as long as the range is less than or + * equal to 4 MiB in size.
x-ms-range-get-content-crc64BooleanNoWhen set to true and the request includes + * a Range header, the service returns the CRC64 hash for the range, as long as the range is less than or equal to 4 + * MiB in size.
x-ms-structured-bodyStringNoSpecifies the response content should be returned + * as a structured message and specifies the message schema version and properties.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
x-ms-metaMap<String, String>The metadata headers.
x-ms-orMap<String, String>The object replication status headers.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-creation-timeOffsetDateTimeThe date-time the blob was created.
x-ms-or-policy-idStringThe object replication policy ID.
Content-LengthlongThe number of bytes present in the response body.
Content-RangeStringIndicates the range of bytes returned in this response.
ETagStringAn opaque identifier for the current state of the resource.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
Content-EncodingStringThe Content-Encoding of the blob.
Cache-ControlStringThe Cache-Control of the blob.
Content-DispositionStringThe Content-Disposition of the blob.
Content-LanguageStringThe Content-Language of the blob.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
x-ms-blob-typeStringThe type of the blob.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-copy-completion-timeOffsetDateTimeIf this blob was the destination of a copy, + * specifies the completion time of the last attempted copy operation.
x-ms-copy-status-descriptionStringIf this blob was the destination of a copy, specifies + * the cause of the copy operation failure.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-progressStringIf this blob was the destination of a copy, specifies the + * number of bytes copied and the total bytes in the source.
x-ms-copy-statusStringStatus of the copy operation.
x-ms-copy-sourceStringIf this blob was the destination of a copy, specifies the source + * URL.
x-ms-lease-durationStringSpecifies the duration of the lease.
x-ms-lease-stateStringThe lease state of the blob.
x-ms-lease-statusStringThe lease status of the blob.
x-ms-version-idStringThe version ID of the blob.
x-ms-is-current-versionbooleanIndicates whether this is the current version of the + * blob.
Accept-RangesStringIndicates that the service supports requests for partial blob + * content.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-blob-content-md5byte[]MD5 hash of the full blob content only returned for ranged + * reads. This is the hash of the complete blob, not just the requested range.
x-ms-tag-countlongThe number of tags associated with the blob.
x-ms-blob-sealedbooleanWhether the blob is sealed.
x-ms-last-access-timeOffsetDateTimeThe date-time value that indicates the time at which + * the blob was last read or written.
x-ms-immutability-policy-until-dateOffsetDateTimeThe date-time that indicates the time + * at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringIndicates the immutability policy mode of the + * blob.
x-ms-legal-holdbooleanIndicates whether the blob has a legal hold.
x-ms-structured-bodyStringIndicates if the response body contains a structured message + * and specifies the message schema version and properties.
x-ms-structured-content-lengthlongThe length of the blob/file content inside the + * message body when the response body is returned as a structured message. Will always be smaller than + * Content-Length.
x-ms-access-tierStringThe access tier of the blob.
x-ms-access-tier-inferredbooleanIncluded if the access tier is inferred.
x-ms-access-tier-change-timeOffsetDateTimeThe time the tier was changed on the blob. + * This is only returned if the tier on the blob was ever set.
x-ms-smart-access-tierStringThe underlying tier of a smart tier blob. Only returned if + * the blob is in Smart tier.
x-ms-download-hintStringIndicates the download hint for the blob.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the response body along with {@link Response}. */ @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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); + public Response downloadWithResponseInternal(RequestOptions requestOptions) { + try { + final String accept = "application/octet-stream"; + return service.downloadSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), accept, + requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Returns all user-defined metadata, standard HTTP properties, and system properties for the specified blob. It + * does not return the content of the blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Content-TypeStringContent-type.
x-ms-metaMap<String, String>The metadata headers.
x-ms-orMap<String, String>The object replication status headers.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-creation-timeOffsetDateTimeThe date-time the blob was created.
x-ms-or-policy-idStringThe object replication policy ID.
x-ms-blob-typeStringThe type of the blob.
x-ms-copy-completion-timeOffsetDateTimeIf this blob was the destination of a copy, + * specifies the completion time of the last attempted copy operation.
x-ms-copy-status-descriptionStringIf this blob was the destination of a copy, specifies + * the cause of the copy operation failure.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-progressStringIf this blob was the destination of a copy, specifies the + * number of bytes copied and the total bytes in the source.
x-ms-copy-statusStringStatus of the copy operation.
x-ms-copy-sourceStringIf this blob was the destination of a copy, specifies the source + * URL.
x-ms-incremental-copybooleanIncluded if the blob is incremental copy blob.
x-ms-copy-destination-snapshotStringIncluded if the blob is incremental copy blob or + * incremental copy snapshot, if x-ms-copy-status is success.
x-ms-lease-durationStringSpecifies the duration of the lease.
x-ms-lease-stateStringThe lease state of the blob.
x-ms-lease-statusStringThe lease status of the blob.
Content-LengthlongThe number of bytes present in the response body.
ETagStringAn opaque identifier for the current state of the resource.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
Content-EncodingStringThe Content-Encoding of the blob.
Content-DispositionStringThe Content-Disposition of the blob.
Content-LanguageStringThe Content-Language of the blob.
Cache-ControlStringThe Cache-Control of the blob.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
Accept-RangesStringIndicates that the service supports requests for partial blob + * content.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-access-tierStringThe access tier of the blob.
x-ms-access-tier-inferredbooleanIncluded if the access tier is inferred.
x-ms-archive-statusStringIncluded if the blob rehydrate operation is pending. Indicates + * the destination tier.
x-ms-access-tier-change-timeOffsetDateTimeThe time the tier was changed on the blob. + * This is only returned if the tier on the blob was ever set.
x-ms-smart-access-tierStringThe underlying tier of a smart tier blob. Only returned if + * the blob is in Smart tier.
x-ms-version-idStringThe version ID of the blob.
x-ms-is-current-versionbooleanIndicates whether this is the current version of the + * blob.
x-ms-tag-countlongThe number of tags associated with the blob.
x-ms-expiry-timeOffsetDateTimeThe date-time this blob will expire.
x-ms-blob-sealedbooleanWhether the blob is sealed.
x-ms-rehydrate-priorityStringThe priority of the rehydration operation.
x-ms-last-access-timeOffsetDateTimeThe date-time value that indicates the time at which + * the blob was last read or written.
x-ms-immutability-policy-until-dateOffsetDateTimeThe date-time that indicates the time + * at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringIndicates the immutability policy mode of the + * blob.
x-ms-legal-holdbooleanIndicates whether the blob has a legal hold.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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> getPropertiesWithResponseInternalAsync(RequestOptions requestOptions) { return FluxUtil - .withContext(context -> setTierNoCustomHeadersWithResponseAsync(containerName, blob, tier, snapshot, - versionId, timeout, rehydratePriority, requestId, leaseId, ifTags, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + .withContext(context -> service.getProperties(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Returns all user-defined metadata, standard HTTP properties, and system properties for the specified blob. It + * does not return the content of the blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Content-TypeStringContent-type.
x-ms-metaMap<String, String>The metadata headers.
x-ms-orMap<String, String>The object replication status headers.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-creation-timeOffsetDateTimeThe date-time the blob was created.
x-ms-or-policy-idStringThe object replication policy ID.
x-ms-blob-typeStringThe type of the blob.
x-ms-copy-completion-timeOffsetDateTimeIf this blob was the destination of a copy, + * specifies the completion time of the last attempted copy operation.
x-ms-copy-status-descriptionStringIf this blob was the destination of a copy, specifies + * the cause of the copy operation failure.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-progressStringIf this blob was the destination of a copy, specifies the + * number of bytes copied and the total bytes in the source.
x-ms-copy-statusStringStatus of the copy operation.
x-ms-copy-sourceStringIf this blob was the destination of a copy, specifies the source + * URL.
x-ms-incremental-copybooleanIncluded if the blob is incremental copy blob.
x-ms-copy-destination-snapshotStringIncluded if the blob is incremental copy blob or + * incremental copy snapshot, if x-ms-copy-status is success.
x-ms-lease-durationStringSpecifies the duration of the lease.
x-ms-lease-stateStringThe lease state of the blob.
x-ms-lease-statusStringThe lease status of the blob.
Content-LengthlongThe number of bytes present in the response body.
ETagStringAn opaque identifier for the current state of the resource.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
Content-EncodingStringThe Content-Encoding of the blob.
Content-DispositionStringThe Content-Disposition of the blob.
Content-LanguageStringThe Content-Language of the blob.
Cache-ControlStringThe Cache-Control of the blob.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
Accept-RangesStringIndicates that the service supports requests for partial blob + * content.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-access-tierStringThe access tier of the blob.
x-ms-access-tier-inferredbooleanIncluded if the access tier is inferred.
x-ms-archive-statusStringIncluded if the blob rehydrate operation is pending. Indicates + * the destination tier.
x-ms-access-tier-change-timeOffsetDateTimeThe time the tier was changed on the blob. + * This is only returned if the tier on the blob was ever set.
x-ms-smart-access-tierStringThe underlying tier of a smart tier blob. Only returned if + * the blob is in Smart tier.
x-ms-version-idStringThe version ID of the blob.
x-ms-is-current-versionbooleanIndicates whether this is the current version of the + * blob.
x-ms-tag-countlongThe number of tags associated with the blob.
x-ms-expiry-timeOffsetDateTimeThe date-time this blob will expire.
x-ms-blob-sealedbooleanWhether the blob is sealed.
x-ms-rehydrate-priorityStringThe priority of the rehydration operation.
x-ms-last-access-timeOffsetDateTimeThe date-time value that indicates the time at which + * the blob was last read or written.
x-ms-immutability-policy-until-dateOffsetDateTimeThe date-time that indicates the time + * at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringIndicates the immutability policy mode of the + * blob.
x-ms-legal-holdbooleanIndicates whether the blob has a legal hold.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPropertiesWithResponseInternal(RequestOptions requestOptions) { + try { + return service.getPropertiesSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Deletes the specified blob. If blob soft delete is enabled, the blob is marked for deletion and can be recovered + * until the retention period expires. + *

Query Parameters

+ * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
deletetypeStringNoThe delete type. Allowed values: "Permanent".
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-delete-snapshotsStringNoRequired if the blob has associated snapshots. + * Specifies the delete behavior. Allowed values: "only", "include".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-access-tier-if-modified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if the access-tier has been modified since the specified date-time.
x-ms-access-tier-if-unmodified-sinceOffsetDateTimeNoSpecify this header value + * to operate only on a blob if the access-tier has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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) { - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + public Mono> deleteWithResponseInternalAsync(RequestOptions requestOptions) { + return FluxUtil + .withContext(context -> service.delete(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Deletes the specified blob. If blob soft delete is enabled, the blob is marked for deletion and can be recovered + * until the retention period expires. + *

Query Parameters

+ * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
deletetypeStringNoThe delete type. Allowed values: "Permanent".
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-delete-snapshotsStringNoRequired if the blob has associated snapshots. + * Specifies the delete behavior. Allowed values: "only", "include".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-access-tier-if-modified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if the access-tier has been modified since the specified date-time.
x-ms-access-tier-if-unmodified-sinceOffsetDateTimeNoSpecify this header value + * to operate only on a blob if the access-tier has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @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) { + public Response deleteWithResponseInternal(RequestOptions requestOptions) { try { - 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); - } catch (BlobStorageExceptionInternal internalException) { + return service.deleteSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } } /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Undelete the specified previously soft deleted blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. */ @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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + public Mono> undeleteWithResponseInternalAsync(RequestOptions requestOptions) { + return FluxUtil + .withContext(context -> service.undelete(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Undelete the specified previously soft deleted blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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) { + public Response undeleteWithResponseInternal(RequestOptions requestOptions) { try { - 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); - } catch (BlobStorageExceptionInternal internalException) { + return service.undeleteSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } } /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + * Set the expiration time of the specified blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-expiry-timeOffsetDateTimeNoThe date-time this blob will expire.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param expiryOptions Indicates the mode of the expiry time. Allowed values: "NeverExpire", "RelativeToCreation", + * "RelativeToNow", "Absolute". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAccountInfoWithResponseAsync(String containerName, - String blob, Integer timeout, String requestId) { + public Mono> setExpiryWithResponseInternalAsync(String expiryOptions, + RequestOptions requestOptions) { return FluxUtil - .withContext(context -> getAccountInfoWithResponseAsync(containerName, blob, timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + .withContext(context -> service.setExpiry(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), expiryOptions, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Set the expiration time of the specified blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-expiry-timeOffsetDateTimeNoThe date-time this blob will expire.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param expiryOptions Indicates the mode of the expiry time. Allowed values: "NeverExpire", "RelativeToCreation", + * "RelativeToNow", "Absolute". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAccountInfoWithResponseAsync(String containerName, - String blob, Integer timeout, String requestId, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + public Response setExpiryWithResponseInternal(String expiryOptions, RequestOptions requestOptions) { + try { + return service.setExpirySync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + expiryOptions, requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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. + * Sets system properties on the specified blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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. + public Mono> setHttpHeadersWithResponseInternalAsync(RequestOptions requestOptions) { + return FluxUtil + .withContext(context -> service.setHttpHeaders(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Sets system properties on the specified blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAccountInfoAsync(String containerName, String blob, Integer timeout, String requestId, - Context context) { - return getAccountInfoWithResponseAsync(containerName, blob, timeout, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); + public Response setHttpHeadersWithResponseInternal(RequestOptions requestOptions) { + try { + return service.setHttpHeadersSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Set the immutability policy on the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-immutability-policy-until-dateOffsetDateTimeThe date-time that indicates the time + * at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringIndicates the immutability policy mode of the + * blob.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param expiry The date-time that indicates the time at which the blob immutability policy will expire. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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) { - return FluxUtil.withContext( - context -> getAccountInfoNoCustomHeadersWithResponseAsync(containerName, blob, timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + public Mono> setImmutabilityPolicyWithResponseInternalAsync(OffsetDateTime expiry, + RequestOptions requestOptions) { + DateTimeRfc1123 expiryConverted = new DateTimeRfc1123(expiry); + return FluxUtil + .withContext(context -> service.setImmutabilityPolicy(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), expiryConverted, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Set the immutability policy on the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-immutability-policy-until-dateOffsetDateTimeThe date-time that indicates the time + * at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringIndicates the immutability policy mode of the + * blob.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param expiry The date-time that indicates the time at which the blob immutability policy will expire. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response setImmutabilityPolicyWithResponseInternal(OffsetDateTime expiry, + RequestOptions requestOptions) { + try { + DateTimeRfc1123 expiryConverted = new DateTimeRfc1123(expiry); + return service.setImmutabilityPolicySync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + expiryConverted, requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } } /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Deletes the immutability policy on the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + public Mono> deleteImmutabilityPolicyWithResponseInternalAsync(RequestOptions requestOptions) { + return FluxUtil + .withContext(context -> service.deleteImmutabilityPolicy(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Deletes the immutability policy on the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getAccountInfoWithResponse(String containerName, String blob, - Integer timeout, String requestId, Context context) { + public Response deleteImmutabilityPolicyWithResponseInternal(RequestOptions requestOptions) { try { - final String restype = "account"; - final String comp = "properties"; - final String accept = "application/xml"; - return service.getAccountInfoSync(this.client.getUrl(), containerName, blob, restype, comp, timeout, - this.client.getVersion(), requestId, accept, context); - } catch (BlobStorageExceptionInternal internalException) { + return service.deleteImmutabilityPolicySync(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } } /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Sets a legal hold on the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-legal-holdbooleanIndicates whether the blob has a legal hold.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param legalHold Indicates whether the blob has a legal hold. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void getAccountInfo(String containerName, String blob, Integer timeout, String requestId) { - getAccountInfoWithResponse(containerName, blob, timeout, requestId, 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + public Mono> setLegalHoldWithResponseInternalAsync(boolean legalHold, + RequestOptions requestOptions) { + return FluxUtil + .withContext(context -> service.setLegalHold(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), legalHold, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Sets a legal hold on the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-legal-holdbooleanIndicates whether the blob has a legal hold.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param legalHold Indicates whether the blob has a legal hold. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAccountInfoNoCustomHeadersWithResponse(String containerName, String blob, Integer timeout, - String requestId, Context context) { + public Response setLegalHoldWithResponseInternal(boolean legalHold, RequestOptions requestOptions) { try { - final String restype = "account"; - final String comp = "properties"; - final String accept = "application/xml"; - return service.getAccountInfoNoCustomHeadersSync(this.client.getUrl(), containerName, blob, restype, comp, - timeout, this.client.getVersion(), requestId, accept, context); - } catch (BlobStorageExceptionInternal internalException) { + return service.setLegalHoldSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + legalHold, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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 - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. + * Sets user-defined metadata for the specified blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} 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> setMetadataWithResponseInternalAsync(RequestOptions requestOptions) { return FluxUtil - .withContext( - context -> queryWithResponseAsync(containerName, blob, snapshot, timeout, leaseId, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. + .withContext(context -> service.setMetadata(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Sets user-defined metadata for the specified blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @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) { - 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(); + public Response setMetadataWithResponseInternal(RequestOptions requestOptions) { + try { + return service.setMetadataSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); } - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } /** - * The Query operation enables users to select/project on blob data by providing simple query expressions. + * Requests a new lease on the specified blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-proposed-lease-idStringNoThe proposed lease ID for the lease.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-lease-idStringUniquely identifies a blob's lease.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
* - * @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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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. + * @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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. */ @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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); - } - - /** - * The Query operation enables users to select/project on blob data by providing simple query expressions. + public Mono> acquireLeaseWithResponseInternalAsync(int duration, RequestOptions requestOptions) { + final String action = "acquire"; + return FluxUtil + .withContext(context -> service.acquireLease(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), duration, action, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Requests a new lease on the specified blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-proposed-lease-idStringNoThe proposed lease ID for the lease.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-lease-idStringUniquely identifies a blob's lease.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
* - * @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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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. + * @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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); + public Response acquireLeaseWithResponseInternal(int duration, RequestOptions requestOptions) { + try { + final String action = "acquire"; + return service.acquireLeaseSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + duration, action, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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 - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + * Frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the + * blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} 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> releaseLeaseWithResponseInternalAsync(String leaseId, RequestOptions requestOptions) { + final String action = "release"; return FluxUtil - .withContext(context -> queryNoCustomHeadersWithResponseAsync(containerName, blob, snapshot, timeout, - leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, - cpkInfo, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + .withContext(context -> service.releaseLease(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), leaseId, action, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the + * blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @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) { - 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(); + public Response releaseLeaseWithResponseInternal(String leaseId, RequestOptions requestOptions) { + try { + final String action = "release"; + return service.releaseLeaseSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), leaseId, + action, requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); } - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + * Renews an existing lease. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-lease-idStringUniquely identifies a blob's lease.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> renewLeaseWithResponseInternalAsync(String leaseId, RequestOptions requestOptions) { + final String action = "renew"; + return FluxUtil + .withContext(context -> service.renewLease(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), leaseId, action, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Renews an existing lease. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-lease-idStringUniquely identifies a blob's lease.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @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) { + public Response renewLeaseWithResponseInternal(String leaseId, RequestOptions requestOptions) { try { - 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); - } catch (BlobStorageExceptionInternal internalException) { + final String action = "renew"; + return service.renewLeaseSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), leaseId, + action, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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 - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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. + * Change the ID of an existing lease. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-lease-idStringUniquely identifies a blob's lease.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> changeLeaseWithResponseInternalAsync(String leaseId, String proposedLeaseId, + RequestOptions requestOptions) { + final String action = "change"; + return FluxUtil + .withContext( + context -> service.changeLease(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + leaseId, proposedLeaseId, action, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Change the ID of an existing lease. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-lease-idStringUniquely identifies a blob's lease.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link 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) { + public Response changeLeaseWithResponseInternal(String leaseId, String proposedLeaseId, + RequestOptions requestOptions) { try { - return queryWithResponse(containerName, blob, snapshot, timeout, leaseId, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, queryRequest, cpkInfo, Context.NONE) - .getValue(); - } catch (BlobStorageExceptionInternal internalException) { + final String action = "change"; + return service.changeLeaseSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), leaseId, + proposedLeaseId, action, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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 - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + * Ends a lease and ensures that another client can't acquire a new lease until the current lease period has + * expired. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-break-periodIntegerNoProposed 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.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-lease-timeintApproximate time remaining in the lease period, in seconds.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> breakLeaseWithResponseInternalAsync(RequestOptions requestOptions) { + final String action = "break"; + return FluxUtil + .withContext(context -> service.breakLease(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), action, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Ends a lease and ensures that another client can't acquire a new lease until the current lease period has + * expired. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-break-periodIntegerNoProposed 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.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-lease-timeintApproximate time remaining in the lease period, in seconds.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@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) { + public Response breakLeaseWithResponseInternal(RequestOptions requestOptions) { try { - 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.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) { + final String action = "break"; + return service.breakLeaseSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), action, + requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. + * Creates a read-only snapshot of the specified blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-snapshotStringUniquely identifies the snapshot and indicates the snapshot + * version.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} 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, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch) { + public Mono> createSnapshotWithResponseInternalAsync(RequestOptions requestOptions) { return FluxUtil - .withContext(context -> getTagsWithResponseAsync(containerName, blob, timeout, requestId, snapshot, - versionId, ifTags, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 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 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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return blob tags along with {@link ResponseBase} on successful completion of {@link Mono}. + .withContext(context -> service.createSnapshot(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Creates a read-only snapshot of the specified blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-snapshotStringUniquely identifies the snapshot and indicates the snapshot + * version.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getTagsWithResponseAsync(String containerName, String blob, - Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, - Context context) { - final String comp = "tags"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service - .getTags(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), requestId, - snapshot, versionId, ifTags, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, - ifNoneMatch, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + public Response createSnapshotWithResponseInternal(RequestOptions requestOptions) { + try { + return service.createSnapshotSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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 on successful completion of {@link Mono}. + * Starts an asynchronous copy from a source URL to a destination blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-access-tierStringNoThe tier to be set on the blob. Allowed values: "P4", + * "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", + * "Smart".
x-ms-rehydrate-priorityStringNoThe priority of the rehydration operation. + * Allowed values: "High", "Standard".
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
x-ms-source-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to + * operate only on a source blob with matching tags.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-tagsStringNoThe blob tags.
x-ms-seal-blobBooleanNoOverrides the sealed state of the destination + * blob.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-version-idStringThe version ID of the blob.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-statusStringStatus of the copy operation.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} 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, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch) { - return getTagsWithResponseAsync(containerName, blob, timeout, requestId, snapshot, versionId, ifTags, leaseId, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 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 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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return blob tags on successful completion of {@link Mono}. + public Mono> startCopyFromUrlWithResponseInternalAsync(String copySource, + RequestOptions requestOptions) { + return FluxUtil + .withContext(context -> service.startCopyFromUrl(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), copySource, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Starts an asynchronous copy from a source URL to a destination blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-access-tierStringNoThe tier to be set on the blob. Allowed values: "P4", + * "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", + * "Smart".
x-ms-rehydrate-priorityStringNoThe priority of the rehydration operation. + * Allowed values: "High", "Standard".
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
x-ms-source-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to + * operate only on a source blob with matching tags.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-tagsStringNoThe blob tags.
x-ms-seal-blobBooleanNoOverrides the sealed state of the destination + * blob.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-version-idStringThe version ID of the blob.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-statusStringStatus of the copy operation.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getTagsAsync(String containerName, String blob, Integer timeout, String requestId, - String snapshot, String versionId, String ifTags, String leaseId, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, Context context) { - return getTagsWithResponseAsync(containerName, blob, timeout, requestId, snapshot, versionId, ifTags, leaseId, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response startCopyFromUrlWithResponseInternal(String copySource, RequestOptions requestOptions) { + try { + return service.startCopyFromUrlSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + copySource, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. + * Synchronously copies a blob from a source URL to the destination blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-access-tierStringNoThe tier to be set on the blob. Allowed values: "P4", + * "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", + * "Smart".
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-source-content-md5byte[]NoSpecifies the MD5 hash calculated for the range + * of bytes that must be read from the copy source.
x-ms-tagsStringNoThe blob tags.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is + * supported, and the value must be a valid OAuth access token for the copy source.
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-copy-source-tag-optionStringNoIndicates if source tags should be copied + * or replaced with the tags specified. Default is 'Replace'. Allowed values: "REPLACE", "COPY".
x-ms-file-request-intentStringNoSpecifies the file request token intent. + * Allowed values: "backup".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-version-idStringThe version ID of the blob.
x-ms-copy-idStringIdentifier for this copy operation.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@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, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch) { + public Mono> copyFromUrlWithResponseInternalAsync(String copySource, RequestOptions requestOptions) { + final String requiresSync = "true"; return FluxUtil - .withContext( - context -> getTagsNoCustomHeadersWithResponseAsync(containerName, blob, timeout, requestId, snapshot, - versionId, ifTags, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 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 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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @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, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, - Context context) { - final String comp = "tags"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service - .getTagsNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, timeout, this.client.getVersion(), - requestId, snapshot, versionId, ifTags, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, - ifMatch, ifNoneMatch, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 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 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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return blob tags along with {@link ResponseBase}. + .withContext(context -> service.copyFromUrl(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), copySource, requiresSync, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Synchronously copies a blob from a source URL to the destination blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-access-tierStringNoThe tier to be set on the blob. Allowed values: "P4", + * "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", + * "Smart".
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-source-content-md5byte[]NoSpecifies the MD5 hash calculated for the range + * of bytes that must be read from the copy source.
x-ms-tagsStringNoThe blob tags.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is + * supported, and the value must be a valid OAuth access token for the copy source.
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-copy-source-tag-optionStringNoIndicates if source tags should be copied + * or replaced with the tags specified. Default is 'Replace'. Allowed values: "REPLACE", "COPY".
x-ms-file-request-intentStringNoSpecifies the file request token intent. + * Allowed values: "backup".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-version-idStringThe version ID of the blob.
x-ms-copy-idStringIdentifier for this copy operation.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getTagsWithResponse(String containerName, String blob, - Integer timeout, String requestId, String snapshot, String versionId, String ifTags, String leaseId, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, - Context context) { + public Response copyFromUrlWithResponseInternal(String copySource, RequestOptions requestOptions) { try { - final String comp = "tags"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getTagsSync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, snapshot, versionId, ifTags, leaseId, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, accept, context); - } catch (BlobStorageExceptionInternal internalException) { + final String requiresSync = "true"; + return service.copyFromUrlSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + copySource, requiresSync, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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. + * Aborts a pending asynchronous copy operation and leaves a destination blob with zero length and full metadata. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param copyId The ID of the copy to be aborted. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> abortCopyFromUrlWithResponseInternalAsync(String copyId, + RequestOptions requestOptions) { + final String copyActionAbortConstant = "abort"; + return FluxUtil + .withContext(context -> service.abortCopyFromUrl(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), copyId, copyActionAbortConstant, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Aborts a pending asynchronous copy operation and leaves a destination blob with zero length and full metadata. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param copyId The ID of the copy to be aborted. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BlobTags getTags(String containerName, String blob, Integer timeout, String requestId, String snapshot, - String versionId, String ifTags, String leaseId, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch) { + public Response abortCopyFromUrlWithResponseInternal(String copyId, RequestOptions requestOptions) { try { - return getTagsWithResponse(containerName, blob, timeout, requestId, snapshot, versionId, ifTags, leaseId, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, Context.NONE).getValue(); - } catch (BlobStorageExceptionInternal internalException) { + final String copyActionAbortConstant = "abort"; + return service.abortCopyFromUrlSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + copyId, copyActionAbortConstant, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 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 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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return blob tags along with {@link Response}. + * Sets the tier of the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-rehydrate-priorityStringNoThe priority of the rehydration operation. + * Allowed values: "High", "Standard".
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param tier Indicates the tier to be set on the blob. Allowed values: "P4", "P6", "P10", "P15", "P20", "P30", + * "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", "Smart". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setTierWithResponseInternalAsync(String tier, RequestOptions requestOptions) { + return FluxUtil + .withContext(context -> service.setTier(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + tier, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Sets the tier of the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-rehydrate-priorityStringNoThe priority of the rehydration operation. + * Allowed values: "High", "Standard".
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param tier Indicates the tier to be set on the blob. Allowed values: "P4", "P6", "P10", "P15", "P20", "P30", + * "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", "Smart". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@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, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, - Context context) { + public Response setTierWithResponseInternal(String tier, RequestOptions requestOptions) { try { - final String comp = "tags"; - final String accept = "application/xml"; - DateTimeRfc1123 ifModifiedSinceConverted - = ifModifiedSince == null ? null : new DateTimeRfc1123(ifModifiedSince); - DateTimeRfc1123 ifUnmodifiedSinceConverted - = ifUnmodifiedSince == null ? null : new DateTimeRfc1123(ifUnmodifiedSince); - return service.getTagsNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - this.client.getVersion(), requestId, snapshot, versionId, ifTags, leaseId, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, accept, context); - } catch (BlobStorageExceptionInternal internalException) { + return service.setTierSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), tier, + requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 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 tags Blob tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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}. + * Returns information about the storage account. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-account-kindStringThe account kind.
x-ms-sku-nameStringThe SKU name of the account.
x-ms-is-hns-enabledbooleanIndicates if the account has a hierarchical namespace + * enabled.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} 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, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, BlobTags tags) { + public Mono> getAccountInfoWithResponseInternalAsync(RequestOptions requestOptions) { return FluxUtil - .withContext(context -> setTagsWithResponseAsync(containerName, blob, timeout, versionId, - transactionalContentMD5, transactionalContentCrc64, requestId, ifTags, leaseId, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, tags, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 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 tags Blob tags. - * @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. - * @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> setTagsWithResponseAsync(String containerName, String blob, - Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, - String requestId, String ifTags, String leaseId, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, BlobTags tags, Context context) { - final String comp = "tags"; - final String accept = "application/xml"; - 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 - .setTags(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(), timeout, versionId, - transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, ifTags, leaseId, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, tags, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 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 tags Blob tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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. + .withContext(context -> service.getAccountInfo(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Returns information about the storage account. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-account-kindStringThe account kind.
x-ms-sku-nameStringThe SKU name of the account.
x-ms-is-hns-enabledbooleanIndicates if the account has a hierarchical namespace + * enabled.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @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, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, - String ifNoneMatch, BlobTags tags) { - return setTagsWithResponseAsync(containerName, blob, timeout, versionId, transactionalContentMD5, - transactionalContentCrc64, requestId, ifTags, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, tags).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); + public Response getAccountInfoWithResponseInternal(RequestOptions requestOptions) { + try { + return service.getAccountInfoSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 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 tags Blob tags. - * @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. - * @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 setTagsAsync(String containerName, String blob, Integer timeout, String versionId, - byte[] transactionalContentMD5, byte[] transactionalContentCrc64, String requestId, String ifTags, - String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, - String ifNoneMatch, BlobTags tags, Context context) { - return setTagsWithResponseAsync(containerName, blob, timeout, versionId, transactionalContentMD5, - transactionalContentCrc64, requestId, ifTags, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, tags, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); + * Gets the tags of the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-blob-if-modified-sinceOffsetDateTimeNoSpecify this value to operate only + * on a blob if it has been modified since the specified date-time.
x-ms-blob-if-unmodified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a blob if it has not been modified since the specified date-time.
x-ms-blob-if-matchStringNoSpecify this value to operate only on a blob with a + * matching Etag value.
x-ms-blob-if-none-matchStringNoSpecify this value to operate only on a blob + * with a non-matching Etag value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     TagSet (Required): [
+     *          (Required){
+     *             Key: String (Required)
+     *             Value: String (Required)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the tags of the specified blob along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTagsWithResponseInternalAsync(RequestOptions requestOptions) { + final String accept = "application/xml"; + return FluxUtil + .withContext(context -> service.getTags(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + accept, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Gets the tags of the specified blob. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-blob-if-modified-sinceOffsetDateTimeNoSpecify this value to operate only + * on a blob if it has been modified since the specified date-time.
x-ms-blob-if-unmodified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a blob if it has not been modified since the specified date-time.
x-ms-blob-if-matchStringNoSpecify this value to operate only on a blob with a + * matching Etag value.
x-ms-blob-if-none-matchStringNoSpecify this value to operate only on a blob + * with a non-matching Etag value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     TagSet (Required): [
+     *          (Required){
+     *             Key: String (Required)
+     *             Value: String (Required)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the tags of the specified blob along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTagsWithResponseInternal(RequestOptions requestOptions) { + try { + final String accept = "application/xml"; + return service.getTagsSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), accept, + requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 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 tags Blob tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Sets the tags of the specified blob. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
versionidStringNoSpecifies the version ID of the blob.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-if-modified-sinceOffsetDateTimeNoSpecify this value to operate only + * on a blob if it has been modified since the specified date-time.
x-ms-blob-if-unmodified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a blob if it has not been modified since the specified date-time.
x-ms-blob-if-matchStringNoSpecify this value to operate only on a blob with a + * matching Etag value.
x-ms-blob-if-none-matchStringNoSpecify this value to operate only on a blob + * with a non-matching Etag value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     TagSet (Required): [
+     *          (Required){
+     *             Key: String (Required)
+     *             Value: String (Required)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param tags The blob tags. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, BlobTags tags) { + public Mono> setTagsWithResponseInternalAsync(BinaryData tags, RequestOptions requestOptions) { + final String contentType = "application/xml"; return FluxUtil - .withContext(context -> setTagsNoCustomHeadersWithResponseAsync(containerName, blob, timeout, versionId, - transactionalContentMD5, transactionalContentCrc64, requestId, ifTags, leaseId, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, tags, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + .withContext(context -> service.setTags(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + contentType, tags, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Sets the tags of the specified blob. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
versionidStringNoSpecifies the version ID of the blob.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-if-modified-sinceOffsetDateTimeNoSpecify this value to operate only + * on a blob if it has been modified since the specified date-time.
x-ms-blob-if-unmodified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a blob if it has not been modified since the specified date-time.
x-ms-blob-if-matchStringNoSpecify this value to operate only on a blob with a + * matching Etag value.
x-ms-blob-if-none-matchStringNoSpecify this value to operate only on a blob + * with a non-matching Etag value.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     TagSet (Required): [
+     *          (Required){
+     *             Key: String (Required)
+     *             Value: String (Required)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param tags The blob tags. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response setTagsWithResponseInternal(BinaryData tags, RequestOptions requestOptions) { + try { + final String contentType = "application/xml"; + return service.setTagsSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), contentType, + tags, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 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 tags Blob tags. - * @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. - * @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> setTagsNoCustomHeadersWithResponseAsync(String containerName, String blob, - Integer timeout, String versionId, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, - String requestId, String ifTags, String leaseId, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, BlobTags tags, Context context) { - final String comp = "tags"; + * The Get Blob Layout operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. In addition, it may optionally return the layout of the blob. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
RangeStringNoSpecifies the range of the blob to operate on.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     Ranges (Optional): {
+     *         Range (Optional): [
+     *              (Optional){
+     *                 Start: long (Required)
+     *                 End: long (Required)
+     *                 EndpointIndex: int (Required)
+     *             }
+     *         ]
+     *     }
+     *     Endpoints (Optional): {
+     *         Endpoint (Optional): [
+     *              (Optional){
+     *                 Index: int (Required)
+     *                 Value: String (Required)
+     *             }
+     *         ]
+     *     }
+     *     Marker: String (Optional)
+     *     NextMarker: String (Optional)
+     *     MaxResults: Integer (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-blob-content-lengthlongThe size of the blob in bytes.
x-ms-blob-content-typeStringThe Content-Type of the blob.
x-ms-blob-content-encodingStringThe Content-Encoding of the blob.
x-ms-blob-content-md5byte[]MD5 hash of the full blob content only returned for ranged + * reads. This is the hash of the complete blob, not just the requested range.
x-ms-blob-creation-timeOffsetDateTimeThe date-time the blob was created.
x-ms-creation-timeOffsetDateTimeThe date-time the blob was created.
x-ms-metaMap<String, String>The metadata headers.
x-ms-or-policy-idStringThe object replication policy ID.
x-ms-orMap<String, String>The object replication status headers.
x-ms-blob-typeStringThe type of the blob.
x-ms-copy-completion-timeOffsetDateTimeIf this blob was the destination of a copy, + * specifies the completion time of the last attempted copy operation.
x-ms-copy-status-descriptionStringIf this blob was the destination of a copy, specifies + * the cause of the copy operation failure.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-progressStringIf this blob was the destination of a copy, specifies the + * number of bytes copied and the total bytes in the source.
x-ms-copy-sourceStringIf this blob was the destination of a copy, specifies the source + * URL.
x-ms-copy-statusStringStatus of the copy operation.
x-ms-incremental-copybooleanIncluded if the blob is incremental copy blob.
x-ms-copy-destination-snapshotStringIncluded if the blob is incremental copy blob or + * incremental copy snapshot, if x-ms-copy-status is success.
x-ms-lease-durationStringSpecifies the duration of the lease.
x-ms-lease-stateStringThe lease state of the blob.
x-ms-lease-statusStringThe lease status of the blob.
Content-LengthlongThe number of bytes present in the response body.
ETagStringAn opaque identifier for the current state of the resource.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
Content-EncodingStringThe Content-Encoding of the blob.
Content-DispositionStringThe Content-Disposition of the blob.
Content-LanguageStringThe Content-Language of the blob.
Cache-ControlStringThe Cache-Control of the blob.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
Accept-RangesStringIndicates that the service supports requests for partial blob + * content.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-access-tierStringThe access tier of the blob.
x-ms-access-tier-inferredbooleanIncluded if the access tier is inferred.
x-ms-smart-access-tierStringThe underlying tier of a smart tier blob. Only returned if + * the blob is in Smart tier.
x-ms-archive-statusStringIncluded if the blob rehydrate operation is pending. Indicates + * the destination tier.
x-ms-access-tier-change-timeOffsetDateTimeThe time the tier was changed on the blob. + * This is only returned if the tier on the blob was ever set.
x-ms-version-idStringThe version ID of the blob.
x-ms-is-current-versionbooleanIndicates whether this is the current version of the + * blob.
x-ms-tag-countlongThe number of tags associated with the blob.
x-ms-expiry-timeOffsetDateTimeThe date-time this blob will expire.
x-ms-blob-sealedbooleanWhether the blob is sealed.
x-ms-rehydrate-priorityStringThe priority of the rehydration operation.
x-ms-last-access-timeOffsetDateTimeThe date-time value that indicates the time at which + * the blob was last read or written.
x-ms-immutability-policy-until-dateOffsetDateTimeThe date-time that indicates the time + * at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringIndicates the immutability policy mode of the + * blob.
x-ms-legal-holdbooleanIndicates whether the blob has a legal hold.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the Get Blob Layout API along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getLayoutWithResponseInternalAsync(RequestOptions requestOptions) { final String accept = "application/xml"; - 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.setTagsNoCustomHeaders(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(), - timeout, versionId, transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, ifTags, - leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, tags, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + return FluxUtil + .withContext(context -> service.getLayout(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); } /** - * 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://learn.microsoft.com/rest/api/storageservices/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 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 tags Blob tags. - * @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. - * @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, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, BlobTags tags, Context context) { + * The Get Blob Layout operation returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. In addition, it may optionally return the layout of the blob. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
versionidStringNoSpecifies the version ID of the blob.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
RangeStringNoSpecifies the range of the blob to operate on.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     Ranges (Optional): {
+     *         Range (Optional): [
+     *              (Optional){
+     *                 Start: long (Required)
+     *                 End: long (Required)
+     *                 EndpointIndex: int (Required)
+     *             }
+     *         ]
+     *     }
+     *     Endpoints (Optional): {
+     *         Endpoint (Optional): [
+     *              (Optional){
+     *                 Index: int (Required)
+     *                 Value: String (Required)
+     *             }
+     *         ]
+     *     }
+     *     Marker: String (Optional)
+     *     NextMarker: String (Optional)
+     *     MaxResults: Integer (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-blob-content-lengthlongThe size of the blob in bytes.
x-ms-blob-content-typeStringThe Content-Type of the blob.
x-ms-blob-content-encodingStringThe Content-Encoding of the blob.
x-ms-blob-content-md5byte[]MD5 hash of the full blob content only returned for ranged + * reads. This is the hash of the complete blob, not just the requested range.
x-ms-blob-creation-timeOffsetDateTimeThe date-time the blob was created.
x-ms-creation-timeOffsetDateTimeThe date-time the blob was created.
x-ms-metaMap<String, String>The metadata headers.
x-ms-or-policy-idStringThe object replication policy ID.
x-ms-orMap<String, String>The object replication status headers.
x-ms-blob-typeStringThe type of the blob.
x-ms-copy-completion-timeOffsetDateTimeIf this blob was the destination of a copy, + * specifies the completion time of the last attempted copy operation.
x-ms-copy-status-descriptionStringIf this blob was the destination of a copy, specifies + * the cause of the copy operation failure.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-progressStringIf this blob was the destination of a copy, specifies the + * number of bytes copied and the total bytes in the source.
x-ms-copy-sourceStringIf this blob was the destination of a copy, specifies the source + * URL.
x-ms-copy-statusStringStatus of the copy operation.
x-ms-incremental-copybooleanIncluded if the blob is incremental copy blob.
x-ms-copy-destination-snapshotStringIncluded if the blob is incremental copy blob or + * incremental copy snapshot, if x-ms-copy-status is success.
x-ms-lease-durationStringSpecifies the duration of the lease.
x-ms-lease-stateStringThe lease state of the blob.
x-ms-lease-statusStringThe lease status of the blob.
Content-LengthlongThe number of bytes present in the response body.
ETagStringAn opaque identifier for the current state of the resource.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
Content-EncodingStringThe Content-Encoding of the blob.
Content-DispositionStringThe Content-Disposition of the blob.
Content-LanguageStringThe Content-Language of the blob.
Cache-ControlStringThe Cache-Control of the blob.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
Accept-RangesStringIndicates that the service supports requests for partial blob + * content.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-access-tierStringThe access tier of the blob.
x-ms-access-tier-inferredbooleanIncluded if the access tier is inferred.
x-ms-smart-access-tierStringThe underlying tier of a smart tier blob. Only returned if + * the blob is in Smart tier.
x-ms-archive-statusStringIncluded if the blob rehydrate operation is pending. Indicates + * the destination tier.
x-ms-access-tier-change-timeOffsetDateTimeThe time the tier was changed on the blob. + * This is only returned if the tier on the blob was ever set.
x-ms-version-idStringThe version ID of the blob.
x-ms-is-current-versionbooleanIndicates whether this is the current version of the + * blob.
x-ms-tag-countlongThe number of tags associated with the blob.
x-ms-expiry-timeOffsetDateTimeThe date-time this blob will expire.
x-ms-blob-sealedbooleanWhether the blob is sealed.
x-ms-rehydrate-priorityStringThe priority of the rehydration operation.
x-ms-last-access-timeOffsetDateTimeThe date-time value that indicates the time at which + * the blob was last read or written.
x-ms-immutability-policy-until-dateOffsetDateTimeThe date-time that indicates the time + * at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringIndicates the immutability policy mode of the + * blob.
x-ms-legal-holdbooleanIndicates whether the blob has a legal hold.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the Get Blob Layout API along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getLayoutWithResponseInternal(RequestOptions requestOptions) { try { - final String comp = "tags"; final String accept = "application/xml"; - 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.setTagsSync(this.client.getUrl(), containerName, blob, comp, this.client.getVersion(), - timeout, versionId, transactionalContentMD5Converted, transactionalContentCrc64Converted, requestId, - ifTags, leaseId, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, tags, - accept, context); - } catch (BlobStorageExceptionInternal internalException) { + return service.getLayoutSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), accept, + requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 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 tags Blob tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Queries the data of the specified blob with the provided query expressions. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     QueryType: String(SQL) (Required)
+     *     Expression: String (Required)
+     *     InputSerialization (Optional): {
+     *         Format (Required): {
+     *             Type: String(delimited/json/arrow/parquet) (Required)
+     *             DelimitedTextConfiguration (Optional): {
+     *                 ColumnSeparator: String (Optional)
+     *                 FieldQuote: String (Optional)
+     *                 RecordSeparator: String (Optional)
+     *                 EscapeChar: String (Optional)
+     *                 HasHeaders: Boolean (Optional)
+     *             }
+     *             JsonTextConfiguration (Optional): {
+     *                 RecordSeparator: String (Optional)
+     *             }
+     *             ArrowConfiguration (Optional): {
+     *                 Schema (Required): [
+     *                      (Required){
+     *                         Type: String (Required)
+     *                         Name: String (Optional)
+     *                         Precision: Integer (Optional)
+     *                         Scale: Integer (Optional)
+     *                     }
+     *                 ]
+     *             }
+     *             ParquetTextConfiguration (Optional): {
+     *             }
+     *         }
+     *     }
+     *     OutputSerialization (Optional): (recursive schema, see OutputSerialization above)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-metaMap<String, String>The metadata headers.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-LengthlongThe number of bytes present in the response body.
Content-RangeStringIndicates the range of bytes returned in this response.
ETagStringAn opaque identifier for the current state of the resource.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
Content-EncodingStringThe Content-Encoding of the blob.
Cache-ControlStringThe Cache-Control of the blob.
Content-DispositionStringThe Content-Disposition of the blob.
Content-LanguageStringThe Content-Language of the blob.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
x-ms-blob-typeStringThe type of the blob.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-copy-completion-timeOffsetDateTimeIf this blob was the destination of a copy, + * specifies the completion time of the last attempted copy operation.
x-ms-copy-status-descriptionStringIf this blob was the destination of a copy, specifies + * the cause of the copy operation failure.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-progressStringIf this blob was the destination of a copy, specifies the + * number of bytes copied and the total bytes in the source.
x-ms-copy-sourceStringIf this blob was the destination of a copy, specifies the source + * URL.
x-ms-copy-statusStringStatus of the copy operation.
x-ms-lease-durationStringSpecifies the duration of the lease.
x-ms-lease-stateStringThe lease state of the blob.
x-ms-lease-statusStringThe lease status of the blob.
Accept-RangesStringIndicates that the service supports requests for partial blob + * content.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-blob-content-md5byte[]MD5 hash of the full blob content only returned for ranged + * reads. This is the hash of the complete blob, not just the requested range.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param queryRequest The query request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @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, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, - String ifNoneMatch, BlobTags tags) { - setTagsWithResponse(containerName, blob, timeout, versionId, transactionalContentMD5, transactionalContentCrc64, - requestId, ifTags, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, 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://learn.microsoft.com/rest/api/storageservices/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 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 tags Blob tags. - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + public Mono> queryWithResponseInternalAsync(BinaryData queryRequest, + RequestOptions requestOptions) { + final String contentType = "application/xml"; + final String accept = "application/octet-stream"; + return FluxUtil + .withContext(context -> service.query(this.client.getUrl(), contentType, + this.client.getServiceVersion().getVersion(), accept, queryRequest, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Queries the data of the specified blob with the provided query expressions. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     QueryType: String(SQL) (Required)
+     *     Expression: String (Required)
+     *     InputSerialization (Optional): {
+     *         Format (Required): {
+     *             Type: String(delimited/json/arrow/parquet) (Required)
+     *             DelimitedTextConfiguration (Optional): {
+     *                 ColumnSeparator: String (Optional)
+     *                 FieldQuote: String (Optional)
+     *                 RecordSeparator: String (Optional)
+     *                 EscapeChar: String (Optional)
+     *                 HasHeaders: Boolean (Optional)
+     *             }
+     *             JsonTextConfiguration (Optional): {
+     *                 RecordSeparator: String (Optional)
+     *             }
+     *             ArrowConfiguration (Optional): {
+     *                 Schema (Required): [
+     *                      (Required){
+     *                         Type: String (Required)
+     *                         Name: String (Optional)
+     *                         Precision: Integer (Optional)
+     *                         Scale: Integer (Optional)
+     *                     }
+     *                 ]
+     *             }
+     *             ParquetTextConfiguration (Optional): {
+     *             }
+     *         }
+     *     }
+     *     OutputSerialization (Optional): (recursive schema, see OutputSerialization above)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-metaMap<String, String>The metadata headers.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-LengthlongThe number of bytes present in the response body.
Content-RangeStringIndicates the range of bytes returned in this response.
ETagStringAn opaque identifier for the current state of the resource.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
Content-EncodingStringThe Content-Encoding of the blob.
Cache-ControlStringThe Cache-Control of the blob.
Content-DispositionStringThe Content-Disposition of the blob.
Content-LanguageStringThe Content-Language of the blob.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
x-ms-blob-typeStringThe type of the blob.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-copy-completion-timeOffsetDateTimeIf this blob was the destination of a copy, + * specifies the completion time of the last attempted copy operation.
x-ms-copy-status-descriptionStringIf this blob was the destination of a copy, specifies + * the cause of the copy operation failure.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-progressStringIf this blob was the destination of a copy, specifies the + * number of bytes copied and the total bytes in the source.
x-ms-copy-sourceStringIf this blob was the destination of a copy, specifies the source + * URL.
x-ms-copy-statusStringStatus of the copy operation.
x-ms-lease-durationStringSpecifies the duration of the lease.
x-ms-lease-stateStringThe lease state of the blob.
x-ms-lease-statusStringThe lease status of the blob.
Accept-RangesStringIndicates that the service supports requests for partial blob + * content.
x-ms-blob-committed-block-countintThe number of committed blocks present in the + * blob.
x-ms-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-blob-content-md5byte[]MD5 hash of the full blob content only returned for ranged + * reads. This is the hash of the complete blob, not just the requested range.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param queryRequest The query request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the response body along with {@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, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String ifMatch, - String ifNoneMatch, BlobTags tags, Context context) { + public Response queryWithResponseInternal(BinaryData queryRequest, RequestOptions requestOptions) { try { - final String comp = "tags"; - final String accept = "application/xml"; - 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.setTagsNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, - this.client.getVersion(), timeout, versionId, transactionalContentMD5Converted, - transactionalContentCrc64Converted, requestId, ifTags, leaseId, ifModifiedSinceConverted, - ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, tags, accept, context); - } catch (BlobStorageExceptionInternal internalException) { + final String contentType = "application/xml"; + final String accept = "application/octet-stream"; + return service.querySync(this.client.getUrl(), contentType, this.client.getServiceVersion().getVersion(), + accept, queryRequest, requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobAsyncClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobAsyncClientInternal.java new file mode 100644 index 0000000000000..01d4896b39372 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobAsyncClientInternal.java @@ -0,0 +1,2306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.RequestConditions; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; +import com.azure.core.util.Base64Util; +import com.azure.core.util.BinaryData; +import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.serializer.ObjectSerializer; +import com.azure.storage.blob.implementation.models.BlobCopySourceTags; +import com.azure.storage.blob.implementation.models.BlobStorageErrorException; +import com.azure.storage.blob.implementation.models.BlockBlobsCommitBlockListHeaders; +import com.azure.storage.blob.implementation.models.BlockBlobsGetBlockListHeaders; +import com.azure.storage.blob.implementation.models.BlockBlobsStageBlockFromUrlHeaders; +import com.azure.storage.blob.implementation.models.BlockBlobsStageBlockHeaders; +import com.azure.storage.blob.implementation.models.BlockBlobsUploadBlobFromUrlHeaders; +import com.azure.storage.blob.implementation.models.BlockBlobsUploadHeaders; +import com.azure.storage.blob.models.AccessTier; +import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; +import com.azure.storage.blob.models.BlockList; +import com.azure.storage.blob.models.BlockListType; +import com.azure.storage.blob.models.BlockLookupList; +import com.azure.storage.blob.models.EncryptionAlgorithmType; +import com.azure.storage.blob.models.FileShareTokenIntent; +import java.time.OffsetDateTime; +import java.util.Map; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous AzureBlobStorage type. + */ +public final class BlockBlobAsyncClientInternal { + @Generated + private static final ObjectSerializer XML_SERIALIZER = XmlSerializerProviders.createInstance(); + + @Generated + private final BlockBlobsImpl serviceClient; + + /** + * Initializes an instance of BlockBlobAsyncClientInternal class. + * + * @param serviceClient the service client implementation. + */ + @Generated + public BlockBlobAsyncClientInternal(BlockBlobsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Uploads the content to the specified block blob. If the blob already exists, the data and any existing metadata + * will be overwritten. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-access-tierStringNoThe tier to be set on the blob. Allowed values: "P4", + * "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", + * "Smart".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-tagsStringNoThe blob tags.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-structured-bodyStringNoRequired if the request body is a structured + * message. Specifies the message schema version and properties.
x-ms-structured-content-lengthLongNoRequired if the request body is a + * structured message. Specifies the length of the blob/file content inside the message body. Will always be smaller + * than Content-Length.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-structured-bodyStringIndicates if the response body contains a structured message + * and specifies the message schema version and properties.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param contentLength The length of the request. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> uploadWithResponseInternal(long contentLength, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.uploadWithResponseInternalAsync(contentLength, body, requestOptions); + } + + /** + * Uploads the content from the specified URL to the block blob. If the blob already exists, the data and any + * existing metadata will be overwritten. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-access-tierStringNoThe tier to be set on the blob. Allowed values: "P4", + * "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", + * "Smart".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
x-ms-source-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to + * operate only on a source blob with matching tags.
x-ms-source-content-md5byte[]NoSpecifies the MD5 hash calculated for the range + * of bytes that must be read from the copy source.
x-ms-tagsStringNoThe blob tags.
x-ms-copy-source-blob-propertiesBooleanNoIndicates if properties from the + * source blob should be copied. Default is true.
x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is + * supported, and the value must be a valid OAuth access token for the copy source.
x-ms-copy-source-tag-optionStringNoIndicates if source tags should be copied + * or replaced with the tags specified. Default is 'Replace'. Allowed values: "REPLACE", "COPY".
x-ms-file-request-intentStringNoSpecifies the file request token intent. + * Allowed values: "backup".
x-ms-source-encryption-keyStringNoSpecifies the encryption key to use to + * decrypt the source data provided in the request.
x-ms-source-encryption-key-sha256StringNoThe SHA-256 hash of the provided + * source encryption key. Must be provided if the source encryption key is provided.
x-ms-source-encryption-algorithmStringNoThe algorithm used to produce the + * source encryption key hash. Must be provided if the source encryption key is provided. Allowed values: + * "AES256".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> uploadBlobFromUrlWithResponseInternal(String copySource, RequestOptions requestOptions) { + return this.serviceClient.uploadBlobFromUrlWithResponseInternalAsync(copySource, requestOptions); + } + + /** + * Creates a new block of data to be committed as part of a blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-structured-bodyStringNoRequired if the request body is a structured + * message. Specifies the message schema version and properties.
x-ms-structured-content-lengthLongNoRequired if the request body is a + * structured message. Specifies the length of the blob/file content inside the message body. Will always be smaller + * than Content-Length.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-structured-bodyStringIndicates if the response body contains a structured message + * and specifies the message schema version and properties.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param blockId A Base64 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 The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> stageBlockWithResponseInternal(String blockId, long contentLength, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.stageBlockWithResponseInternalAsync(blockId, contentLength, body, requestOptions); + } + + /** + * Creates a new block of data from the specified URL to be committed as part of a blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-source-rangeStringNoSpecifies the bytes of the source.
x-ms-source-content-md5byte[]NoSpecifies the MD5 hash calculated for the range + * of bytes that must be read from the copy source.
x-ms-source-content-crc64byte[]NoSpecifies the CRC64 calculated for the range + * of bytes that must be read from the source.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is + * supported, and the value must be a valid OAuth access token for the copy source.
x-ms-file-request-intentStringNoSpecifies the file request token intent. + * Allowed values: "backup".
x-ms-source-encryption-keyStringNoSpecifies the encryption key to use to + * decrypt the source data provided in the request.
x-ms-source-encryption-key-sha256StringNoThe SHA-256 hash of the provided + * source encryption key. Must be provided if the source encryption key is provided.
x-ms-source-encryption-algorithmStringNoThe algorithm used to produce the + * source encryption key hash. Must be provided if the source encryption key is provided. Allowed values: + * "AES256".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param blockId A Base64 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 Specifies the URL of the source. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> stageBlockFromUrlWithResponseInternal(String blockId, long contentLength, String sourceUrl, + RequestOptions requestOptions) { + return this.serviceClient.stageBlockFromUrlWithResponseInternalAsync(blockId, contentLength, sourceUrl, + requestOptions); + } + + /** + * Writes to the block blob by specifying the list of block IDs that make up the blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-access-tierStringNoThe tier to be set on the blob. Allowed values: "P4", + * "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", + * "Smart".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-tagsStringNoThe blob tags.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     Committed (Optional): [
+     *         String (Optional)
+     *     ]
+     *     Uncommitted (Optional): [
+     *         String (Optional)
+     *     ]
+     *     Latest (Optional): [
+     *         String (Optional)
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param blocks Blob blocks. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> commitBlockListWithResponseInternal(BinaryData blocks, RequestOptions requestOptions) { + return this.serviceClient.commitBlockListWithResponseInternalAsync(blocks, requestOptions); + } + + /** + * Retrieves the list of blocks that have been uploaded as part of the block blob. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     CommittedBlocks (Optional): [
+     *          (Optional){
+     *             Name: String (Required)
+     *             Size: long (Required)
+     *         }
+     *     ]
+     *     UncommittedBlocks (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
ETagStringAn opaque identifier for the current state of the resource.
x-ms-blob-content-lengthlongThe size of the blob in bytes.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both + * lists together. Allowed values: "committed", "uncommitted", "all". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return contains the committed and uncommitted blocks in a block blob along with {@link Response} on successful + * completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getBlockListWithResponseInternal(String listType, RequestOptions requestOptions) { + return this.serviceClient.getBlockListWithResponseInternalAsync(listType, requestOptions); + } + + /** + * Uploads the content to the specified block blob. If the blob already exists, the data and any existing metadata + * will be overwritten. + * + * @param contentLength The length of the request. + * @param body The body of the request. + * @param metadata The metadata headers. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 Specifies the transactional MD5 hash for the body. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param tier The tier to be set on the blob. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobTagsString The blob tags. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the body. + * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema + * version and properties. + * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the + * blob/file content inside the message body. Will always be smaller than Content-Length. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> uploadWithResponse(long contentLength, BinaryData body, + Map metadata, Integer timeout, byte[] transactionalContentMd5, String blobContentType, + String blobContentEncoding, String blobContentLanguage, byte[] blobContentMd5, String blobCacheControl, + String leaseId, String blobContentDisposition, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, AccessTier tier, String ifTags, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64, + String structuredBodyType, Long structuredContentLength, RequestConditions requestConditions, + RequestOptions requestOptions) { + // Generated convenience method for uploadWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (transactionalContentMd5 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.CONTENT_MD5, + Base64Util.encodeToString(transactionalContentMd5)); + } + if (blobContentType != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentEncoding != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (blobContentMd5 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (blobCacheControl != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (leaseId != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (encryptionKey != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (tier != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (ifTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobTagsString != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (immutabilityPolicyExpiry != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (transactionalContentCrc64 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (structuredBodyType != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-structured-body"), structuredBodyType); + } + if (structuredContentLength != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-structured-content-length"), + String.valueOf(structuredContentLength)); + } + if (ifModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return uploadWithResponseInternal(contentLength, body, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlockBlobsUploadHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Uploads the content to the specified block blob. If the blob already exists, the data and any existing metadata + * will be overwritten. + * + * @param contentLength The length of the request. + * @param body The body of the request. + * @param metadata The metadata headers. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 Specifies the transactional MD5 hash for the body. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param tier The tier to be set on the blob. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobTagsString The blob tags. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the body. + * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema + * version and properties. + * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the + * blob/file content inside the message body. Will always be smaller than Content-Length. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono upload(long contentLength, BinaryData body, Map metadata, Integer timeout, + byte[] transactionalContentMd5, String blobContentType, String blobContentEncoding, String blobContentLanguage, + byte[] blobContentMd5, String blobCacheControl, String leaseId, String blobContentDisposition, + String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + String encryptionScope, AccessTier tier, String ifTags, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + byte[] transactionalContentCrc64, String structuredBodyType, Long structuredContentLength, + RequestConditions requestConditions) { + // Generated convenience method for uploadWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (blobContentType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentEncoding != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (blobContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (blobCacheControl != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (tier != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobTagsString != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (immutabilityPolicyExpiry != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (transactionalContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (structuredBodyType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-body"), structuredBodyType); + } + if (structuredContentLength != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-content-length"), + String.valueOf(structuredContentLength)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return uploadWithResponseInternal(contentLength, body, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Uploads the content to the specified block blob. If the blob already exists, the data and any existing metadata + * will be overwritten. + * + * @param contentLength The length of the request. + * @param body The body of the request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono upload(long contentLength, BinaryData body) { + // Generated convenience method for uploadWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return uploadWithResponseInternal(contentLength, body, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Uploads the content from the specified URL to the block blob. If the blob already exists, the data and any + * existing metadata will be overwritten. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param metadata The metadata headers. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 Specifies the transactional MD5 hash for the body. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param tier The tier to be set on the blob. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param sourceIfTags Specifies a SQL-like where clause on blob tags to operate only on a source blob with matching + * tags. + * @param sourceContentMd5 Specifies the MD5 hash calculated for the range of bytes that must be read from the copy + * source. + * @param blobTagsString The blob tags. + * @param copySourceBlobProperties Indicates if properties from the source blob should be copied. Default is true. + * @param copySourceAuthorization Only the Bearer authorization scheme is supported, and the value must be a valid + * OAuth access token for the copy source. + * @param copySourceTags Indicates if source tags should be copied or replaced with the tags specified. Default is + * 'Replace'. + * @param fileRequestIntent Specifies the file request token intent. + * @param sourceEncryptionKey Specifies the encryption key to use to decrypt the source data provided in the + * request. + * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the + * source encryption key is provided. + * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Must be provided + * if the source encryption key is provided. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> uploadBlobFromUrlWithResponse(String copySource, + Map metadata, Integer timeout, byte[] transactionalContentMd5, String blobContentType, + String blobContentEncoding, String blobContentLanguage, byte[] blobContentMd5, String blobCacheControl, + String leaseId, String blobContentDisposition, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, AccessTier tier, String ifTags, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String sourceIfTags, byte[] sourceContentMd5, String blobTagsString, + Boolean copySourceBlobProperties, String copySourceAuthorization, BlobCopySourceTags copySourceTags, + FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, + EncryptionAlgorithmType sourceEncryptionAlgorithm, RequestConditions requestConditions, + RequestOptions requestOptions) { + // Generated convenience method for uploadBlobFromUrlWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (transactionalContentMd5 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.CONTENT_MD5, + Base64Util.encodeToString(transactionalContentMd5)); + } + if (blobContentType != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentEncoding != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (blobContentMd5 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (blobCacheControl != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (leaseId != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (encryptionKey != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (tier != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (ifTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (sourceIfModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (sourceIfTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-tags"), sourceIfTags); + } + if (sourceContentMd5 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-content-md5"), + Base64Util.encodeToString(sourceContentMd5)); + } + if (blobTagsString != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (copySourceBlobProperties != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-copy-source-blob-properties"), + String.valueOf(copySourceBlobProperties)); + } + if (copySourceAuthorization != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-copy-source-authorization"), + copySourceAuthorization); + } + if (copySourceTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-copy-source-tag-option"), + copySourceTags.toString()); + } + if (fileRequestIntent != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-file-request-intent"), + fileRequestIntent.toString()); + } + if (sourceEncryptionKey != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key"), sourceEncryptionKey); + } + if (sourceEncryptionKeySha256 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key-sha256"), + sourceEncryptionKeySha256); + } + if (sourceEncryptionAlgorithm != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-algorithm"), + sourceEncryptionAlgorithm.toString()); + } + if (ifModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return uploadBlobFromUrlWithResponseInternal(copySource, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlockBlobsUploadBlobFromUrlHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Uploads the content from the specified URL to the block blob. If the blob already exists, the data and any + * existing metadata will be overwritten. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param metadata The metadata headers. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 Specifies the transactional MD5 hash for the body. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param tier The tier to be set on the blob. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param sourceIfTags Specifies a SQL-like where clause on blob tags to operate only on a source blob with matching + * tags. + * @param sourceContentMd5 Specifies the MD5 hash calculated for the range of bytes that must be read from the copy + * source. + * @param blobTagsString The blob tags. + * @param copySourceBlobProperties Indicates if properties from the source blob should be copied. Default is true. + * @param copySourceAuthorization Only the Bearer authorization scheme is supported, and the value must be a valid + * OAuth access token for the copy source. + * @param copySourceTags Indicates if source tags should be copied or replaced with the tags specified. Default is + * 'Replace'. + * @param fileRequestIntent Specifies the file request token intent. + * @param sourceEncryptionKey Specifies the encryption key to use to decrypt the source data provided in the + * request. + * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the + * source encryption key is provided. + * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Must be provided + * if the source encryption key is provided. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono uploadBlobFromUrl(String copySource, Map metadata, Integer timeout, + byte[] transactionalContentMd5, String blobContentType, String blobContentEncoding, String blobContentLanguage, + byte[] blobContentMd5, String blobCacheControl, String leaseId, String blobContentDisposition, + String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + String encryptionScope, AccessTier tier, String ifTags, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, + byte[] sourceContentMd5, String blobTagsString, Boolean copySourceBlobProperties, + String copySourceAuthorization, BlobCopySourceTags copySourceTags, FileShareTokenIntent fileRequestIntent, + String sourceEncryptionKey, String sourceEncryptionKeySha256, EncryptionAlgorithmType sourceEncryptionAlgorithm, + RequestConditions requestConditions) { + // Generated convenience method for uploadBlobFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (blobContentType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentEncoding != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (blobContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (blobCacheControl != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (tier != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (sourceIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (sourceIfTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-tags"), sourceIfTags); + } + if (sourceContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-md5"), + Base64Util.encodeToString(sourceContentMd5)); + } + if (blobTagsString != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (copySourceBlobProperties != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-blob-properties"), + String.valueOf(copySourceBlobProperties)); + } + if (copySourceAuthorization != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-authorization"), + copySourceAuthorization); + } + if (copySourceTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-tag-option"), + copySourceTags.toString()); + } + if (fileRequestIntent != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-file-request-intent"), + fileRequestIntent.toString()); + } + if (sourceEncryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key"), sourceEncryptionKey); + } + if (sourceEncryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key-sha256"), + sourceEncryptionKeySha256); + } + if (sourceEncryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-algorithm"), + sourceEncryptionAlgorithm.toString()); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return uploadBlobFromUrlWithResponseInternal(copySource, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Uploads the content from the specified URL to the block blob. If the blob already exists, the data and any + * existing metadata will be overwritten. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono uploadBlobFromUrl(String copySource) { + // Generated convenience method for uploadBlobFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return uploadBlobFromUrlWithResponseInternal(copySource, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Creates a new block of data to be committed as part of a blob. + * + * @param blockId A Base64 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 The body of the request. + * @param transactionalContentMd5 Specifies the transactional MD5 hash for the body. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema + * version and properties. + * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the + * blob/file content inside the message body. Will always be smaller than Content-Length. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> stageBlockWithResponse(String blockId, + long contentLength, BinaryData body, byte[] transactionalContentMd5, byte[] transactionalContentCrc64, + Integer timeout, String leaseId, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String structuredBodyType, + Long structuredContentLength, RequestOptions requestOptions) { + // Generated convenience method for stageBlockWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (transactionalContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (structuredBodyType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-body"), structuredBodyType); + } + if (structuredContentLength != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-content-length"), + String.valueOf(structuredContentLength)); + } + return stageBlockWithResponseInternal(blockId, contentLength, body, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlockBlobsStageBlockHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Creates a new block of data to be committed as part of a blob. + * + * @param blockId A Base64 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 The body of the request. + * @param transactionalContentMd5 Specifies the transactional MD5 hash for the body. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema + * version and properties. + * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the + * blob/file content inside the message body. Will always be smaller than Content-Length. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono stageBlock(String blockId, long contentLength, BinaryData body, byte[] transactionalContentMd5, + byte[] transactionalContentCrc64, Integer timeout, String leaseId, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, + String structuredBodyType, Long structuredContentLength) { + // Generated convenience method for stageBlockWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (transactionalContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (structuredBodyType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-body"), structuredBodyType); + } + if (structuredContentLength != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-content-length"), + String.valueOf(structuredContentLength)); + } + return stageBlockWithResponseInternal(blockId, contentLength, body, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Creates a new block of data to be committed as part of a blob. + * + * @param blockId A Base64 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 The body of the request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono stageBlock(String blockId, long contentLength, BinaryData body) { + // Generated convenience method for stageBlockWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return stageBlockWithResponseInternal(blockId, contentLength, body, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Creates a new block of data from the specified URL to be committed as part of a blob. + * + * @param blockId A Base64 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 Specifies the URL of the source. + * @param sourceRange Specifies the bytes of the source. + * @param sourceContentMd5 Specifies the MD5 hash calculated for the range of bytes that must be read from the copy + * source. + * @param sourceContentCrc64 Specifies the CRC64 calculated for the range of bytes that must be read from the + * 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 encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param copySourceAuthorization Only the Bearer authorization scheme is supported, and the value must be a valid + * OAuth access token for the copy source. + * @param fileRequestIntent Specifies the file request token intent. + * @param sourceEncryptionKey Specifies the encryption key to use to decrypt the source data provided in the + * request. + * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the + * source encryption key is provided. + * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Must be provided + * if the source encryption key is provided. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> stageBlockFromUrlWithResponse(String blockId, + long contentLength, String sourceUrl, String sourceRange, byte[] sourceContentMd5, byte[] sourceContentCrc64, + Integer timeout, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + String encryptionScope, String leaseId, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, + String copySourceAuthorization, FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, + String sourceEncryptionKeySha256, EncryptionAlgorithmType sourceEncryptionAlgorithm, + RequestOptions requestOptions) { + // Generated convenience method for stageBlockFromUrlWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (sourceRange != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-range"), sourceRange); + } + if (sourceContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-md5"), + Base64Util.encodeToString(sourceContentMd5)); + } + if (sourceContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-crc64"), + Base64Util.encodeToString(sourceContentCrc64)); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (sourceIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (copySourceAuthorization != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-authorization"), + copySourceAuthorization); + } + if (fileRequestIntent != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-file-request-intent"), + fileRequestIntent.toString()); + } + if (sourceEncryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key"), sourceEncryptionKey); + } + if (sourceEncryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key-sha256"), + sourceEncryptionKeySha256); + } + if (sourceEncryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-algorithm"), + sourceEncryptionAlgorithm.toString()); + } + return stageBlockFromUrlWithResponseInternal(blockId, contentLength, sourceUrl, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlockBlobsStageBlockFromUrlHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Creates a new block of data from the specified URL to be committed as part of a blob. + * + * @param blockId A Base64 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 Specifies the URL of the source. + * @param sourceRange Specifies the bytes of the source. + * @param sourceContentMd5 Specifies the MD5 hash calculated for the range of bytes that must be read from the copy + * source. + * @param sourceContentCrc64 Specifies the CRC64 calculated for the range of bytes that must be read from the + * 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 encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param copySourceAuthorization Only the Bearer authorization scheme is supported, and the value must be a valid + * OAuth access token for the copy source. + * @param fileRequestIntent Specifies the file request token intent. + * @param sourceEncryptionKey Specifies the encryption key to use to decrypt the source data provided in the + * request. + * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the + * source encryption key is provided. + * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Must be provided + * if the source encryption key is provided. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono stageBlockFromUrl(String blockId, long contentLength, String sourceUrl, String sourceRange, + byte[] sourceContentMd5, byte[] sourceContentCrc64, Integer timeout, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String leaseId, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String copySourceAuthorization, FileShareTokenIntent fileRequestIntent, + String sourceEncryptionKey, String sourceEncryptionKeySha256, + EncryptionAlgorithmType sourceEncryptionAlgorithm) { + // Generated convenience method for stageBlockFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (sourceRange != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-range"), sourceRange); + } + if (sourceContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-md5"), + Base64Util.encodeToString(sourceContentMd5)); + } + if (sourceContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-crc64"), + Base64Util.encodeToString(sourceContentCrc64)); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (sourceIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (copySourceAuthorization != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-authorization"), + copySourceAuthorization); + } + if (fileRequestIntent != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-file-request-intent"), + fileRequestIntent.toString()); + } + if (sourceEncryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key"), sourceEncryptionKey); + } + if (sourceEncryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key-sha256"), + sourceEncryptionKeySha256); + } + if (sourceEncryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-algorithm"), + sourceEncryptionAlgorithm.toString()); + } + return stageBlockFromUrlWithResponseInternal(blockId, contentLength, sourceUrl, requestOptions) + .flatMap(FluxUtil::toMono); + } + + /** + * Creates a new block of data from the specified URL to be committed as part of a blob. + * + * @param blockId A Base64 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 Specifies the URL of the source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono stageBlockFromUrl(String blockId, long contentLength, String sourceUrl) { + // Generated convenience method for stageBlockFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return stageBlockFromUrlWithResponseInternal(blockId, contentLength, sourceUrl, requestOptions) + .flatMap(FluxUtil::toMono); + } + + /** + * Writes to the block blob by specifying the list of block IDs that make up the blob. + * + * @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 blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param transactionalContentMd5 Specifies the transactional MD5 hash for the body. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the body. + * @param metadata The metadata headers. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param tier The tier to be set on the blob. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobTagsString The blob tags. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> commitBlockListWithResponse( + BlockLookupList blocks, Integer timeout, String blobCacheControl, String blobContentType, + String blobContentEncoding, String blobContentLanguage, byte[] blobContentMd5, byte[] transactionalContentMd5, + byte[] transactionalContentCrc64, Map metadata, String leaseId, String blobContentDisposition, + String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + String encryptionScope, AccessTier tier, String ifTags, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for commitBlockListWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (blobCacheControl != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (blobContentType != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentEncoding != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (blobContentMd5 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (transactionalContentMd5 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.CONTENT_MD5, + Base64Util.encodeToString(transactionalContentMd5)); + } + if (transactionalContentCrc64 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (leaseId != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (encryptionKey != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (tier != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (ifTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobTagsString != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (immutabilityPolicyExpiry != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (ifModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return commitBlockListWithResponseInternal(BinaryData.fromObject(blocks, XML_SERIALIZER), requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new BlockBlobsCommitBlockListHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Writes to the block blob by specifying the list of block IDs that make up the blob. + * + * @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 blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param transactionalContentMd5 Specifies the transactional MD5 hash for the body. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the body. + * @param metadata The metadata headers. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param tier The tier to be set on the blob. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobTagsString The blob tags. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono commitBlockList(BlockLookupList blocks, Integer timeout, String blobCacheControl, + String blobContentType, String blobContentEncoding, String blobContentLanguage, byte[] blobContentMd5, + byte[] transactionalContentMd5, byte[] transactionalContentCrc64, Map metadata, String leaseId, + String blobContentDisposition, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, AccessTier tier, String ifTags, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, RequestConditions requestConditions) { + // Generated convenience method for commitBlockListWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (blobCacheControl != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (blobContentType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentEncoding != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (blobContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (transactionalContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (tier != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobTagsString != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (immutabilityPolicyExpiry != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return commitBlockListWithResponseInternal(BinaryData.fromObject(blocks, XML_SERIALIZER), requestOptions) + .flatMap(FluxUtil::toMono); + } + + /** + * Writes to the block blob by specifying the list of block IDs that make up the blob. + * + * @param blocks Blob blocks. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono commitBlockList(BlockLookupList blocks) { + // Generated convenience method for commitBlockListWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return commitBlockListWithResponseInternal(BinaryData.fromObject(blocks, XML_SERIALIZER), requestOptions) + .flatMap(FluxUtil::toMono); + } + + /** + * Retrieves the list of blocks that have been uploaded as part of the block blob. + * + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both + * lists together. + * @param snapshot Specifies the snapshot of 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contains the committed and uncommitted blocks in a block blob along with {@link ResponseBase} on + * successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getBlockListWithResponse(BlockListType listType, + String snapshot, Integer timeout, String leaseId, String ifTags, RequestOptions requestOptions) { + // Generated convenience method for getBlockListWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + return getBlockListWithResponseInternal(listType.toString(), requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(BlockList.class, XML_SERIALIZER), + new BlockBlobsGetBlockListHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Retrieves the list of blocks that have been uploaded as part of the block blob. + * + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both + * lists together. + * @param snapshot Specifies the snapshot of 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contains the committed and uncommitted blocks in a block blob on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getBlockList(BlockListType listType, String snapshot, Integer timeout, String leaseId, + String ifTags) { + // Generated convenience method for getBlockListWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + return getBlockListWithResponseInternal(listType.toString(), requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(BlockList.class, XML_SERIALIZER)); + } + + /** + * Retrieves the list of blocks that have been uploaded as part of the block blob. + * + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both + * lists together. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contains the committed and uncommitted blocks in a block blob on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getBlockList(BlockListType listType) { + // Generated convenience method for getBlockListWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getBlockListWithResponseInternal(listType.toString(), requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(BlockList.class, XML_SERIALIZER)); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobClientInternal.java new file mode 100644 index 0000000000000..a84c66f9a7b08 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobClientInternal.java @@ -0,0 +1,2291 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.RequestConditions; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; +import com.azure.core.util.Base64Util; +import com.azure.core.util.BinaryData; +import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.serializer.ObjectSerializer; +import com.azure.storage.blob.implementation.models.BlobCopySourceTags; +import com.azure.storage.blob.implementation.models.BlobStorageErrorException; +import com.azure.storage.blob.implementation.models.BlockBlobsCommitBlockListHeaders; +import com.azure.storage.blob.implementation.models.BlockBlobsGetBlockListHeaders; +import com.azure.storage.blob.implementation.models.BlockBlobsStageBlockFromUrlHeaders; +import com.azure.storage.blob.implementation.models.BlockBlobsStageBlockHeaders; +import com.azure.storage.blob.implementation.models.BlockBlobsUploadBlobFromUrlHeaders; +import com.azure.storage.blob.implementation.models.BlockBlobsUploadHeaders; +import com.azure.storage.blob.models.AccessTier; +import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; +import com.azure.storage.blob.models.BlockList; +import com.azure.storage.blob.models.BlockListType; +import com.azure.storage.blob.models.BlockLookupList; +import com.azure.storage.blob.models.EncryptionAlgorithmType; +import com.azure.storage.blob.models.FileShareTokenIntent; +import java.time.OffsetDateTime; +import java.util.Map; + +/** + * Initializes a new instance of the synchronous AzureBlobStorage type. + */ +public final class BlockBlobClientInternal { + @Generated + private static final ObjectSerializer XML_SERIALIZER = XmlSerializerProviders.createInstance(); + + @Generated + private final BlockBlobsImpl serviceClient; + + /** + * Initializes an instance of BlockBlobClientInternal class. + * + * @param serviceClient the service client implementation. + */ + @Generated + public BlockBlobClientInternal(BlockBlobsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Uploads the content to the specified block blob. If the blob already exists, the data and any existing metadata + * will be overwritten. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-access-tierStringNoThe tier to be set on the blob. Allowed values: "P4", + * "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", + * "Smart".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-tagsStringNoThe blob tags.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-structured-bodyStringNoRequired if the request body is a structured + * message. Specifies the message schema version and properties.
x-ms-structured-content-lengthLongNoRequired if the request body is a + * structured message. Specifies the length of the blob/file content inside the message body. Will always be smaller + * than Content-Length.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-structured-bodyStringIndicates if the response body contains a structured message + * and specifies the message schema version and properties.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param contentLength The length of the request. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response uploadWithResponseInternal(long contentLength, BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.uploadWithResponseInternal(contentLength, body, requestOptions); + } + + /** + * Uploads the content from the specified URL to the block blob. If the blob already exists, the data and any + * existing metadata will be overwritten. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-access-tierStringNoThe tier to be set on the blob. Allowed values: "P4", + * "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", + * "Smart".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
x-ms-source-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to + * operate only on a source blob with matching tags.
x-ms-source-content-md5byte[]NoSpecifies the MD5 hash calculated for the range + * of bytes that must be read from the copy source.
x-ms-tagsStringNoThe blob tags.
x-ms-copy-source-blob-propertiesBooleanNoIndicates if properties from the + * source blob should be copied. Default is true.
x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is + * supported, and the value must be a valid OAuth access token for the copy source.
x-ms-copy-source-tag-optionStringNoIndicates if source tags should be copied + * or replaced with the tags specified. Default is 'Replace'. Allowed values: "REPLACE", "COPY".
x-ms-file-request-intentStringNoSpecifies the file request token intent. + * Allowed values: "backup".
x-ms-source-encryption-keyStringNoSpecifies the encryption key to use to + * decrypt the source data provided in the request.
x-ms-source-encryption-key-sha256StringNoThe SHA-256 hash of the provided + * source encryption key. Must be provided if the source encryption key is provided.
x-ms-source-encryption-algorithmStringNoThe algorithm used to produce the + * source encryption key hash. Must be provided if the source encryption key is provided. Allowed values: + * "AES256".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response uploadBlobFromUrlWithResponseInternal(String copySource, RequestOptions requestOptions) { + return this.serviceClient.uploadBlobFromUrlWithResponseInternal(copySource, requestOptions); + } + + /** + * Creates a new block of data to be committed as part of a blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-structured-bodyStringNoRequired if the request body is a structured + * message. Specifies the message schema version and properties.
x-ms-structured-content-lengthLongNoRequired if the request body is a + * structured message. Specifies the length of the blob/file content inside the message body. Will always be smaller + * than Content-Length.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-structured-bodyStringIndicates if the response body contains a structured message + * and specifies the message schema version and properties.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param blockId A Base64 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 The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response stageBlockWithResponseInternal(String blockId, long contentLength, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.stageBlockWithResponseInternal(blockId, contentLength, body, requestOptions); + } + + /** + * Creates a new block of data from the specified URL to be committed as part of a blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-source-rangeStringNoSpecifies the bytes of the source.
x-ms-source-content-md5byte[]NoSpecifies the MD5 hash calculated for the range + * of bytes that must be read from the copy source.
x-ms-source-content-crc64byte[]NoSpecifies the CRC64 calculated for the range + * of bytes that must be read from the source.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is + * supported, and the value must be a valid OAuth access token for the copy source.
x-ms-file-request-intentStringNoSpecifies the file request token intent. + * Allowed values: "backup".
x-ms-source-encryption-keyStringNoSpecifies the encryption key to use to + * decrypt the source data provided in the request.
x-ms-source-encryption-key-sha256StringNoThe SHA-256 hash of the provided + * source encryption key. Must be provided if the source encryption key is provided.
x-ms-source-encryption-algorithmStringNoThe algorithm used to produce the + * source encryption key hash. Must be provided if the source encryption key is provided. Allowed values: + * "AES256".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param blockId A Base64 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 Specifies the URL of the source. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response stageBlockFromUrlWithResponseInternal(String blockId, long contentLength, String sourceUrl, + RequestOptions requestOptions) { + return this.serviceClient.stageBlockFromUrlWithResponseInternal(blockId, contentLength, sourceUrl, + requestOptions); + } + + /** + * Writes to the block blob by specifying the list of block IDs that make up the blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-access-tierStringNoThe tier to be set on the blob. Allowed values: "P4", + * "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", + * "Smart".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-tagsStringNoThe blob tags.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     Committed (Optional): [
+     *         String (Optional)
+     *     ]
+     *     Uncommitted (Optional): [
+     *         String (Optional)
+     *     ]
+     *     Latest (Optional): [
+     *         String (Optional)
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param blocks Blob blocks. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response commitBlockListWithResponseInternal(BinaryData blocks, RequestOptions requestOptions) { + return this.serviceClient.commitBlockListWithResponseInternal(blocks, requestOptions); + } + + /** + * Retrieves the list of blocks that have been uploaded as part of the block blob. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     CommittedBlocks (Optional): [
+     *          (Optional){
+     *             Name: String (Required)
+     *             Size: long (Required)
+     *         }
+     *     ]
+     *     UncommittedBlocks (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
ETagStringAn opaque identifier for the current state of the resource.
x-ms-blob-content-lengthlongThe size of the blob in bytes.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both + * lists together. Allowed values: "committed", "uncommitted", "all". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return contains the committed and uncommitted blocks in a block blob along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response getBlockListWithResponseInternal(String listType, RequestOptions requestOptions) { + return this.serviceClient.getBlockListWithResponseInternal(listType, requestOptions); + } + + /** + * Uploads the content to the specified block blob. If the blob already exists, the data and any existing metadata + * will be overwritten. + * + * @param contentLength The length of the request. + * @param body The body of the request. + * @param metadata The metadata headers. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 Specifies the transactional MD5 hash for the body. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param tier The tier to be set on the blob. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobTagsString The blob tags. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the body. + * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema + * version and properties. + * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the + * blob/file content inside the message body. Will always be smaller than Content-Length. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase uploadWithResponse(long contentLength, BinaryData body, + Map metadata, Integer timeout, byte[] transactionalContentMd5, String blobContentType, + String blobContentEncoding, String blobContentLanguage, byte[] blobContentMd5, String blobCacheControl, + String leaseId, String blobContentDisposition, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, AccessTier tier, String ifTags, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, byte[] transactionalContentCrc64, + String structuredBodyType, Long structuredContentLength, RequestConditions requestConditions, + RequestOptions requestOptions) { + // Generated convenience method for uploadWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (transactionalContentMd5 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.CONTENT_MD5, + Base64Util.encodeToString(transactionalContentMd5)); + } + if (blobContentType != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentEncoding != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (blobContentMd5 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (blobCacheControl != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (leaseId != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (encryptionKey != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (tier != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (ifTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobTagsString != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (immutabilityPolicyExpiry != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (transactionalContentCrc64 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (structuredBodyType != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-structured-body"), structuredBodyType); + } + if (structuredContentLength != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-structured-content-length"), + String.valueOf(structuredContentLength)); + } + if (ifModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = uploadWithResponseInternal(contentLength, body, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new BlockBlobsUploadHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Uploads the content to the specified block blob. If the blob already exists, the data and any existing metadata + * will be overwritten. + * + * @param contentLength The length of the request. + * @param body The body of the request. + * @param metadata The metadata headers. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 Specifies the transactional MD5 hash for the body. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param tier The tier to be set on the blob. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobTagsString The blob tags. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the body. + * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema + * version and properties. + * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the + * blob/file content inside the message body. Will always be smaller than Content-Length. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void upload(long contentLength, BinaryData body, Map metadata, Integer timeout, + byte[] transactionalContentMd5, String blobContentType, String blobContentEncoding, String blobContentLanguage, + byte[] blobContentMd5, String blobCacheControl, String leaseId, String blobContentDisposition, + String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + String encryptionScope, AccessTier tier, String ifTags, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + byte[] transactionalContentCrc64, String structuredBodyType, Long structuredContentLength, + RequestConditions requestConditions) { + // Generated convenience method for uploadWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (blobContentType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentEncoding != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (blobContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (blobCacheControl != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (tier != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobTagsString != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (immutabilityPolicyExpiry != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (transactionalContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (structuredBodyType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-body"), structuredBodyType); + } + if (structuredContentLength != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-content-length"), + String.valueOf(structuredContentLength)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + uploadWithResponseInternal(contentLength, body, requestOptions).getValue(); + } + + /** + * Uploads the content to the specified block blob. If the blob already exists, the data and any existing metadata + * will be overwritten. + * + * @param contentLength The length of the request. + * @param body The body of the request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void upload(long contentLength, BinaryData body) { + // Generated convenience method for uploadWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + uploadWithResponseInternal(contentLength, body, requestOptions).getValue(); + } + + /** + * Uploads the content from the specified URL to the block blob. If the blob already exists, the data and any + * existing metadata will be overwritten. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param metadata The metadata headers. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 Specifies the transactional MD5 hash for the body. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param tier The tier to be set on the blob. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param sourceIfTags Specifies a SQL-like where clause on blob tags to operate only on a source blob with matching + * tags. + * @param sourceContentMd5 Specifies the MD5 hash calculated for the range of bytes that must be read from the copy + * source. + * @param blobTagsString The blob tags. + * @param copySourceBlobProperties Indicates if properties from the source blob should be copied. Default is true. + * @param copySourceAuthorization Only the Bearer authorization scheme is supported, and the value must be a valid + * OAuth access token for the copy source. + * @param copySourceTags Indicates if source tags should be copied or replaced with the tags specified. Default is + * 'Replace'. + * @param fileRequestIntent Specifies the file request token intent. + * @param sourceEncryptionKey Specifies the encryption key to use to decrypt the source data provided in the + * request. + * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the + * source encryption key is provided. + * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Must be provided + * if the source encryption key is provided. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase uploadBlobFromUrlWithResponse(String copySource, + Map metadata, Integer timeout, byte[] transactionalContentMd5, String blobContentType, + String blobContentEncoding, String blobContentLanguage, byte[] blobContentMd5, String blobCacheControl, + String leaseId, String blobContentDisposition, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, AccessTier tier, String ifTags, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String sourceIfTags, byte[] sourceContentMd5, String blobTagsString, + Boolean copySourceBlobProperties, String copySourceAuthorization, BlobCopySourceTags copySourceTags, + FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, + EncryptionAlgorithmType sourceEncryptionAlgorithm, RequestConditions requestConditions, + RequestOptions requestOptions) { + // Generated convenience method for uploadBlobFromUrlWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (transactionalContentMd5 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.CONTENT_MD5, + Base64Util.encodeToString(transactionalContentMd5)); + } + if (blobContentType != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentEncoding != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (blobContentMd5 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (blobCacheControl != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (leaseId != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (encryptionKey != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (tier != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (ifTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (sourceIfModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (sourceIfTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-if-tags"), sourceIfTags); + } + if (sourceContentMd5 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-content-md5"), + Base64Util.encodeToString(sourceContentMd5)); + } + if (blobTagsString != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (copySourceBlobProperties != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-copy-source-blob-properties"), + String.valueOf(copySourceBlobProperties)); + } + if (copySourceAuthorization != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-copy-source-authorization"), + copySourceAuthorization); + } + if (copySourceTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-copy-source-tag-option"), + copySourceTags.toString()); + } + if (fileRequestIntent != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-file-request-intent"), + fileRequestIntent.toString()); + } + if (sourceEncryptionKey != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key"), sourceEncryptionKey); + } + if (sourceEncryptionKeySha256 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key-sha256"), + sourceEncryptionKeySha256); + } + if (sourceEncryptionAlgorithm != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-algorithm"), + sourceEncryptionAlgorithm.toString()); + } + if (ifModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = uploadBlobFromUrlWithResponseInternal(copySource, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new BlockBlobsUploadBlobFromUrlHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Uploads the content from the specified URL to the block blob. If the blob already exists, the data and any + * existing metadata will be overwritten. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param metadata The metadata headers. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 Specifies the transactional MD5 hash for the body. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param tier The tier to be set on the blob. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param sourceIfTags Specifies a SQL-like where clause on blob tags to operate only on a source blob with matching + * tags. + * @param sourceContentMd5 Specifies the MD5 hash calculated for the range of bytes that must be read from the copy + * source. + * @param blobTagsString The blob tags. + * @param copySourceBlobProperties Indicates if properties from the source blob should be copied. Default is true. + * @param copySourceAuthorization Only the Bearer authorization scheme is supported, and the value must be a valid + * OAuth access token for the copy source. + * @param copySourceTags Indicates if source tags should be copied or replaced with the tags specified. Default is + * 'Replace'. + * @param fileRequestIntent Specifies the file request token intent. + * @param sourceEncryptionKey Specifies the encryption key to use to decrypt the source data provided in the + * request. + * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the + * source encryption key is provided. + * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Must be provided + * if the source encryption key is provided. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void uploadBlobFromUrl(String copySource, Map metadata, Integer timeout, + byte[] transactionalContentMd5, String blobContentType, String blobContentEncoding, String blobContentLanguage, + byte[] blobContentMd5, String blobCacheControl, String leaseId, String blobContentDisposition, + String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + String encryptionScope, AccessTier tier, String ifTags, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, String sourceIfTags, + byte[] sourceContentMd5, String blobTagsString, Boolean copySourceBlobProperties, + String copySourceAuthorization, BlobCopySourceTags copySourceTags, FileShareTokenIntent fileRequestIntent, + String sourceEncryptionKey, String sourceEncryptionKeySha256, EncryptionAlgorithmType sourceEncryptionAlgorithm, + RequestConditions requestConditions) { + // Generated convenience method for uploadBlobFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (blobContentType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentEncoding != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (blobContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (blobCacheControl != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (tier != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (sourceIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (sourceIfTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-tags"), sourceIfTags); + } + if (sourceContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-md5"), + Base64Util.encodeToString(sourceContentMd5)); + } + if (blobTagsString != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (copySourceBlobProperties != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-blob-properties"), + String.valueOf(copySourceBlobProperties)); + } + if (copySourceAuthorization != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-authorization"), + copySourceAuthorization); + } + if (copySourceTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-tag-option"), + copySourceTags.toString()); + } + if (fileRequestIntent != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-file-request-intent"), + fileRequestIntent.toString()); + } + if (sourceEncryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key"), sourceEncryptionKey); + } + if (sourceEncryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key-sha256"), + sourceEncryptionKeySha256); + } + if (sourceEncryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-algorithm"), + sourceEncryptionAlgorithm.toString()); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + uploadBlobFromUrlWithResponseInternal(copySource, requestOptions).getValue(); + } + + /** + * Uploads the content from the specified URL to the block blob. If the blob already exists, the data and any + * existing metadata will be overwritten. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void uploadBlobFromUrl(String copySource) { + // Generated convenience method for uploadBlobFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + uploadBlobFromUrlWithResponseInternal(copySource, requestOptions).getValue(); + } + + /** + * Creates a new block of data to be committed as part of a blob. + * + * @param blockId A Base64 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 The body of the request. + * @param transactionalContentMd5 Specifies the transactional MD5 hash for the body. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema + * version and properties. + * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the + * blob/file content inside the message body. Will always be smaller than Content-Length. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase stageBlockWithResponse(String blockId, long contentLength, + BinaryData body, byte[] transactionalContentMd5, byte[] transactionalContentCrc64, Integer timeout, + String leaseId, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + String encryptionScope, String structuredBodyType, Long structuredContentLength, + RequestOptions requestOptions) { + // Generated convenience method for stageBlockWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (transactionalContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (structuredBodyType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-body"), structuredBodyType); + } + if (structuredContentLength != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-content-length"), + String.valueOf(structuredContentLength)); + } + Response protocolMethodResponse + = stageBlockWithResponseInternal(blockId, contentLength, body, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new BlockBlobsStageBlockHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Creates a new block of data to be committed as part of a blob. + * + * @param blockId A Base64 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 The body of the request. + * @param transactionalContentMd5 Specifies the transactional MD5 hash for the body. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema + * version and properties. + * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the + * blob/file content inside the message body. Will always be smaller than Content-Length. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void stageBlock(String blockId, long contentLength, BinaryData body, byte[] transactionalContentMd5, + byte[] transactionalContentCrc64, Integer timeout, String leaseId, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, + String structuredBodyType, Long structuredContentLength) { + // Generated convenience method for stageBlockWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (transactionalContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (structuredBodyType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-body"), structuredBodyType); + } + if (structuredContentLength != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-content-length"), + String.valueOf(structuredContentLength)); + } + stageBlockWithResponseInternal(blockId, contentLength, body, requestOptions).getValue(); + } + + /** + * Creates a new block of data to be committed as part of a blob. + * + * @param blockId A Base64 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 The body of the request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void stageBlock(String blockId, long contentLength, BinaryData body) { + // Generated convenience method for stageBlockWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + stageBlockWithResponseInternal(blockId, contentLength, body, requestOptions).getValue(); + } + + /** + * Creates a new block of data from the specified URL to be committed as part of a blob. + * + * @param blockId A Base64 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 Specifies the URL of the source. + * @param sourceRange Specifies the bytes of the source. + * @param sourceContentMd5 Specifies the MD5 hash calculated for the range of bytes that must be read from the copy + * source. + * @param sourceContentCrc64 Specifies the CRC64 calculated for the range of bytes that must be read from the + * 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 encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param copySourceAuthorization Only the Bearer authorization scheme is supported, and the value must be a valid + * OAuth access token for the copy source. + * @param fileRequestIntent Specifies the file request token intent. + * @param sourceEncryptionKey Specifies the encryption key to use to decrypt the source data provided in the + * request. + * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the + * source encryption key is provided. + * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Must be provided + * if the source encryption key is provided. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase stageBlockFromUrlWithResponse(String blockId, + long contentLength, String sourceUrl, String sourceRange, byte[] sourceContentMd5, byte[] sourceContentCrc64, + Integer timeout, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + String encryptionScope, String leaseId, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, + String copySourceAuthorization, FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, + String sourceEncryptionKeySha256, EncryptionAlgorithmType sourceEncryptionAlgorithm, + RequestOptions requestOptions) { + // Generated convenience method for stageBlockFromUrlWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (sourceRange != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-range"), sourceRange); + } + if (sourceContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-md5"), + Base64Util.encodeToString(sourceContentMd5)); + } + if (sourceContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-crc64"), + Base64Util.encodeToString(sourceContentCrc64)); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (sourceIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (copySourceAuthorization != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-authorization"), + copySourceAuthorization); + } + if (fileRequestIntent != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-file-request-intent"), + fileRequestIntent.toString()); + } + if (sourceEncryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key"), sourceEncryptionKey); + } + if (sourceEncryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key-sha256"), + sourceEncryptionKeySha256); + } + if (sourceEncryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-algorithm"), + sourceEncryptionAlgorithm.toString()); + } + Response protocolMethodResponse + = stageBlockFromUrlWithResponseInternal(blockId, contentLength, sourceUrl, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new BlockBlobsStageBlockFromUrlHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Creates a new block of data from the specified URL to be committed as part of a blob. + * + * @param blockId A Base64 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 Specifies the URL of the source. + * @param sourceRange Specifies the bytes of the source. + * @param sourceContentMd5 Specifies the MD5 hash calculated for the range of bytes that must be read from the copy + * source. + * @param sourceContentCrc64 Specifies the CRC64 calculated for the range of bytes that must be read from the + * 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 encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param copySourceAuthorization Only the Bearer authorization scheme is supported, and the value must be a valid + * OAuth access token for the copy source. + * @param fileRequestIntent Specifies the file request token intent. + * @param sourceEncryptionKey Specifies the encryption key to use to decrypt the source data provided in the + * request. + * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the + * source encryption key is provided. + * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Must be provided + * if the source encryption key is provided. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void stageBlockFromUrl(String blockId, long contentLength, String sourceUrl, String sourceRange, + byte[] sourceContentMd5, byte[] sourceContentCrc64, Integer timeout, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String leaseId, + OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, + String sourceIfNoneMatch, String copySourceAuthorization, FileShareTokenIntent fileRequestIntent, + String sourceEncryptionKey, String sourceEncryptionKeySha256, + EncryptionAlgorithmType sourceEncryptionAlgorithm) { + // Generated convenience method for stageBlockFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (sourceRange != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-range"), sourceRange); + } + if (sourceContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-md5"), + Base64Util.encodeToString(sourceContentMd5)); + } + if (sourceContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-crc64"), + Base64Util.encodeToString(sourceContentCrc64)); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (sourceIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (copySourceAuthorization != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-authorization"), + copySourceAuthorization); + } + if (fileRequestIntent != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-file-request-intent"), + fileRequestIntent.toString()); + } + if (sourceEncryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key"), sourceEncryptionKey); + } + if (sourceEncryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key-sha256"), + sourceEncryptionKeySha256); + } + if (sourceEncryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-algorithm"), + sourceEncryptionAlgorithm.toString()); + } + stageBlockFromUrlWithResponseInternal(blockId, contentLength, sourceUrl, requestOptions).getValue(); + } + + /** + * Creates a new block of data from the specified URL to be committed as part of a blob. + * + * @param blockId A Base64 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 Specifies the URL of the source. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void stageBlockFromUrl(String blockId, long contentLength, String sourceUrl) { + // Generated convenience method for stageBlockFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + stageBlockFromUrlWithResponseInternal(blockId, contentLength, sourceUrl, requestOptions).getValue(); + } + + /** + * Writes to the block blob by specifying the list of block IDs that make up the blob. + * + * @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 blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param transactionalContentMd5 Specifies the transactional MD5 hash for the body. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the body. + * @param metadata The metadata headers. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param tier The tier to be set on the blob. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobTagsString The blob tags. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase commitBlockListWithResponse(BlockLookupList blocks, + Integer timeout, String blobCacheControl, String blobContentType, String blobContentEncoding, + String blobContentLanguage, byte[] blobContentMd5, byte[] transactionalContentMd5, + byte[] transactionalContentCrc64, Map metadata, String leaseId, String blobContentDisposition, + String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + String encryptionScope, AccessTier tier, String ifTags, String blobTagsString, + OffsetDateTime immutabilityPolicyExpiry, BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, + RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for commitBlockListWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (blobCacheControl != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (blobContentType != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentEncoding != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (blobContentMd5 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (transactionalContentMd5 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.CONTENT_MD5, + Base64Util.encodeToString(transactionalContentMd5)); + } + if (transactionalContentCrc64 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (leaseId != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (encryptionKey != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (tier != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (ifTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobTagsString != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (immutabilityPolicyExpiry != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (ifModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse + = commitBlockListWithResponseInternal(BinaryData.fromObject(blocks, XML_SERIALIZER), requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new BlockBlobsCommitBlockListHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Writes to the block blob by specifying the list of block IDs that make up the blob. + * + * @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 blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param transactionalContentMd5 Specifies the transactional MD5 hash for the body. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the body. + * @param metadata The metadata headers. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param tier The tier to be set on the blob. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobTagsString The blob tags. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void commitBlockList(BlockLookupList blocks, Integer timeout, String blobCacheControl, + String blobContentType, String blobContentEncoding, String blobContentLanguage, byte[] blobContentMd5, + byte[] transactionalContentMd5, byte[] transactionalContentCrc64, Map metadata, String leaseId, + String blobContentDisposition, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, AccessTier tier, String ifTags, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, RequestConditions requestConditions) { + // Generated convenience method for commitBlockListWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (blobCacheControl != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (blobContentType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentEncoding != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (blobContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (transactionalContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (tier != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobTagsString != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (immutabilityPolicyExpiry != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + commitBlockListWithResponseInternal(BinaryData.fromObject(blocks, XML_SERIALIZER), requestOptions).getValue(); + } + + /** + * Writes to the block blob by specifying the list of block IDs that make up the blob. + * + * @param blocks Blob blocks. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void commitBlockList(BlockLookupList blocks) { + // Generated convenience method for commitBlockListWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + commitBlockListWithResponseInternal(BinaryData.fromObject(blocks, XML_SERIALIZER), requestOptions).getValue(); + } + + /** + * Retrieves the list of blocks that have been uploaded as part of the block blob. + * + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both + * lists together. + * @param snapshot Specifies the snapshot of 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contains the committed and uncommitted blocks in a block blob along with {@link ResponseBase}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getBlockListWithResponse(BlockListType listType, + String snapshot, Integer timeout, String leaseId, String ifTags, RequestOptions requestOptions) { + // Generated convenience method for getBlockListWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + Response protocolMethodResponse + = getBlockListWithResponseInternal(listType.toString(), requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(BlockList.class, XML_SERIALIZER), + new BlockBlobsGetBlockListHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Retrieves the list of blocks that have been uploaded as part of the block blob. + * + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both + * lists together. + * @param snapshot Specifies the snapshot of 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contains the committed and uncommitted blocks in a block blob. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BlockList getBlockList(BlockListType listType, String snapshot, Integer timeout, String leaseId, + String ifTags) { + // Generated convenience method for getBlockListWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + return getBlockListWithResponseInternal(listType.toString(), requestOptions).getValue() + .toObject(BlockList.class, XML_SERIALIZER); + } + + /** + * Retrieves the list of blocks that have been uploaded as part of the block blob. + * + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both + * lists together. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contains the committed and uncommitted blocks in a block blob. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BlockList getBlockList(BlockListType listType) { + // Generated convenience method for getBlockListWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getBlockListWithResponseInternal(listType.toString(), requestOptions).getValue() + .toObject(BlockList.class, XML_SERIALIZER); + } +} 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 782381cf6099d..c723c39689399 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation; import com.azure.core.annotation.BodyParam; @@ -9,44 +9,21 @@ import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.ResponseBase; import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Base64Util; import com.azure.core.util.BinaryData; 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.BlobStorageExceptionInternal; -import com.azure.storage.blob.implementation.models.BlockBlobsCommitBlockListHeaders; -import com.azure.storage.blob.implementation.models.BlockBlobsGetBlockListHeaders; -import com.azure.storage.blob.implementation.models.BlockBlobsPutBlobFromUrlHeaders; -import com.azure.storage.blob.implementation.models.BlockBlobsStageBlockFromURLHeaders; -import com.azure.storage.blob.implementation.models.BlockBlobsStageBlockHeaders; -import com.azure.storage.blob.implementation.models.BlockBlobsUploadHeaders; -import com.azure.storage.blob.implementation.models.EncryptionScope; +import com.azure.storage.blob.BlobServiceVersion; +import com.azure.storage.blob.implementation.models.BlobStorageErrorException; import com.azure.storage.blob.implementation.util.ModelHelper; -import com.azure.storage.blob.models.AccessTier; -import com.azure.storage.blob.models.BlobCopySourceTagsMode; -import com.azure.storage.blob.models.BlobHttpHeaders; -import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; -import com.azure.storage.blob.models.BlockList; -import com.azure.storage.blob.models.BlockListType; -import com.azure.storage.blob.models.BlockLookupList; -import com.azure.storage.blob.models.CpkInfo; -import com.azure.storage.blob.models.EncryptionAlgorithmType; -import com.azure.storage.blob.models.FileShareTokenIntent; -import java.nio.ByteBuffer; -import java.time.OffsetDateTime; -import java.util.Map; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -75,6 +52,19 @@ public final class BlockBlobsImpl { this.client = client; } + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public BlobServiceVersion getServiceVersion() { + try { + return client.getServiceVersion(); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } + } + /** * The interface defining all the services for AzureBlobStorageBlockBlobs to be used by the proxy service to perform * REST calls. @@ -83,5702 +73,1368 @@ public final class BlockBlobsImpl { @ServiceInterface(name = "AzureBlobStorageBlockBlobs") public interface BlockBlobsService { - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") Flux body, @HeaderParam("Accept") String accept, - Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") Flux body, @HeaderParam("Accept") String accept, - Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, - Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, - Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, - Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, - Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-file-request-intent") FileShareTokenIntent fileRequestIntent, - @HeaderParam("x-ms-source-encryption-key") String sourceEncryptionKey, - @HeaderParam("x-ms-source-encryption-key-sha256") String sourceEncryptionKeySha256, - @HeaderParam("x-ms-source-encryption-algorithm") EncryptionAlgorithmType sourceEncryptionAlgorithm, - @HeaderParam("Accept") String accept, Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-file-request-intent") FileShareTokenIntent fileRequestIntent, - @HeaderParam("x-ms-source-encryption-key") String sourceEncryptionKey, - @HeaderParam("x-ms-source-encryption-key-sha256") String sourceEncryptionKeySha256, - @HeaderParam("x-ms-source-encryption-algorithm") EncryptionAlgorithmType sourceEncryptionAlgorithm, - @HeaderParam("Accept") String accept, Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-file-request-intent") FileShareTokenIntent fileRequestIntent, - @HeaderParam("x-ms-source-encryption-key") String sourceEncryptionKey, - @HeaderParam("x-ms-source-encryption-key-sha256") String sourceEncryptionKeySha256, - @HeaderParam("x-ms-source-encryption-algorithm") EncryptionAlgorithmType sourceEncryptionAlgorithm, - @HeaderParam("Accept") String accept, Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-file-request-intent") FileShareTokenIntent fileRequestIntent, - @HeaderParam("x-ms-source-encryption-key") String sourceEncryptionKey, - @HeaderParam("x-ms-source-encryption-key-sha256") String sourceEncryptionKeySha256, - @HeaderParam("x-ms-source-encryption-algorithm") EncryptionAlgorithmType sourceEncryptionAlgorithm, - @HeaderParam("Accept") String accept, Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") Flux body, @HeaderParam("Accept") String accept, - Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") Flux body, @HeaderParam("Accept") String accept, - Context context); - - @Put("/{containerName}/{blob}") + @Put("/") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, - Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> upload(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-blob-type") String blobType, @BodyParam("application/octet-stream") BinaryData body, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("/") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, - Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response uploadSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Content-Length") long contentLength, + @HeaderParam("x-ms-blob-type") String blobType, @BodyParam("application/octet-stream") BinaryData body, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("/") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, - Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> uploadBlobFromUrl(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("Content-Length") int contentLength, @HeaderParam("x-ms-blob-type") String blobType, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("/") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, - Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response uploadBlobFromUrlSync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("x-ms-copy-source") String copySource, + @HeaderParam("Content-Length") int contentLength, @HeaderParam("x-ms-blob-type") String blobType, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=block") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-file-request-intent") FileShareTokenIntent fileRequestIntent, - @HeaderParam("x-ms-source-encryption-key") String sourceEncryptionKey, - @HeaderParam("x-ms-source-encryption-key-sha256") String sourceEncryptionKeySha256, - @HeaderParam("x-ms-source-encryption-algorithm") EncryptionAlgorithmType sourceEncryptionAlgorithm, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> stageBlock(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Type") String contentType, @QueryParam("blockid") String blockId, + @HeaderParam("Content-Length") long contentLength, @BodyParam("application/octet-stream") BinaryData body, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=block") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-file-request-intent") FileShareTokenIntent fileRequestIntent, - @HeaderParam("x-ms-source-encryption-key") String sourceEncryptionKey, - @HeaderParam("x-ms-source-encryption-key-sha256") String sourceEncryptionKeySha256, - @HeaderParam("x-ms-source-encryption-algorithm") EncryptionAlgorithmType sourceEncryptionAlgorithm, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response stageBlockSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Type") String contentType, @QueryParam("blockid") String blockId, + @HeaderParam("Content-Length") long contentLength, @BodyParam("application/octet-stream") BinaryData body, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=block") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - ResponseBase stageBlockFromURLSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("blockid") String blockId, + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> stageBlockFromUrl(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @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("x-ms-file-request-intent") FileShareTokenIntent fileRequestIntent, - @HeaderParam("x-ms-source-encryption-key") String sourceEncryptionKey, - @HeaderParam("x-ms-source-encryption-key-sha256") String sourceEncryptionKeySha256, - @HeaderParam("x-ms-source-encryption-algorithm") EncryptionAlgorithmType sourceEncryptionAlgorithm, - @HeaderParam("Accept") String accept, Context context); + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=block") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - Response stageBlockFromURLNoCustomHeadersSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @PathParam("blob") String blob, - @QueryParam("comp") String comp, @QueryParam("blockid") String blockId, + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response stageBlockFromUrlSync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @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("x-ms-file-request-intent") FileShareTokenIntent fileRequestIntent, - @HeaderParam("x-ms-source-encryption-key") String sourceEncryptionKey, - @HeaderParam("x-ms-source-encryption-key-sha256") String sourceEncryptionKeySha256, - @HeaderParam("x-ms-source-encryption-algorithm") EncryptionAlgorithmType sourceEncryptionAlgorithm, - @HeaderParam("Accept") String accept, Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=blocklist") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> commitBlockList(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/xml") BinaryData blocks, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=blocklist") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response commitBlockListSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/xml") BinaryData blocks, + RequestOptions requestOptions, Context context); - @Get("/{containerName}/{blob}") + @Get("?comp=blocklist") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> getBlockList(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @QueryParam("blocklisttype") String listType, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Get("/{containerName}/{blob}") + @Get("?comp=blocklist") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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> 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, - String structuredBodyType, Long structuredContentLength, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return FluxUtil - .withContext(context -> uploadWithResponseAsync(containerName, blob, contentLength, body, timeout, - transactionalContentMD5, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, - legalHold, transactionalContentCrc64, structuredBodyType, structuredContentLength, blobHttpHeaders, - cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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> 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, - String structuredBodyType, Long structuredContentLength, 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 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, structuredBodyType, - structuredContentLength, body, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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 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, - String structuredBodyType, Long structuredContentLength, 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, - structuredBodyType, structuredContentLength, blobHttpHeaders, cpkInfo, encryptionScopeParam) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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 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, - String structuredBodyType, Long structuredContentLength, 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, - structuredBodyType, structuredContentLength, blobHttpHeaders, cpkInfo, encryptionScopeParam, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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> 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, - String structuredBodyType, Long structuredContentLength, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return FluxUtil - .withContext(context -> uploadNoCustomHeadersWithResponseAsync(containerName, blob, contentLength, body, - timeout, transactionalContentMD5, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, - legalHold, transactionalContentCrc64, structuredBodyType, structuredContentLength, blobHttpHeaders, - cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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. + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response getBlockListSync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @QueryParam("blocklisttype") String listType, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + } + + /** + * Uploads the content to the specified block blob. If the blob already exists, the data and any existing metadata + * will be overwritten. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-access-tierStringNoThe tier to be set on the blob. Allowed values: "P4", + * "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", + * "Smart".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-tagsStringNoThe blob tags.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-structured-bodyStringNoRequired if the request body is a structured + * message. Specifies the message schema version and properties.
x-ms-structured-content-lengthLongNoRequired if the request body is a + * structured message. Specifies the length of the blob/file content inside the message body. Will always be smaller + * than Content-Length.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-structured-bodyStringIndicates if the response body contains a structured message + * and specifies the message schema version and properties.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
* - * @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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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, - String structuredBodyType, Long structuredContentLength, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, Context context) { + public Mono> uploadWithResponseInternalAsync(long contentLength, BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/octet-stream"; 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 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, structuredBodyType, structuredContentLength, body, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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> 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, - String structuredBodyType, Long structuredContentLength, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { return FluxUtil - .withContext(context -> uploadWithResponseAsync(containerName, blob, contentLength, body, timeout, - transactionalContentMD5, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, - legalHold, transactionalContentCrc64, structuredBodyType, structuredContentLength, blobHttpHeaders, - cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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. + .withContext(context -> service.upload(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + contentType, contentLength, blobType, body, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Uploads the content to the specified block blob. If the blob already exists, the data and any existing metadata + * will be overwritten. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-access-tierStringNoThe tier to be set on the blob. Allowed values: "P4", + * "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", + * "Smart".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-tagsStringNoThe blob tags.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-structured-bodyStringNoRequired if the request body is a structured + * message. Specifies the message schema version and properties.
x-ms-structured-content-lengthLongNoRequired if the request body is a + * structured message. Specifies the length of the blob/file content inside the message body. Will always be smaller + * than Content-Length.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-structured-bodyStringIndicates if the response body contains a structured message + * and specifies the message schema version and properties.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
* - * @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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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}. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @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, - String structuredBodyType, Long structuredContentLength, 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(); + public Response uploadWithResponseInternal(long contentLength, BinaryData body, + RequestOptions requestOptions) { + try { + final String contentType = "application/octet-stream"; + final String blobType = "BlockBlob"; + return service.uploadSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), contentType, + contentLength, blobType, body, requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); } - 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); - 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, structuredBodyType, - structuredContentLength, body, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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 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, - String structuredBodyType, Long structuredContentLength, 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, - structuredBodyType, structuredContentLength, blobHttpHeaders, cpkInfo, encryptionScopeParam) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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 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, - String structuredBodyType, Long structuredContentLength, 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, - structuredBodyType, structuredContentLength, blobHttpHeaders, cpkInfo, encryptionScopeParam, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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> 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, - String structuredBodyType, Long structuredContentLength, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return FluxUtil - .withContext(context -> uploadNoCustomHeadersWithResponseAsync(containerName, blob, contentLength, body, - timeout, transactionalContentMD5, metadata, leaseId, tier, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, - legalHold, transactionalContentCrc64, structuredBodyType, structuredContentLength, blobHttpHeaders, - cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Uploads the content from the specified URL to the block blob. If the blob already exists, the data and any + * existing metadata will be overwritten. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-access-tierStringNoThe tier to be set on the blob. Allowed values: "P4", + * "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", + * "Smart".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
x-ms-source-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to + * operate only on a source blob with matching tags.
x-ms-source-content-md5byte[]NoSpecifies the MD5 hash calculated for the range + * of bytes that must be read from the copy source.
x-ms-tagsStringNoThe blob tags.
x-ms-copy-source-blob-propertiesBooleanNoIndicates if properties from the + * source blob should be copied. Default is true.
x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is + * supported, and the value must be a valid OAuth access token for the copy source.
x-ms-copy-source-tag-optionStringNoIndicates if source tags should be copied + * or replaced with the tags specified. Default is 'Replace'. Allowed values: "REPLACE", "COPY".
x-ms-file-request-intentStringNoSpecifies the file request token intent. + * Allowed values: "backup".
x-ms-source-encryption-keyStringNoSpecifies the encryption key to use to + * decrypt the source data provided in the request.
x-ms-source-encryption-key-sha256StringNoThe SHA-256 hash of the provided + * source encryption key. Must be provided if the source encryption key is provided.
x-ms-source-encryption-algorithmStringNoThe algorithm used to produce the + * source encryption key hash. Must be provided if the source encryption key is provided. Allowed values: + * "AES256".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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, - String structuredBodyType, Long structuredContentLength, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, Context context) { + public Mono> uploadBlobFromUrlWithResponseInternalAsync(String copySource, + RequestOptions requestOptions) { + final int contentLength = 0; 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 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, structuredBodyType, structuredContentLength, body, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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}. + return FluxUtil + .withContext( + context -> service.uploadBlobFromUrl(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + copySource, contentLength, blobType, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Uploads the content from the specified URL to the block blob. If the blob already exists, the data and any + * existing metadata will be overwritten. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-access-tierStringNoThe tier to be set on the blob. Allowed values: "P4", + * "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", + * "Smart".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
x-ms-source-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to + * operate only on a source blob with matching tags.
x-ms-source-content-md5byte[]NoSpecifies the MD5 hash calculated for the range + * of bytes that must be read from the copy source.
x-ms-tagsStringNoThe blob tags.
x-ms-copy-source-blob-propertiesBooleanNoIndicates if properties from the + * source blob should be copied. Default is true.
x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is + * supported, and the value must be a valid OAuth access token for the copy source.
x-ms-copy-source-tag-optionStringNoIndicates if source tags should be copied + * or replaced with the tags specified. Default is 'Replace'. Allowed values: "REPLACE", "COPY".
x-ms-file-request-intentStringNoSpecifies the file request token intent. + * Allowed values: "backup".
x-ms-source-encryption-keyStringNoSpecifies the encryption key to use to + * decrypt the source data provided in the request.
x-ms-source-encryption-key-sha256StringNoThe SHA-256 hash of the provided + * source encryption key. Must be provided if the source encryption key is provided.
x-ms-source-encryption-algorithmStringNoThe algorithm used to produce the + * source encryption key hash. Must be provided if the source encryption key is provided. Allowed values: + * "AES256".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - 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, - String structuredBodyType, Long structuredContentLength, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, Context context) { + public Response uploadBlobFromUrlWithResponseInternal(String copySource, RequestOptions requestOptions) { try { + final int contentLength = 0; 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 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, structuredBodyType, structuredContentLength, body, accept, context); - } catch (BlobStorageExceptionInternal internalException) { + return service.uploadBlobFromUrlSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + copySource, contentLength, blobType, requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } } /** - * 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. + * Creates a new block of data to be committed as part of a blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-structured-bodyStringNoRequired if the request body is a structured + * message. Specifies the message schema version and properties.
x-ms-structured-content-lengthLongNoRequired if the request body is a + * structured message. Specifies the length of the blob/file content inside the message body. Will always be smaller + * than Content-Length.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-structured-bodyStringIndicates if the response body contains a structured message + * and specifies the message schema version and properties.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param blockId A Base64 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 timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. */ @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, - String structuredBodyType, Long structuredContentLength, 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, structuredBodyType, - structuredContentLength, 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. + public Mono> stageBlockWithResponseInternalAsync(String blockId, long contentLength, BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/octet-stream"; + return FluxUtil + .withContext( + context -> service.stageBlock(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + contentType, blockId, contentLength, body, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Creates a new block of data to be committed as part of a blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-structured-bodyStringNoRequired if the request body is a structured + * message. Specifies the message schema version and properties.
x-ms-structured-content-lengthLongNoRequired if the request body is a + * structured message. Specifies the length of the blob/file content inside the message body. Will always be smaller + * than Content-Length.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-structured-bodyStringIndicates if the response body contains a structured message + * and specifies the message schema version and properties.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param blockId A Base64 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 timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - 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, String structuredBodyType, Long structuredContentLength, - BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { + public Response stageBlockWithResponseInternal(String blockId, long contentLength, BinaryData body, + RequestOptions requestOptions) { try { - 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 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, structuredBodyType, structuredContentLength, body, accept, context); - } catch (BlobStorageExceptionInternal internalException) { + final String contentType = "application/octet-stream"; + return service.stageBlockSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + contentType, blockId, contentLength, body, requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } } /** - * 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. + * Creates a new block of data from the specified URL to be committed as part of a blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-source-rangeStringNoSpecifies the bytes of the source.
x-ms-source-content-md5byte[]NoSpecifies the MD5 hash calculated for the range + * of bytes that must be read from the copy source.
x-ms-source-content-crc64byte[]NoSpecifies the CRC64 calculated for the range + * of bytes that must be read from the source.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is + * supported, and the value must be a valid OAuth access token for the copy source.
x-ms-file-request-intentStringNoSpecifies the file request token intent. + * Allowed values: "backup".
x-ms-source-encryption-keyStringNoSpecifies the encryption key to use to + * decrypt the source data provided in the request.
x-ms-source-encryption-key-sha256StringNoThe SHA-256 hash of the provided + * source encryption key. Must be provided if the source encryption key is provided.
x-ms-source-encryption-algorithmStringNoThe algorithm used to produce the + * source encryption key hash. Must be provided if the source encryption key is provided. Allowed values: + * "AES256".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param blockId A Base64 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 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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}. + * @param sourceUrl Specifies the URL of the source. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. */ @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, FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, - String sourceEncryptionKeySha256, EncryptionAlgorithmType sourceEncryptionAlgorithm, - BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { - return FluxUtil.withContext(context -> 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, fileRequestIntent, sourceEncryptionKey, sourceEncryptionKeySha256, - sourceEncryptionAlgorithm, blobHttpHeaders, cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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. + public Mono> stageBlockFromUrlWithResponseInternalAsync(String blockId, long contentLength, + String sourceUrl, RequestOptions requestOptions) { + return FluxUtil + .withContext( + context -> service.stageBlockFromUrl(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + blockId, contentLength, sourceUrl, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Creates a new block of data from the specified URL to be committed as part of a blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-source-rangeStringNoSpecifies the bytes of the source.
x-ms-source-content-md5byte[]NoSpecifies the MD5 hash calculated for the range + * of bytes that must be read from the copy source.
x-ms-source-content-crc64byte[]NoSpecifies the CRC64 calculated for the range + * of bytes that must be read from the source.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is + * supported, and the value must be a valid OAuth access token for the copy source.
x-ms-file-request-intentStringNoSpecifies the file request token intent. + * Allowed values: "backup".
x-ms-source-encryption-keyStringNoSpecifies the encryption key to use to + * decrypt the source data provided in the request.
x-ms-source-encryption-key-sha256StringNoThe SHA-256 hash of the provided + * source encryption key. Must be provided if the source encryption key is provided.
x-ms-source-encryption-algorithmStringNoThe algorithm used to produce the + * source encryption key hash. Must be provided if the source encryption key is provided. Allowed values: + * "AES256".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param blockId A Base64 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 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @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 BlobStorageExceptionInternal 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}. + * @param sourceUrl Specifies the URL of the source. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @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, FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, - String sourceEncryptionKeySha256, EncryptionAlgorithmType sourceEncryptionAlgorithm, - 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(); + public Response stageBlockFromUrlWithResponseInternal(String blockId, long contentLength, String sourceUrl, + RequestOptions requestOptions) { + try { + return service.stageBlockFromUrlSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + blockId, contentLength, sourceUrl, requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); } - 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, fileRequestIntent, - sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, - String sourceEncryptionKeySha256, EncryptionAlgorithmType sourceEncryptionAlgorithm, - 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, fileRequestIntent, sourceEncryptionKey, sourceEncryptionKeySha256, - sourceEncryptionAlgorithm, blobHttpHeaders, cpkInfo, encryptionScopeParam) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @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 BlobStorageExceptionInternal 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, FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, - String sourceEncryptionKeySha256, EncryptionAlgorithmType sourceEncryptionAlgorithm, - 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, fileRequestIntent, sourceEncryptionKey, sourceEncryptionKeySha256, - sourceEncryptionAlgorithm, blobHttpHeaders, cpkInfo, encryptionScopeParam, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Writes to the block blob by specifying the list of block IDs that make up the blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-access-tierStringNoThe tier to be set on the blob. Allowed values: "P4", + * "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", + * "Smart".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-tagsStringNoThe blob tags.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     Committed (Optional): [
+     *         String (Optional)
+     *     ]
+     *     Uncommitted (Optional): [
+     *         String (Optional)
+     *     ]
+     *     Latest (Optional): [
+     *         String (Optional)
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param blocks Blob blocks. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> commitBlockListWithResponseInternalAsync(BinaryData blocks, + RequestOptions requestOptions) { + final String contentType = "application/xml"; return FluxUtil - .withContext(context -> putBlobFromUrlNoCustomHeadersWithResponseAsync(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, fileRequestIntent, - sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, blobHttpHeaders, cpkInfo, - encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @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 BlobStorageExceptionInternal 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, 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, fileRequestIntent, - sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @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 BlobStorageExceptionInternal 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}. + .withContext(context -> service.commitBlockList(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), contentType, blocks, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Writes to the block blob by specifying the list of block IDs that make up the blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-access-tierStringNoThe tier to be set on the blob. Allowed values: "P4", + * "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80", "Hot", "Cool", "Archive", "Premium", "Cold", + * "Smart".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-tagsStringNoThe blob tags.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     Committed (Optional): [
+     *         String (Optional)
+     *     ]
+     *     Uncommitted (Optional): [
+     *         String (Optional)
+     *     ]
+     *     Latest (Optional): [
+     *         String (Optional)
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param blocks Blob blocks. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, Context context) { + public Response commitBlockListWithResponseInternal(BinaryData blocks, RequestOptions requestOptions) { try { - 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, fileRequestIntent, - sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, accept, context); - } catch (BlobStorageExceptionInternal internalException) { + final String contentType = "application/xml"; + return service.commitBlockListSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + contentType, blocks, requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } } /** - * 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. + * Retrieves the list of blocks that have been uploaded as part of the block blob. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     CommittedBlocks (Optional): [
+     *          (Optional){
+     *             Name: String (Required)
+     *             Size: long (Required)
+     *         }
+     *     ]
+     *     UncommittedBlocks (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
ETagStringAn opaque identifier for the current state of the resource.
x-ms-blob-content-lengthlongThe size of the blob in bytes.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
* - * @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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @param blobHttpHeaders Parameter group. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both + * lists together. Allowed values: "committed", "uncommitted", "all". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return contains the committed and uncommitted blocks in a block blob along with {@link Response} on successful + * completion of {@link Mono}. */ @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, FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, - String sourceEncryptionKeySha256, EncryptionAlgorithmType sourceEncryptionAlgorithm, - 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, - fileRequestIntent, sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, - 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @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 BlobStorageExceptionInternal 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, BlobHttpHeaders blobHttpHeaders, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, Context context) { - try { - 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, fileRequestIntent, - sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, 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 - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, String structuredBodyType, - Long structuredContentLength, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { - return FluxUtil - .withContext(context -> stageBlockWithResponseAsync(containerName, blob, blockId, contentLength, body, - transactionalContentMD5, transactionalContentCrc64, timeout, leaseId, requestId, structuredBodyType, - structuredContentLength, cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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, String structuredBodyType, - Long structuredContentLength, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { - final String comp = "block"; + public Mono> getBlockListWithResponseInternalAsync(String listType, + RequestOptions requestOptions) { 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, - structuredBodyType, structuredContentLength, body, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return stageBlockWithResponseAsync(containerName, blob, blockId, contentLength, body, transactionalContentMD5, - transactionalContentCrc64, timeout, leaseId, requestId, structuredBodyType, structuredContentLength, - cpkInfo, encryptionScopeParam) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, Context context) { - return stageBlockWithResponseAsync(containerName, blob, blockId, contentLength, body, transactionalContentMD5, - transactionalContentCrc64, timeout, leaseId, requestId, structuredBodyType, structuredContentLength, - cpkInfo, encryptionScopeParam, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, String structuredBodyType, - Long structuredContentLength, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { return FluxUtil - .withContext(context -> stageBlockNoCustomHeadersWithResponseAsync(containerName, blob, blockId, - contentLength, body, transactionalContentMD5, transactionalContentCrc64, timeout, leaseId, requestId, - structuredBodyType, structuredContentLength, cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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, String structuredBodyType, - Long structuredContentLength, 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, - structuredBodyType, structuredContentLength, body, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, String structuredBodyType, - Long structuredContentLength, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { - return FluxUtil - .withContext(context -> stageBlockWithResponseAsync(containerName, blob, blockId, contentLength, body, - transactionalContentMD5, transactionalContentCrc64, timeout, leaseId, requestId, structuredBodyType, - structuredContentLength, cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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, String structuredBodyType, - Long structuredContentLength, 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, - structuredBodyType, structuredContentLength, body, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return stageBlockWithResponseAsync(containerName, blob, blockId, contentLength, body, transactionalContentMD5, - transactionalContentCrc64, timeout, leaseId, requestId, structuredBodyType, structuredContentLength, - cpkInfo, encryptionScopeParam) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, Context context) { - return stageBlockWithResponseAsync(containerName, blob, blockId, contentLength, body, transactionalContentMD5, - transactionalContentCrc64, timeout, leaseId, requestId, structuredBodyType, structuredContentLength, - cpkInfo, encryptionScopeParam, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, String structuredBodyType, - Long structuredContentLength, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { - return FluxUtil - .withContext(context -> stageBlockNoCustomHeadersWithResponseAsync(containerName, blob, blockId, - contentLength, body, transactionalContentMD5, transactionalContentCrc64, timeout, leaseId, requestId, - structuredBodyType, structuredContentLength, cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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, String structuredBodyType, - Long structuredContentLength, 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, - structuredBodyType, structuredContentLength, body, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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 stageBlockWithResponse(String containerName, String blob, - String blockId, long contentLength, BinaryData body, byte[] transactionalContentMD5, - byte[] transactionalContentCrc64, Integer timeout, String leaseId, String requestId, String structuredBodyType, - Long structuredContentLength, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { - try { - 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.stageBlockSync(this.client.getUrl(), containerName, blob, comp, blockId, contentLength, - transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, leaseId, encryptionKey, - encryptionKeySha256, encryptionAlgorithm, encryptionScope, this.client.getVersion(), requestId, - structuredBodyType, structuredContentLength, 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 - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - stageBlockWithResponse(containerName, blob, blockId, contentLength, body, transactionalContentMD5, - transactionalContentCrc64, timeout, leaseId, requestId, structuredBodyType, structuredContentLength, - 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. - * @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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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 stageBlockNoCustomHeadersWithResponse(String containerName, String blob, String blockId, - long contentLength, BinaryData body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, - Integer timeout, String leaseId, String requestId, String structuredBodyType, Long structuredContentLength, - CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { - try { - 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.stageBlockNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, blockId, - contentLength, transactionalContentMD5Converted, transactionalContentCrc64Converted, timeout, leaseId, - encryptionKey, encryptionKeySha256, encryptionAlgorithm, encryptionScope, this.client.getVersion(), - requestId, structuredBodyType, structuredContentLength, 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 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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> 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { - return FluxUtil - .withContext(context -> stageBlockFromURLWithResponseAsync(containerName, blob, blockId, contentLength, - sourceUrl, sourceRange, sourceContentMD5, sourceContentcrc64, timeout, leaseId, sourceIfModifiedSince, - sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, - fileRequestIntent, sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, cpkInfo, - encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @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 BlobStorageExceptionInternal 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> 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, 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, fileRequestIntent, sourceEncryptionKey, sourceEncryptionKeySha256, - sourceEncryptionAlgorithm, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { - return stageBlockFromURLWithResponseAsync(containerName, blob, blockId, contentLength, sourceUrl, sourceRange, - sourceContentMD5, sourceContentcrc64, timeout, leaseId, sourceIfModifiedSince, sourceIfUnmodifiedSince, - sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, fileRequestIntent, - sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, cpkInfo, encryptionScopeParam) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @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 BlobStorageExceptionInternal 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, - Context context) { - return stageBlockFromURLWithResponseAsync(containerName, blob, blockId, contentLength, sourceUrl, sourceRange, - sourceContentMD5, sourceContentcrc64, timeout, leaseId, sourceIfModifiedSince, sourceIfUnmodifiedSince, - sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, fileRequestIntent, - sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, cpkInfo, encryptionScopeParam, - context).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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> 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, FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, - String sourceEncryptionKeySha256, EncryptionAlgorithmType sourceEncryptionAlgorithm, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return FluxUtil - .withContext(context -> stageBlockFromURLNoCustomHeadersWithResponseAsync(containerName, blob, blockId, - contentLength, sourceUrl, sourceRange, sourceContentMD5, sourceContentcrc64, timeout, leaseId, - sourceIfModifiedSince, sourceIfUnmodifiedSince, sourceIfMatch, sourceIfNoneMatch, requestId, - copySourceAuthorization, fileRequestIntent, sourceEncryptionKey, sourceEncryptionKeySha256, - sourceEncryptionAlgorithm, cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @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 BlobStorageExceptionInternal 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> 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, FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, - String sourceEncryptionKeySha256, EncryptionAlgorithmType sourceEncryptionAlgorithm, 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 - .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, fileRequestIntent, sourceEncryptionKey, sourceEncryptionKeySha256, - sourceEncryptionAlgorithm, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @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 BlobStorageExceptionInternal 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 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, FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, - String sourceEncryptionKeySha256, EncryptionAlgorithmType sourceEncryptionAlgorithm, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, Context context) { - try { - 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.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, fileRequestIntent, sourceEncryptionKey, - sourceEncryptionKeySha256, sourceEncryptionAlgorithm, 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 - * 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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { - stageBlockFromURLWithResponse(containerName, blob, blockId, contentLength, sourceUrl, sourceRange, - sourceContentMD5, sourceContentcrc64, timeout, leaseId, sourceIfModifiedSince, sourceIfUnmodifiedSince, - sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, fileRequestIntent, - sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, 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. - * @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://learn.microsoft.com/rest/api/storageservices/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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @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 BlobStorageExceptionInternal 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 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, FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, - String sourceEncryptionKeySha256, EncryptionAlgorithmType sourceEncryptionAlgorithm, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, Context context) { - try { - 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, fileRequestIntent, sourceEncryptionKey, - sourceEncryptionKeySha256, sourceEncryptionAlgorithm, accept, context); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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) { - return FluxUtil - .withContext(context -> commitBlockListWithResponseAsync(containerName, blob, blocks, timeout, - transactionalContentMD5, transactionalContentCrc64, metadata, leaseId, tier, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, - immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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(); - } - 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); - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> commitBlockListNoCustomHeadersWithResponseAsync(containerName, blob, blocks, - timeout, transactionalContentMD5, transactionalContentCrc64, metadata, leaseId, tier, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, blobTagsString, immutabilityPolicyExpiry, - immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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(); - } - 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); - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) { - try { - 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(); - } - 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); - 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.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); - } - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) { - try { - 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(); - } - 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); - 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.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); - } - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getBlockListWithResponseAsync( - String containerName, String blob, BlockListType listType, String snapshot, Integer timeout, String leaseId, - String ifTags, String requestId) { - return FluxUtil - .withContext(context -> getBlockListWithResponseAsync(containerName, blob, listType, snapshot, timeout, - leaseId, ifTags, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @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) { - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Context context) { - return getBlockListWithResponseAsync(containerName, blob, listType, snapshot, timeout, leaseId, ifTags, - requestId, context).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> getBlockListNoCustomHeadersWithResponseAsync(containerName, blob, listType, - snapshot, timeout, leaseId, ifTags, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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 - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - 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. + .withContext(context -> service.getBlockList(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), listType, accept, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Retrieves the list of blocks that have been uploaded as part of the block blob. + *

Query Parameters

+ * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     CommittedBlocks (Optional): [
+     *          (Optional){
+     *             Name: String (Required)
+     *             Size: long (Required)
+     *         }
+     *     ]
+     *     UncommittedBlocks (Optional): [
+     *         (recursive schema, see above)
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
ETagStringAn opaque identifier for the current state of the resource.
x-ms-blob-content-lengthlongThe size of the blob in bytes.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
* - * @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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + * lists together. Allowed values: "committed", "uncommitted", "all". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return contains the committed and uncommitted blocks in a block blob 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) { + public Response getBlockListWithResponseInternal(String listType, RequestOptions requestOptions) { try { - 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); - } catch (BlobStorageExceptionInternal internalException) { + return service.getBlockListSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + listType, accept, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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 a51d83a5d8762..2fe0e26208a57 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation; import com.azure.core.annotation.BodyParam; @@ -10,7 +10,6 @@ import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; @@ -18,55 +17,16 @@ import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.ResponseBase; import com.azure.core.http.rest.RestProxy; -import com.azure.core.http.rest.StreamResponse; import com.azure.core.util.BinaryData; 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.BlobStorageExceptionInternal; -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.ContainersCreateHeaders; -import com.azure.storage.blob.implementation.models.ContainersDeleteHeaders; -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.ContainersListBlobFlatSegmentApacheArrowHeaders; -import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentHeaders; -import com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentApacheArrowHeaders; -import com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentHeaders; -import com.azure.storage.blob.implementation.models.ContainersReleaseLeaseHeaders; -import com.azure.storage.blob.implementation.models.ContainersRenameHeaders; -import com.azure.storage.blob.implementation.models.ContainersRenewLeaseHeaders; -import com.azure.storage.blob.implementation.models.ContainersRestoreHeaders; -import com.azure.storage.blob.implementation.models.ContainersSetAccessPolicyHeaders; -import com.azure.storage.blob.implementation.models.ContainersSetMetadataHeaders; -import com.azure.storage.blob.implementation.models.ContainersSubmitBatchHeaders; -import com.azure.storage.blob.implementation.models.CreateSessionConfiguration; -import com.azure.storage.blob.implementation.models.CreateSessionResponse; -import com.azure.storage.blob.implementation.models.FilterBlobSegment; -import com.azure.storage.blob.implementation.models.FilterBlobsIncludeItem; -import com.azure.storage.blob.implementation.models.ListBlobsFlatSegmentResponse; -import com.azure.storage.blob.implementation.models.ListBlobsHierarchySegmentResponse; +import com.azure.storage.blob.BlobServiceVersion; +import com.azure.storage.blob.implementation.models.BlobStorageErrorException; import com.azure.storage.blob.implementation.util.ModelHelper; -import com.azure.storage.blob.models.BlobContainerEncryptionScope; -import com.azure.storage.blob.models.BlobSignedIdentifier; -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; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Collectors; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -95,6 +55,19 @@ public final class ContainersImpl { this.client = client; } + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public BlobServiceVersion getServiceVersion() { + try { + return client.getServiceVersion(); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } + } + /** * The interface defining all the services for AzureBlobStorageContainers to be used by the proxy service to perform * REST calls. @@ -103,7736 +76,3153 @@ public final class ContainersImpl { @ServiceInterface(name = "AzureBlobStorageContainers") public interface ContainersService { - @Put("/{containerName}") + @Put("?restype=container") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> create(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Put("/{containerName}") + @Put("?restype=container") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.class) - 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 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response createSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Get("/{containerName}") + @Get("?restype=container") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> getProperties(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Get("/{containerName}") + @Get("?restype=container") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response getPropertiesSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Delete("/{containerName}") + @Delete("?restype=container") @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> delete(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Delete("/{containerName}") + @Delete("?restype=container") @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); - - @Delete("/{containerName}") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response deleteSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Get("/{containerName}") + @Put("?restype=container&comp=metadata") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> setMetadata(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Get("/{containerName}") + @Put("?restype=container&comp=metadata") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response setMetadataSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Put("/{containerName}") + @Get("?restype=container&comp=acl") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> getAccessPolicy(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); - @Put("/{containerName}") + @Get("?restype=container&comp=acl") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response getAccessPolicySync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); - @Put("/{containerName}") + @Put("?restype=container&comp=acl") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> setAccessPolicy(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, RequestOptions requestOptions, Context context); - @Put("/{containerName}") + @Put("?restype=container&comp=acl") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response setAccessPolicySync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Put("/{containerName}") + @Put("?restype=container&comp=undelete") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> restore(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Put("/{containerName}") + @Put("?restype=container&comp=undelete") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); - - @Put("/{containerName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response restoreSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Put("/{containerName}") + @Put("?restype=container&comp=rename") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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, + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> rename(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-source-container-name") String sourceContainerName, RequestOptions requestOptions, Context context); - @Put("/{containerName}") + @Put("?restype=container&comp=rename") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response renameSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-source-container-name") String sourceContainerName, RequestOptions requestOptions, Context context); - @Post("/{containerName}") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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); - - @Post("/{containerName}") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @Post("?restype=container&comp=session") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> createSession(@HostParam("url") String url, + @HeaderParam("Content-Type") String contentType, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Accept") String accept, @BodyParam("application/xml") BinaryData createSessionConfiguration, + RequestOptions requestOptions, Context context); - @Post("/{containerName}") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @Post("?restype=container&comp=session") + @ExpectedResponses({ 201 }) + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response createSessionSync(@HostParam("url") String url, + @HeaderParam("Content-Type") String contentType, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Accept") String accept, @BodyParam("application/xml") BinaryData createSessionConfiguration, + RequestOptions requestOptions, Context context); - @Post("/{containerName}") + @Post("?restype=container&comp=batch") @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> submitBatch(@HostParam("url") String url, + @HeaderParam("Content-Type") String contentType, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("Accept") String accept, + @BodyParam("multipart/mixed") BinaryData body, RequestOptions requestOptions, Context context); - @Post("/{containerName}") + @Post("?restype=container&comp=batch") @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response submitBatchSync(@HostParam("url") String url, + @HeaderParam("Content-Type") String contentType, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("Accept") String accept, + @BodyParam("multipart/mixed") BinaryData body, RequestOptions requestOptions, Context context); - @Get("/{containerName}") + @Get("?restype=container&comp=blobs") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> filterBlobs(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @QueryParam("where") String filterExpression, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Get("/{containerName}") + @Get("?restype=container&comp=blobs") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response filterBlobsSync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @QueryParam("where") String filterExpression, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Put("/{containerName}") + @Put("?comp=lease&restype=container") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> acquireLease(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-lease-duration") int duration, @HeaderParam("x-ms-lease-action") String action, + RequestOptions requestOptions, Context context); - @Put("/{containerName}") + @Put("?comp=lease&restype=container") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); - - @Put("/{containerName}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); - - @Put("/{containerName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response acquireLeaseSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-lease-duration") int duration, @HeaderParam("x-ms-lease-action") String action, + RequestOptions requestOptions, Context context); - @Put("/{containerName}") + @Put("?comp=lease&restype=container") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> releaseLease(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-lease-action") String action, + RequestOptions requestOptions, Context context); - @Put("/{containerName}") + @Put("?comp=lease&restype=container") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response releaseLeaseSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-lease-action") String action, + RequestOptions requestOptions, Context context); - @Put("/{containerName}") + @Put("?comp=lease&restype=container") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> renewLease(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-lease-action") String action, + RequestOptions requestOptions, Context context); - @Put("/{containerName}") + @Put("?comp=lease&restype=container") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response renewLeaseSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-lease-action") String action, + RequestOptions requestOptions, Context context); - @Put("/{containerName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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}") + @Put("?comp=lease&restype=container") @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> breakLease(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-lease-action") String action, RequestOptions requestOptions, Context context); - @Put("/{containerName}") + @Put("?comp=lease&restype=container") @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("startFrom") String startFrom, - @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(BlobStorageExceptionInternal.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("startFrom") String startFrom, @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(BlobStorageExceptionInternal.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("startFrom") String startFrom, - @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(BlobStorageExceptionInternal.class) - 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("startFrom") String startFrom, @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(BlobStorageExceptionInternal.class) - Mono>> - listBlobFlatSegmentApacheArrow(@HostParam("url") String url, - @PathParam("containerName") String containerName, @QueryParam("restype") String restype, - @QueryParam("comp") String comp, @HeaderParam("Accept") String accept, - @QueryParam("prefix") String prefix, @QueryParam("marker") String marker, - @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, - @QueryParam("timeout") Integer timeout, @QueryParam("startFrom") String startFrom, - @QueryParam("endBefore") String endBefore, @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, Context context); - - @Get("/{containerName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - Mono listBlobFlatSegmentApacheArrowNoCustomHeaders(@HostParam("url") String url, - @PathParam("containerName") String containerName, @QueryParam("restype") String restype, - @QueryParam("comp") String comp, @HeaderParam("Accept") String accept, @QueryParam("prefix") String prefix, - @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, - @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, - @QueryParam("startFrom") String startFrom, @QueryParam("endBefore") String endBefore, - @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, - Context context); - - @Get("/{containerName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - ResponseBase listBlobFlatSegmentApacheArrowSync( - @HostParam("url") String url, @PathParam("containerName") String containerName, - @QueryParam("restype") String restype, @QueryParam("comp") String comp, - @HeaderParam("Accept") String accept, @QueryParam("prefix") String prefix, - @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, - @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, - @QueryParam("startFrom") String startFrom, @QueryParam("endBefore") String endBefore, - @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, - Context context); - - @Get("/{containerName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - Response listBlobFlatSegmentApacheArrowNoCustomHeadersSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @QueryParam("restype") String restype, - @QueryParam("comp") String comp, @HeaderParam("Accept") String accept, @QueryParam("prefix") String prefix, - @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, - @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, - @QueryParam("startFrom") String startFrom, @QueryParam("endBefore") String endBefore, - @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, - Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response breakLeaseSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-lease-action") String action, RequestOptions requestOptions, Context context); - @Get("/{containerName}") + @Put("?comp=lease&restype=container") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("startFrom") String startFrom, - @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, - Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> changeLease(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, + @HeaderParam("x-ms-lease-action") String action, RequestOptions requestOptions, Context context); - @Get("/{containerName}") + @Put("?comp=lease&restype=container") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("startFrom") String startFrom, @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response changeLeaseSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-lease-id") String leaseId, @HeaderParam("x-ms-proposed-lease-id") String proposedLeaseId, + @HeaderParam("x-ms-lease-action") String action, RequestOptions requestOptions, Context context); - @Get("/{containerName}") + @Get("?restype=container&comp=list") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("startFrom") String startFrom, - @QueryParam("timeout") Integer timeout, @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, @HeaderParam("Accept") String accept, - Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> listBlobFlatSegment(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); - @Get("/{containerName}") + @Get("?restype=container&comp=list") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("startFrom") String startFrom, @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response listBlobFlatSegmentSync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); - @Get("/{containerName}") + @Get("?restype=container&comp=list") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - Mono>> - listBlobHierarchySegmentApacheArrow(@HostParam("url") String url, - @PathParam("containerName") String containerName, @QueryParam("restype") String restype, - @QueryParam("comp") String comp, @HeaderParam("Accept") String accept, - @QueryParam("prefix") String prefix, @QueryParam("delimiter") String delimiter, - @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, - @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, - @QueryParam("startFrom") String startFrom, @QueryParam("endBefore") String endBefore, - @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, - Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> listBlobFlatSegmentApacheArrow(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("accept") String accept, + RequestOptions requestOptions, Context context); - @Get("/{containerName}") + @Get("?restype=container&comp=list") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - Mono listBlobHierarchySegmentApacheArrowNoCustomHeaders(@HostParam("url") String url, - @PathParam("containerName") String containerName, @QueryParam("restype") String restype, - @QueryParam("comp") String comp, @HeaderParam("Accept") String accept, @QueryParam("prefix") String prefix, - @QueryParam("delimiter") String delimiter, @QueryParam("marker") String marker, - @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, - @QueryParam("timeout") Integer timeout, @QueryParam("startFrom") String startFrom, - @QueryParam("endBefore") String endBefore, @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response listBlobFlatSegmentApacheArrowSync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("accept") String accept, + RequestOptions requestOptions, Context context); - @Get("/{containerName}") + @Get("?restype=container&comp=list") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - ResponseBase - listBlobHierarchySegmentApacheArrowSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @QueryParam("restype") String restype, - @QueryParam("comp") String comp, @HeaderParam("Accept") String accept, - @QueryParam("prefix") String prefix, @QueryParam("delimiter") String delimiter, - @QueryParam("marker") String marker, @QueryParam("maxresults") Integer maxresults, - @QueryParam("include") String include, @QueryParam("timeout") Integer timeout, - @QueryParam("startFrom") String startFrom, @QueryParam("endBefore") String endBefore, - @HeaderParam("x-ms-version") String version, @HeaderParam("x-ms-client-request-id") String requestId, - Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> listBlobHierarchySegment(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @QueryParam("delimiter") String delimiter, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Get("/{containerName}") + @Get("?restype=container&comp=list") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - Response listBlobHierarchySegmentApacheArrowNoCustomHeadersSync(@HostParam("url") String url, - @PathParam("containerName") String containerName, @QueryParam("restype") String restype, - @QueryParam("comp") String comp, @HeaderParam("Accept") String accept, @QueryParam("prefix") String prefix, - @QueryParam("delimiter") String delimiter, @QueryParam("marker") String marker, - @QueryParam("maxresults") Integer maxresults, @QueryParam("include") String include, - @QueryParam("timeout") Integer timeout, @QueryParam("startFrom") String startFrom, - @QueryParam("endBefore") String endBefore, @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response listBlobHierarchySegmentSync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @QueryParam("delimiter") String delimiter, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Get("/{containerName}") + @Get("?restype=container&comp=list") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> listBlobHierarchySegmentApacheArrow(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("accept") String accept, + @QueryParam("delimiter") String delimiter, RequestOptions requestOptions, Context context); - @Get("/{containerName}") + @Get("?restype=container&comp=list") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response listBlobHierarchySegmentApacheArrowSync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("accept") String accept, + @QueryParam("delimiter") String delimiter, RequestOptions requestOptions, Context context); - @Get("/{containerName}") + @Get("?restype=account&comp=properties") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - ResponseBase getAccountInfoSync(@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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> getAccountInfo(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, RequestOptions requestOptions, Context context); - @Get("/{containerName}") + @Get("?restype=account&comp=properties") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - Response getAccountInfoNoCustomHeadersSync(@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); - - @Post("/{containerName}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - Mono> createSession(@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, - @BodyParam("application/xml") CreateSessionConfiguration createSessionConfiguration, - @HeaderParam("Accept") String accept, Context context); - - @Post("/{containerName}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - Response createSessionSync(@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, - @BodyParam("application/xml") CreateSessionConfiguration createSessionConfiguration, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response getAccountInfoSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); } /** - * creates a new container under the specified account. If the container with the same name already exists, the + * Creates a new container in 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-blob-public-accessStringNoThe public access setting for the container. + * Allowed values: "blob", "container".
x-ms-default-encryption-scopeStringNoSpecifies the default encryption scope to + * set on the container and use for all future requests.
x-ms-deny-encryption-scope-overrideBooleanNoWhether to prevent encryption + * scope override.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} 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> createWithResponseInternalAsync(RequestOptions requestOptions) { return FluxUtil - .withContext(context -> createWithResponseAsync(containerName, timeout, metadata, access, requestId, - blobContainerEncryptionScope, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + .withContext(context -> service.create(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); } /** - * creates a new container under the specified account. If the container with the same name already exists, the + * Creates a new container in 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-blob-public-accessStringNoThe public access setting for the container. + * Allowed values: "blob", "container".
x-ms-default-encryption-scopeStringNoSpecifies the default encryption scope to + * set on the container and use for all future requests.
x-ms-deny-encryption-scope-overrideBooleanNoWhether to prevent encryption + * scope override.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - 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; - if (blobContainerEncryptionScope != null) { - defaultEncryptionScopeInternal = blobContainerEncryptionScope.getDefaultEncryptionScope(); - } - String defaultEncryptionScope = defaultEncryptionScopeInternal; - Boolean encryptionScopeOverridePreventedInternal = null; - if (blobContainerEncryptionScope != null) { - encryptionScopeOverridePreventedInternal - = blobContainerEncryptionScope.isEncryptionScopeOverridePrevented(); + public Response createWithResponseInternal(RequestOptions requestOptions) { + try { + return service.createSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); } - Boolean encryptionScopeOverridePrevented = encryptionScopeOverridePreventedInternal; - return service - .create(this.client.getUrl(), containerName, restype, timeout, metadata, access, this.client.getVersion(), - requestId, defaultEncryptionScope, encryptionScopeOverridePrevented, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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. + * Returns all user-defined metadata and system properties for the specified container. The data returned does not + * include the container's list of blobs. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-metaMap<String, String>The metadata headers.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-lease-durationStringSpecifies the duration of the lease.
x-ms-lease-stateStringThe lease state of the blob.
x-ms-lease-statusStringThe lease status of the blob.
x-ms-blob-public-accessStringThe public access setting for the container.
x-ms-has-immutability-policybooleanIndicates whether the container has an immutability + * policy set on it.
x-ms-has-legal-holdbooleanIndicates whether the container has a legal hold.
x-ms-default-encryption-scopeStringThe default encryption scope for the + * container.
x-ms-deny-encryption-scope-overridebooleanWhether to prevent encryption scope + * override.
x-ms-immutable-storage-with-versioning-enabledbooleanIndicates whether version level + * WORM (Write Once, Read Many) is enabled on a container.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. */ @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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); + public Mono> getPropertiesWithResponseInternalAsync(RequestOptions requestOptions) { + return FluxUtil + .withContext(context -> service.getProperties(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); } /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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. + * Returns all user-defined metadata and system properties for the specified container. The data returned does not + * include the container's list of blobs. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-metaMap<String, String>The metadata headers.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-lease-durationStringSpecifies the duration of the lease.
x-ms-lease-stateStringThe lease state of the blob.
x-ms-lease-statusStringThe lease status of the blob.
x-ms-blob-public-accessStringThe public access setting for the container.
x-ms-has-immutability-policybooleanIndicates whether the container has an immutability + * policy set on it.
x-ms-has-legal-holdbooleanIndicates whether the container has a legal hold.
x-ms-default-encryption-scopeStringThe default encryption scope for the + * container.
x-ms-deny-encryption-scope-overridebooleanWhether to prevent encryption scope + * override.
x-ms-immutable-storage-with-versioning-enabledbooleanIndicates whether version level + * WORM (Write Once, Read Many) is enabled on a container.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); + public Response getPropertiesWithResponseInternal(RequestOptions requestOptions) { + try { + return service.getPropertiesSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Deletes the specified container. + * + * When a container is deleted, a container with the same name can't be created for at least 30 seconds. The + * container might not be available for more than 30 seconds if the service is still processing the request. While + * the container is being deleted, attempts to create a container of the same name fail with status code 409 + * (Conflict). The service indicates that the container is being deleted. Operations on blobs within the container, + * including reads and writes, may continue to succeed for up to 30 seconds after the delete request is accepted. + * After this period, all operations on the container and its blobs fail with status code 404 (Not Found). + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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> deleteWithResponseInternalAsync(RequestOptions requestOptions) { return FluxUtil - .withContext(context -> createNoCustomHeadersWithResponseAsync(containerName, timeout, metadata, access, - requestId, blobContainerEncryptionScope, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + .withContext(context -> service.delete(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Deletes the specified container. + * + * When a container is deleted, a container with the same name can't be created for at least 30 seconds. The + * container might not be available for more than 30 seconds if the service is still processing the request. While + * the container is being deleted, attempts to create a container of the same name fail with status code 409 + * (Conflict). The service indicates that the container is being deleted. Operations on blobs within the container, + * including reads and writes, may continue to succeed for up to 30 seconds after the delete request is accepted. + * After this period, all operations on the container and its blobs fail with status code 404 (Not Found). + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - 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(); + public Response deleteWithResponseInternal(RequestOptions requestOptions) { + try { + return service.deleteSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); } - Boolean encryptionScopeOverridePrevented = encryptionScopeOverridePreventedInternal; - return service - .createNoCustomHeaders(this.client.getUrl(), containerName, restype, timeout, metadata, access, - this.client.getVersion(), requestId, defaultEncryptionScope, encryptionScopeOverridePrevented, accept, - context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + * Sets user-defined metadata for the specified container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-metaMap<String, String>NoThe metadata headers.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setMetadataWithResponseInternalAsync(RequestOptions requestOptions) { + return FluxUtil + .withContext(context -> service.setMetadata(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Sets user-defined metadata for the specified container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-metaMap<String, String>NoThe metadata headers.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase createWithResponse(String containerName, Integer timeout, - Map metadata, PublicAccessType access, String requestId, - BlobContainerEncryptionScope blobContainerEncryptionScope, Context context) { + public Response setMetadataWithResponseInternal(RequestOptions requestOptions) { try { - 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); - } catch (BlobStorageExceptionInternal internalException) { + return service.setMetadataSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Gets the permissions for the specified container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     SignedIdentifier (Required): [
+     *          (Required){
+     *             Id: String (Required)
+     *             AccessPolicy (Optional): {
+     *                 Start: OffsetDateTime (Optional)
+     *                 Expiry: OffsetDateTime (Optional)
+     *                 Permission: String (Optional)
+     *             }
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-blob-public-accessStringThe public access setting for the container.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the permissions for the specified container along with {@link Response} on successful completion of + * {@link Mono}. */ @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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + public Mono> getAccessPolicyWithResponseInternalAsync(RequestOptions requestOptions) { + final String accept = "application/xml"; + return FluxUtil + .withContext(context -> service.getAccessPolicy(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Gets the permissions for the specified container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     SignedIdentifier (Required): [
+     *          (Required){
+     *             Id: String (Required)
+     *             AccessPolicy (Optional): {
+     *                 Start: OffsetDateTime (Optional)
+     *                 Expiry: OffsetDateTime (Optional)
+     *                 Permission: String (Optional)
+     *             }
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-blob-public-accessStringThe public access setting for the container.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the permissions for the specified container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createNoCustomHeadersWithResponse(String containerName, Integer timeout, - Map metadata, PublicAccessType access, String requestId, - BlobContainerEncryptionScope blobContainerEncryptionScope, Context context) { + public Response getAccessPolicyWithResponseInternal(RequestOptions requestOptions) { try { - 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.createNoCustomHeadersSync(this.client.getUrl(), containerName, restype, timeout, metadata, - access, this.client.getVersion(), requestId, defaultEncryptionScope, encryptionScopeOverridePrevented, - accept, context); - } catch (BlobStorageExceptionInternal internalException) { + return service.getAccessPolicySync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + accept, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + * Sets the permissions for the specified container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/xml".
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-public-accessStringNoThe public access setting for the container. + * Allowed values: "blob", "container".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     SignedIdentifier (Required): [
+     *          (Required){
+     *             Id: String (Required)
+     *             AccessPolicy (Optional): {
+     *                 Start: OffsetDateTime (Optional)
+     *                 Expiry: OffsetDateTime (Optional)
+     *                 Permission: String (Optional)
+     *             }
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPropertiesWithResponseAsync(String containerName, - Integer timeout, String leaseId, String requestId) { + public Mono> setAccessPolicyWithResponseInternalAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getBody() != null && requestLocal.getHeaders().get(HttpHeaderName.CONTENT_TYPE) == null) { + requestLocal.getHeaders().set(HttpHeaderName.CONTENT_TYPE, "application/xml"); + } + }); return FluxUtil - .withContext(context -> getPropertiesWithResponseAsync(containerName, timeout, leaseId, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + .withContext(context -> service.setAccessPolicy(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), requestOptionsLocal, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Sets the permissions for the specified container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/xml".
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-public-accessStringNoThe public access setting for the container. + * Allowed values: "blob", "container".
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     SignedIdentifier (Required): [
+     *          (Required){
+     *             Id: String (Required)
+     *             AccessPolicy (Optional): {
+     *                 Start: OffsetDateTime (Optional)
+     *                 Expiry: OffsetDateTime (Optional)
+     *                 Permission: String (Optional)
+     *             }
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + public Response setAccessPolicyWithResponseInternal(RequestOptions requestOptions) { + try { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getBody() != null + && requestLocal.getHeaders().get(HttpHeaderName.CONTENT_TYPE) == null) { + requestLocal.getHeaders().set(HttpHeaderName.CONTENT_TYPE, "application/xml"); + } + }); + return service.setAccessPolicySync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptionsLocal, Context.NONE); + } catch (BlobStorageErrorException 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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. + * Restores the specified previously-deleted container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-deleted-container-nameStringNoSpecifies the name of the deleted container + * to restore.
x-ms-deleted-container-versionStringNoSpecifies the version of the deleted + * container to restore.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPropertiesAsync(String containerName, Integer timeout, String leaseId, String requestId) { - return getPropertiesWithResponseAsync(containerName, timeout, leaseId, requestId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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. + public Mono> restoreWithResponseInternalAsync(RequestOptions requestOptions) { + return FluxUtil + .withContext(context -> service.restore(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Restores the specified previously-deleted container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-deleted-container-nameStringNoSpecifies the name of the deleted container + * to restore.
x-ms-deleted-container-versionStringNoSpecifies the version of the deleted + * container to restore.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPropertiesAsync(String containerName, Integer timeout, String leaseId, String requestId, - Context context) { - return getPropertiesWithResponseAsync(containerName, timeout, leaseId, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); + public Response restoreWithResponseInternal(RequestOptions requestOptions) { + try { + return service.restoreSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Renames the specified existing container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-source-lease-idStringNoA lease ID for the source path. If specified, the + * source path must have an active lease and the lease ID must match.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param sourceContainerName Specifies the name of the container to rename. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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> renameWithResponseInternalAsync(String sourceContainerName, + RequestOptions requestOptions) { return FluxUtil - .withContext(context -> getPropertiesNoCustomHeadersWithResponseAsync(containerName, timeout, leaseId, - requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + .withContext(context -> service.rename(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + sourceContainerName, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Renames the specified existing container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-source-lease-idStringNoA lease ID for the source path. If specified, the + * source path must have an active lease and the lease ID must match.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param sourceContainerName Specifies the name of the container to rename. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response renameWithResponseInternal(String sourceContainerName, RequestOptions requestOptions) { + try { + return service.renameSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + sourceContainerName, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + * The Create Session operation enables users to create a session scoped to a container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     AuthenticationType: String(HMAC) (Required)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     Id: String (Optional)
+     *     Expiration: DateTimeRfc1123 (Optional)
+     *     AuthenticationType: String(HMAC) (Optional)
+     *     Credentials (Optional): {
+     *         SessionToken: String (Optional)
+     *         SessionKey: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param createSessionConfiguration The configuration used to create the session. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the response of the Create Session API along with {@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) { - final String restype = "container"; + public Mono> createSessionWithResponseInternalAsync(BinaryData createSessionConfiguration, + RequestOptions requestOptions) { + final String contentType = "application/xml"; final String accept = "application/xml"; - return service - .getPropertiesNoCustomHeaders(this.client.getUrl(), containerName, restype, timeout, leaseId, - this.client.getVersion(), requestId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + return FluxUtil.withContext(context -> service.createSession(this.client.getUrl(), contentType, + this.client.getServiceVersion().getVersion(), accept, createSessionConfiguration, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); } /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { + * The Create Session operation enables users to create a session scoped to a container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     AuthenticationType: String(HMAC) (Required)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     Id: String (Optional)
+     *     Expiration: DateTimeRfc1123 (Optional)
+     *     AuthenticationType: String(HMAC) (Optional)
+     *     Credentials (Optional): {
+     *         SessionToken: String (Optional)
+     *         SessionKey: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param createSessionConfiguration The configuration used to create the session. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the response of the Create Session API along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createSessionWithResponseInternal(BinaryData createSessionConfiguration, + RequestOptions requestOptions) { try { - final String restype = "container"; + final String contentType = "application/xml"; final String accept = "application/xml"; - return service.getPropertiesSync(this.client.getUrl(), containerName, restype, timeout, leaseId, - this.client.getVersion(), requestId, accept, context); - } catch (BlobStorageExceptionInternal internalException) { + return service.createSessionSync(this.client.getUrl(), contentType, + this.client.getServiceVersion().getVersion(), accept, createSessionConfiguration, requestOptions, + Context.NONE); + } catch (BlobStorageErrorException 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. + * Allows multiple API calls to be embedded into a single HTTP request. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     body (Required): {
+     *         content: BinaryData (Required)
+     *         filename: String (Optional)
+     *         contentType: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     body (Required): {
+     *         content: BinaryData (Required)
+     *         filename: String (Optional)
+     *         contentType: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
* - * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @param contentLength The length of the request. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @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. + public Mono> submitBatchWithResponseAsync(long contentLength, BinaryData body, + RequestOptions requestOptions) { + final String contentType = "multipart/mixed"; + final String accept = "multipart/mixed"; + return FluxUtil + .withContext(context -> service.submitBatch(this.client.getUrl(), contentType, + this.client.getServiceVersion().getVersion(), contentLength, accept, body, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Allows multiple API calls to be embedded into a single HTTP request. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     body (Required): {
+     *         content: BinaryData (Required)
+     *         filename: String (Optional)
+     *         contentType: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     body (Required): {
+     *         content: BinaryData (Required)
+     *         filename: String (Optional)
+     *         contentType: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
* - * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + * @param contentLength The length of the request. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPropertiesNoCustomHeadersWithResponse(String containerName, Integer timeout, - String leaseId, String requestId, Context context) { + public Response submitBatchWithResponse(long contentLength, BinaryData body, + RequestOptions requestOptions) { try { - 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); - } catch (BlobStorageExceptionInternal internalException) { + final String contentType = "multipart/mixed"; + final String accept = "multipart/mixed"; + return service.submitBatchSync(this.client.getUrl(), contentType, + this.client.getServiceVersion().getVersion(), contentLength, accept, body, requestOptions, + Context.NONE); + } catch (BlobStorageErrorException 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + * Lists blobs in the specified container whose tags match a given search expression. + *

Query Parameters

+ * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     ServiceEndpoint: String (Required)
+     *     Where: String (Required)
+     *     Blobs (Required): [
+     *          (Required){
+     *             Name: String (Required)
+     *             ContainerName: String (Required)
+     *             Tags (Optional): {
+     *                 TagSet (Required): [
+     *                      (Required){
+     *                         Key: String (Required)
+     *                         Value: String (Required)
+     *                     }
+     *                 ]
+     *             }
+     *             VersionId: String (Optional)
+     *             IsCurrentVersion: Boolean (Optional)
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param filterExpression Filters the results to return only blobs whose tags match the specified expression. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the Find Blobs by Tags API along with {@link Response} 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> filterBlobsWithResponseInternalAsync(String filterExpression, + RequestOptions requestOptions) { + final String accept = "application/xml"; return FluxUtil - .withContext(context -> deleteWithResponseAsync(containerName, timeout, leaseId, ifModifiedSince, - ifUnmodifiedSince, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + .withContext(context -> service.filterBlobs(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), filterExpression, accept, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Lists blobs in the specified container whose tags match a given search expression. + *

Query Parameters

+ * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     ServiceEndpoint: String (Required)
+     *     Where: String (Required)
+     *     Blobs (Required): [
+     *          (Required){
+     *             Name: String (Required)
+     *             ContainerName: String (Required)
+     *             Tags (Optional): {
+     *                 TagSet (Required): [
+     *                      (Required){
+     *                         Key: String (Required)
+     *                         Value: String (Required)
+     *                     }
+     *                 ]
+     *             }
+     *             VersionId: String (Optional)
+     *             IsCurrentVersion: Boolean (Optional)
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param filterExpression Filters the results to return only blobs whose tags match the specified expression. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the Find Blobs by Tags API along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response filterBlobsWithResponseInternal(String filterExpression, + RequestOptions requestOptions) { + try { + final String accept = "application/xml"; + return service.filterBlobsSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + filterExpression, accept, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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. + * Requests a new lease on the specified container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-proposed-lease-idStringNoThe proposed lease ID for the lease.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-lease-idStringUniquely identifies a blob's lease.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
* - * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + * @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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} 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) { - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * operation marks the specified container for deletion. The container and any blobs contained within it are later - * deleted during garbage collection. + public Mono> acquireLeaseWithResponseInternalAsync(int duration, RequestOptions requestOptions) { + final String action = "acquire"; + return FluxUtil + .withContext(context -> service.acquireLease(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), duration, action, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Requests a new lease on the specified container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-proposed-lease-idStringNoThe proposed lease ID for the lease.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-lease-idStringUniquely identifies a blob's lease.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
* - * @param containerName The container name. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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. + * @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. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String containerName, Integer timeout, String leaseId, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String requestId) { - return deleteWithResponseAsync(containerName, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, requestId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); + public Response acquireLeaseWithResponseInternal(int duration, RequestOptions requestOptions) { + try { + final String action = "acquire"; + return service.acquireLeaseSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + duration, action, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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. + * Frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the + * container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> releaseLeaseWithResponseInternalAsync(String leaseId, RequestOptions requestOptions) { + final String action = "release"; + return FluxUtil + .withContext(context -> service.releaseLease(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), leaseId, action, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Frees the lease if it's no longer needed, so that another client can immediately acquire a lease against the + * container. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @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).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); + public Response releaseLeaseWithResponseInternal(String leaseId, RequestOptions requestOptions) { + try { + final String action = "release"; + return service.releaseLeaseSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), leaseId, + action, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Renews an existing lease. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-lease-idStringUniquely identifies a blob's lease.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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> renewLeaseWithResponseInternalAsync(String leaseId, RequestOptions requestOptions) { + final String action = "renew"; return FluxUtil - .withContext(context -> deleteNoCustomHeadersWithResponseAsync(containerName, timeout, leaseId, - ifModifiedSince, ifUnmodifiedSince, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Integer timeout, - String leaseId, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, - Context context) { - try { - 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.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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + .withContext(context -> service.renewLease(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), leaseId, action, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Renews an existing lease. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-lease-idStringUniquely identifies a blob's lease.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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) { + public Response renewLeaseWithResponseInternal(String leaseId, RequestOptions requestOptions) { try { - 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); - } catch (BlobStorageExceptionInternal internalException) { + final String action = "renew"; + return service.renewLeaseSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), leaseId, + action, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> setMetadataWithResponseAsync(containerName, timeout, leaseId, metadata, - ifModifiedSince, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return setMetadataWithResponseAsync(containerName, timeout, leaseId, metadata, ifModifiedSince, requestId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Context context) { - return setMetadataWithResponseAsync(containerName, timeout, leaseId, metadata, ifModifiedSince, requestId, - context).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Ends a lease and ensures that another client can't acquire a new lease until the current lease period has + * expired. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
x-ms-lease-break-periodIntegerNoProposed 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.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-lease-timeintApproximate time remaining in the lease period, in seconds.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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> breakLeaseWithResponseInternalAsync(RequestOptions requestOptions) { + final String action = "break"; return FluxUtil - .withContext(context -> setMetadataNoCustomHeadersWithResponseAsync(containerName, timeout, leaseId, - metadata, ifModifiedSince, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + .withContext(context -> service.breakLease(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), action, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Ends a lease and ensures that another client can't acquire a new lease until the current lease period has + * expired. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
x-ms-lease-break-periodIntegerNoProposed 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.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-lease-timeintApproximate time remaining in the lease period, in seconds.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase setMetadataWithResponse(String containerName, - Integer timeout, String leaseId, Map metadata, OffsetDateTime ifModifiedSince, String requestId, - Context context) { + public Response breakLeaseWithResponseInternal(RequestOptions requestOptions) { try { - 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); - } catch (BlobStorageExceptionInternal internalException) { + final String action = "break"; + return service.breakLeaseSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), action, + requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Change the ID of an existing lease. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-lease-idStringUniquely identifies a blob's lease.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. */ @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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + public Mono> changeLeaseWithResponseInternalAsync(String leaseId, String proposedLeaseId, + RequestOptions requestOptions) { + final String action = "change"; + return FluxUtil + .withContext( + context -> service.changeLease(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + leaseId, proposedLeaseId, action, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Change the ID of an existing lease. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-lease-idStringUniquely identifies a blob's lease.
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param leaseId A lease ID for the resource. The resource must have an active lease and the lease ID must match. + * @param proposedLeaseId The proposed lease ID for the lease. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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) { + public Response changeLeaseWithResponseInternal(String leaseId, String proposedLeaseId, + RequestOptions requestOptions) { try { - final String restype = "container"; - final String comp = "metadata"; - 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); - } catch (BlobStorageExceptionInternal internalException) { + final String action = "change"; + return service.changeLeaseSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), leaseId, + proposedLeaseId, action, requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } } /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - getAccessPolicyWithResponseAsync(String containerName, Integer timeout, String leaseId, String requestId) { - return FluxUtil - .withContext( - context -> getAccessPolicyWithResponseAsync(containerName, timeout, leaseId, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - getAccessPolicyWithResponseAsync(String containerName, Integer timeout, String leaseId, String requestId, - Context context) { - final String restype = "container"; - final String comp = "acl"; + * Returns a list of the blobs in the specified container. + *

Query Parameters

+ * + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
prefixStringNoFilters the results to return only resources whose name begins + * with the specified prefix.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
startFromStringNoSpecifies the relative path to list paths from. For + * non-recursive list, only one entity level is supported; for recursive list, multiple entity levels are supported. + * (Inclusive)
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     ServiceEndpoint: String (Required)
+     *     ContainerName: String (Required)
+     *     Prefix: String (Optional)
+     *     Marker: String (Optional)
+     *     MaxResults: Integer (Optional)
+     *     Blobs (Required): [
+     *          (Required){
+     *             Name (Required): {
+     *                 Encoded: Boolean (Optional)
+     *                 content: String (Optional)
+     *             }
+     *             Deleted: boolean (Required)
+     *             Snapshot: String (Required)
+     *             VersionId: String (Optional)
+     *             IsCurrentVersion: Boolean (Optional)
+     *             Properties (Required): {
+     *                 Creation-Time: DateTimeRfc1123 (Optional)
+     *                 Last-Modified: DateTimeRfc1123 (Required)
+     *                 Etag: String (Required)
+     *                 Content-Length: Long (Optional)
+     *                 Content-Type: String (Optional)
+     *                 Content-Encoding: String (Optional)
+     *                 Content-Language: String (Optional)
+     *                 Content-MD5: byte[] (Optional)
+     *                 Content-Disposition: String (Optional)
+     *                 Cache-Control: String (Optional)
+     *                 x-ms-blob-sequence-number: Long (Optional)
+     *                 BlobType: String(BlockBlob/PageBlob/AppendBlob) (Optional)
+     *                 LeaseStatus: String(unlocked/locked) (Optional)
+     *                 LeaseState: String(available/leased/expired/breaking/broken) (Optional)
+     *                 LeaseDuration: String(infinite/fixed) (Optional)
+     *                 CopyId: String (Optional)
+     *                 CopyStatus: String(pending/success/failed/aborted) (Optional)
+     *                 CopySource: String (Optional)
+     *                 CopyProgress: String (Optional)
+     *                 CopyCompletionTime: DateTimeRfc1123 (Optional)
+     *                 CopyStatusDescription: String (Optional)
+     *                 ServerEncrypted: Boolean (Optional)
+     *                 IncrementalCopy: Boolean (Optional)
+     *                 DestinationSnapshot: String (Optional)
+     *                 DeletedTime: DateTimeRfc1123 (Optional)
+     *                 RemainingRetentionDays: Integer (Optional)
+     *                 AccessTier: String(P4/P6/P10/P15/P20/P30/P40/P50/P60/P70/P80/Hot/Cool/Archive/Premium/Cold/Smart) (Optional)
+     *                 AccessTierInferred: Boolean (Optional)
+     *                 ArchiveStatus: String(rehydrate-pending-to-hot/rehydrate-pending-to-cool/rehydrate-pending-to-cold/rehydrate-pending-to-smart) (Optional)
+     *                 SmartAccessTier: String(P4/P6/P10/P15/P20/P30/P40/P50/P60/P70/P80/Hot/Cool/Archive/Premium/Cold/Smart) (Optional)
+     *                 CustomerProvidedKeySha256: String (Optional)
+     *                 EncryptionScope: String (Optional)
+     *                 AccessTierChangeTime: DateTimeRfc1123 (Optional)
+     *                 TagCount: Integer (Optional)
+     *                 Expiry-Time: DateTimeRfc1123 (Optional)
+     *                 Sealed: Boolean (Optional)
+     *                 RehydratePriority: String(High/Standard) (Optional)
+     *                 LastAccessTime: DateTimeRfc1123 (Optional)
+     *                 ImmutabilityPolicyUntilDate: DateTimeRfc1123 (Optional)
+     *                 ImmutabilityPolicyMode: String(mutable/locked/unlocked) (Optional)
+     *                 LegalHold: Boolean (Optional)
+     *             }
+     *             Metadata (Optional): {
+     *                 String: String (Required)
+     *             }
+     *             Tags (Optional): {
+     *                 TagSet (Required): [
+     *                      (Required){
+     *                         Key: String (Required)
+     *                         Value: String (Required)
+     *                     }
+     *                 ]
+     *             }
+     *             OrMetadata (Optional): {
+     *                 String: String (Required)
+     *             }
+     *             HasVersionsOnly: Boolean (Optional)
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the List Blobs API along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listBlobFlatSegmentWithResponseInternalAsync(RequestOptions requestOptions) { final String accept = "application/xml"; - return service - .getAccessPolicy(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, - this.client.getVersion(), requestId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return getAccessPolicyWithResponseAsync(containerName, timeout, leaseId, requestId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Context context) { - return getAccessPolicyWithResponseAsync(containerName, timeout, leaseId, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAccessPolicyNoCustomHeadersWithResponseAsync( - String containerName, Integer timeout, String leaseId, String requestId) { return FluxUtil - .withContext(context -> getAccessPolicyNoCustomHeadersWithResponseAsync(containerName, timeout, leaseId, - requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. - */ - @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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { + .withContext(context -> service.listBlobFlatSegment(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Returns a list of the blobs in the specified container. + *

Query Parameters

+ * + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
prefixStringNoFilters the results to return only resources whose name begins + * with the specified prefix.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
startFromStringNoSpecifies the relative path to list paths from. For + * non-recursive list, only one entity level is supported; for recursive list, multiple entity levels are supported. + * (Inclusive)
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     ServiceEndpoint: String (Required)
+     *     ContainerName: String (Required)
+     *     Prefix: String (Optional)
+     *     Marker: String (Optional)
+     *     MaxResults: Integer (Optional)
+     *     Blobs (Required): [
+     *          (Required){
+     *             Name (Required): {
+     *                 Encoded: Boolean (Optional)
+     *                 content: String (Optional)
+     *             }
+     *             Deleted: boolean (Required)
+     *             Snapshot: String (Required)
+     *             VersionId: String (Optional)
+     *             IsCurrentVersion: Boolean (Optional)
+     *             Properties (Required): {
+     *                 Creation-Time: DateTimeRfc1123 (Optional)
+     *                 Last-Modified: DateTimeRfc1123 (Required)
+     *                 Etag: String (Required)
+     *                 Content-Length: Long (Optional)
+     *                 Content-Type: String (Optional)
+     *                 Content-Encoding: String (Optional)
+     *                 Content-Language: String (Optional)
+     *                 Content-MD5: byte[] (Optional)
+     *                 Content-Disposition: String (Optional)
+     *                 Cache-Control: String (Optional)
+     *                 x-ms-blob-sequence-number: Long (Optional)
+     *                 BlobType: String(BlockBlob/PageBlob/AppendBlob) (Optional)
+     *                 LeaseStatus: String(unlocked/locked) (Optional)
+     *                 LeaseState: String(available/leased/expired/breaking/broken) (Optional)
+     *                 LeaseDuration: String(infinite/fixed) (Optional)
+     *                 CopyId: String (Optional)
+     *                 CopyStatus: String(pending/success/failed/aborted) (Optional)
+     *                 CopySource: String (Optional)
+     *                 CopyProgress: String (Optional)
+     *                 CopyCompletionTime: DateTimeRfc1123 (Optional)
+     *                 CopyStatusDescription: String (Optional)
+     *                 ServerEncrypted: Boolean (Optional)
+     *                 IncrementalCopy: Boolean (Optional)
+     *                 DestinationSnapshot: String (Optional)
+     *                 DeletedTime: DateTimeRfc1123 (Optional)
+     *                 RemainingRetentionDays: Integer (Optional)
+     *                 AccessTier: String(P4/P6/P10/P15/P20/P30/P40/P50/P60/P70/P80/Hot/Cool/Archive/Premium/Cold/Smart) (Optional)
+     *                 AccessTierInferred: Boolean (Optional)
+     *                 ArchiveStatus: String(rehydrate-pending-to-hot/rehydrate-pending-to-cool/rehydrate-pending-to-cold/rehydrate-pending-to-smart) (Optional)
+     *                 SmartAccessTier: String(P4/P6/P10/P15/P20/P30/P40/P50/P60/P70/P80/Hot/Cool/Archive/Premium/Cold/Smart) (Optional)
+     *                 CustomerProvidedKeySha256: String (Optional)
+     *                 EncryptionScope: String (Optional)
+     *                 AccessTierChangeTime: DateTimeRfc1123 (Optional)
+     *                 TagCount: Integer (Optional)
+     *                 Expiry-Time: DateTimeRfc1123 (Optional)
+     *                 Sealed: Boolean (Optional)
+     *                 RehydratePriority: String(High/Standard) (Optional)
+     *                 LastAccessTime: DateTimeRfc1123 (Optional)
+     *                 ImmutabilityPolicyUntilDate: DateTimeRfc1123 (Optional)
+     *                 ImmutabilityPolicyMode: String(mutable/locked/unlocked) (Optional)
+     *                 LegalHold: Boolean (Optional)
+     *             }
+     *             Metadata (Optional): {
+     *                 String: String (Required)
+     *             }
+     *             Tags (Optional): {
+     *                 TagSet (Required): [
+     *                      (Required){
+     *                         Key: String (Required)
+     *                         Value: String (Required)
+     *                     }
+     *                 ]
+     *             }
+     *             OrMetadata (Optional): {
+     *                 String: String (Required)
+     *             }
+     *             HasVersionsOnly: Boolean (Optional)
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the List Blobs API along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listBlobFlatSegmentWithResponseInternal(RequestOptions requestOptions) { try { - 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); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - return getAccessPolicyWithResponse(containerName, timeout, leaseId, requestId, Context.NONE).getValue(); - } catch (BlobStorageExceptionInternal internalException) { + return service.listBlobFlatSegmentSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + accept, requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } } /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 Response getAccessPolicyNoCustomHeadersWithResponse(String containerName, - Integer timeout, String leaseId, String requestId, Context context) { + * Returns a list of the blobs in Apache Arrow format as raw data, to be deserialized by the client. + *

Query Parameters

+ * + * + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
prefixStringNoFilters the results to return only resources whose name begins + * with the specified prefix.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
startFromStringNoSpecifies the relative path to list paths from. For + * non-recursive list, only one entity level is supported; for recursive list, multiple entity levels are supported. + * (Inclusive)
endBeforeStringNoFilters the results to return only names that are ordered + * before this value. Currently only applies to Apache Arrow scenario.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
Content-TypeStringContent-Type header
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return represent a byte array along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listBlobFlatSegmentApacheArrowWithResponseAsync(RequestOptions requestOptions) { + final String accept = "application/vnd.apache.arrow.stream,application/xml"; + return FluxUtil + .withContext(context -> service.listBlobFlatSegmentApacheArrow(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Returns a list of the blobs in Apache Arrow format as raw data, to be deserialized by the client. + *

Query Parameters

+ * + * + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
prefixStringNoFilters the results to return only resources whose name begins + * with the specified prefix.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
startFromStringNoSpecifies the relative path to list paths from. For + * non-recursive list, only one entity level is supported; for recursive list, multiple entity levels are supported. + * (Inclusive)
endBeforeStringNoFilters the results to return only names that are ordered + * before this value. Currently only applies to Apache Arrow scenario.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
Content-TypeStringContent-Type header
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return represent a byte array along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listBlobFlatSegmentApacheArrowWithResponse(RequestOptions requestOptions) { try { - 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); - } catch (BlobStorageExceptionInternal internalException) { + final String accept = "application/vnd.apache.arrow.stream,application/xml"; + return service.listBlobFlatSegmentApacheArrowSync(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> setAccessPolicyWithResponseAsync( - String containerName, Integer timeout, String leaseId, PublicAccessType access, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String requestId, List containerAcl) { - return FluxUtil - .withContext(context -> setAccessPolicyWithResponseAsync(containerName, timeout, leaseId, access, - ifModifiedSince, ifUnmodifiedSince, requestId, containerAcl, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + * Returns a list of the blobs in the specified container. A delimiter can be used to traverse a virtual hierarchy + * of blobs as though it were a file system. + *

Query Parameters

+ * + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
prefixStringNoFilters the results to return only resources whose name begins + * with the specified prefix.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
startFromStringNoSpecifies the relative path to list paths from. For + * non-recursive list, only one entity level is supported; for recursive list, multiple entity levels are supported. + * (Inclusive)
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     ServiceEndpoint: String (Required)
+     *     ContainerName: String (Required)
+     *     Delimiter: String (Optional)
+     *     Prefix: String (Optional)
+     *     Marker: String (Optional)
+     *     MaxResults: Integer (Optional)
+     *     Blobs (Required): {
+     *         Blob (Optional): [
+     *              (Optional){
+     *                 Name (Required): {
+     *                     Encoded: Boolean (Optional)
+     *                     content: String (Optional)
+     *                 }
+     *                 Deleted: boolean (Required)
+     *                 Snapshot: String (Required)
+     *                 VersionId: String (Optional)
+     *                 IsCurrentVersion: Boolean (Optional)
+     *                 Properties (Required): {
+     *                     Creation-Time: DateTimeRfc1123 (Optional)
+     *                     Last-Modified: DateTimeRfc1123 (Required)
+     *                     Etag: String (Required)
+     *                     Content-Length: Long (Optional)
+     *                     Content-Type: String (Optional)
+     *                     Content-Encoding: String (Optional)
+     *                     Content-Language: String (Optional)
+     *                     Content-MD5: byte[] (Optional)
+     *                     Content-Disposition: String (Optional)
+     *                     Cache-Control: String (Optional)
+     *                     x-ms-blob-sequence-number: Long (Optional)
+     *                     BlobType: String(BlockBlob/PageBlob/AppendBlob) (Optional)
+     *                     LeaseStatus: String(unlocked/locked) (Optional)
+     *                     LeaseState: String(available/leased/expired/breaking/broken) (Optional)
+     *                     LeaseDuration: String(infinite/fixed) (Optional)
+     *                     CopyId: String (Optional)
+     *                     CopyStatus: String(pending/success/failed/aborted) (Optional)
+     *                     CopySource: String (Optional)
+     *                     CopyProgress: String (Optional)
+     *                     CopyCompletionTime: DateTimeRfc1123 (Optional)
+     *                     CopyStatusDescription: String (Optional)
+     *                     ServerEncrypted: Boolean (Optional)
+     *                     IncrementalCopy: Boolean (Optional)
+     *                     DestinationSnapshot: String (Optional)
+     *                     DeletedTime: DateTimeRfc1123 (Optional)
+     *                     RemainingRetentionDays: Integer (Optional)
+     *                     AccessTier: String(P4/P6/P10/P15/P20/P30/P40/P50/P60/P70/P80/Hot/Cool/Archive/Premium/Cold/Smart) (Optional)
+     *                     AccessTierInferred: Boolean (Optional)
+     *                     ArchiveStatus: String(rehydrate-pending-to-hot/rehydrate-pending-to-cool/rehydrate-pending-to-cold/rehydrate-pending-to-smart) (Optional)
+     *                     SmartAccessTier: String(P4/P6/P10/P15/P20/P30/P40/P50/P60/P70/P80/Hot/Cool/Archive/Premium/Cold/Smart) (Optional)
+     *                     CustomerProvidedKeySha256: String (Optional)
+     *                     EncryptionScope: String (Optional)
+     *                     AccessTierChangeTime: DateTimeRfc1123 (Optional)
+     *                     TagCount: Integer (Optional)
+     *                     Expiry-Time: DateTimeRfc1123 (Optional)
+     *                     Sealed: Boolean (Optional)
+     *                     RehydratePriority: String(High/Standard) (Optional)
+     *                     LastAccessTime: DateTimeRfc1123 (Optional)
+     *                     ImmutabilityPolicyUntilDate: DateTimeRfc1123 (Optional)
+     *                     ImmutabilityPolicyMode: String(mutable/locked/unlocked) (Optional)
+     *                     LegalHold: Boolean (Optional)
+     *                 }
+     *                 Metadata (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *                 Tags (Optional): {
+     *                     TagSet (Required): [
+     *                          (Required){
+     *                             Key: String (Required)
+     *                             Value: String (Required)
+     *                         }
+     *                     ]
+     *                 }
+     *                 OrMetadata (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *                 HasVersionsOnly: Boolean (Optional)
+     *             }
+     *         ]
+     *         BlobPrefix (Optional): [
+     *              (Optional){
+     *                 Name (Required): (recursive schema, see Name above)
+     *             }
+     *         ]
+     *     }
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param delimiter If specified, the operation returns a BlobPrefix element 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the List Blobs Hierarchical API along with {@link Response} on successful completion of + * {@link Mono}. */ @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) { - final String restype = "container"; - final String comp = "acl"; + public Mono> listBlobHierarchySegmentWithResponseInternalAsync(String delimiter, + RequestOptions requestOptions) { 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 - .setAccessPolicy(this.client.getUrl(), containerName, restype, comp, timeout, leaseId, access, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, - containerAclConverted, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> setAccessPolicyNoCustomHeadersWithResponseAsync(String containerName, Integer timeout, - String leaseId, PublicAccessType access, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String requestId, List containerAcl) { return FluxUtil - .withContext(context -> setAccessPolicyNoCustomHeadersWithResponseAsync(containerName, timeout, leaseId, - access, ifModifiedSince, ifUnmodifiedSince, requestId, containerAcl, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { + .withContext(context -> service.listBlobHierarchySegment(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), delimiter, accept, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Returns a list of the blobs in the specified container. A delimiter can be used to traverse a virtual hierarchy + * of blobs as though it were a file system. + *

Query Parameters

+ * + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
prefixStringNoFilters the results to return only resources whose name begins + * with the specified prefix.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
startFromStringNoSpecifies the relative path to list paths from. For + * non-recursive list, only one entity level is supported; for recursive list, multiple entity levels are supported. + * (Inclusive)
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     ServiceEndpoint: String (Required)
+     *     ContainerName: String (Required)
+     *     Delimiter: String (Optional)
+     *     Prefix: String (Optional)
+     *     Marker: String (Optional)
+     *     MaxResults: Integer (Optional)
+     *     Blobs (Required): {
+     *         Blob (Optional): [
+     *              (Optional){
+     *                 Name (Required): {
+     *                     Encoded: Boolean (Optional)
+     *                     content: String (Optional)
+     *                 }
+     *                 Deleted: boolean (Required)
+     *                 Snapshot: String (Required)
+     *                 VersionId: String (Optional)
+     *                 IsCurrentVersion: Boolean (Optional)
+     *                 Properties (Required): {
+     *                     Creation-Time: DateTimeRfc1123 (Optional)
+     *                     Last-Modified: DateTimeRfc1123 (Required)
+     *                     Etag: String (Required)
+     *                     Content-Length: Long (Optional)
+     *                     Content-Type: String (Optional)
+     *                     Content-Encoding: String (Optional)
+     *                     Content-Language: String (Optional)
+     *                     Content-MD5: byte[] (Optional)
+     *                     Content-Disposition: String (Optional)
+     *                     Cache-Control: String (Optional)
+     *                     x-ms-blob-sequence-number: Long (Optional)
+     *                     BlobType: String(BlockBlob/PageBlob/AppendBlob) (Optional)
+     *                     LeaseStatus: String(unlocked/locked) (Optional)
+     *                     LeaseState: String(available/leased/expired/breaking/broken) (Optional)
+     *                     LeaseDuration: String(infinite/fixed) (Optional)
+     *                     CopyId: String (Optional)
+     *                     CopyStatus: String(pending/success/failed/aborted) (Optional)
+     *                     CopySource: String (Optional)
+     *                     CopyProgress: String (Optional)
+     *                     CopyCompletionTime: DateTimeRfc1123 (Optional)
+     *                     CopyStatusDescription: String (Optional)
+     *                     ServerEncrypted: Boolean (Optional)
+     *                     IncrementalCopy: Boolean (Optional)
+     *                     DestinationSnapshot: String (Optional)
+     *                     DeletedTime: DateTimeRfc1123 (Optional)
+     *                     RemainingRetentionDays: Integer (Optional)
+     *                     AccessTier: String(P4/P6/P10/P15/P20/P30/P40/P50/P60/P70/P80/Hot/Cool/Archive/Premium/Cold/Smart) (Optional)
+     *                     AccessTierInferred: Boolean (Optional)
+     *                     ArchiveStatus: String(rehydrate-pending-to-hot/rehydrate-pending-to-cool/rehydrate-pending-to-cold/rehydrate-pending-to-smart) (Optional)
+     *                     SmartAccessTier: String(P4/P6/P10/P15/P20/P30/P40/P50/P60/P70/P80/Hot/Cool/Archive/Premium/Cold/Smart) (Optional)
+     *                     CustomerProvidedKeySha256: String (Optional)
+     *                     EncryptionScope: String (Optional)
+     *                     AccessTierChangeTime: DateTimeRfc1123 (Optional)
+     *                     TagCount: Integer (Optional)
+     *                     Expiry-Time: DateTimeRfc1123 (Optional)
+     *                     Sealed: Boolean (Optional)
+     *                     RehydratePriority: String(High/Standard) (Optional)
+     *                     LastAccessTime: DateTimeRfc1123 (Optional)
+     *                     ImmutabilityPolicyUntilDate: DateTimeRfc1123 (Optional)
+     *                     ImmutabilityPolicyMode: String(mutable/locked/unlocked) (Optional)
+     *                     LegalHold: Boolean (Optional)
+     *                 }
+     *                 Metadata (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *                 Tags (Optional): {
+     *                     TagSet (Required): [
+     *                          (Required){
+     *                             Key: String (Required)
+     *                             Value: String (Required)
+     *                         }
+     *                     ]
+     *                 }
+     *                 OrMetadata (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *                 HasVersionsOnly: Boolean (Optional)
+     *             }
+     *         ]
+     *         BlobPrefix (Optional): [
+     *              (Optional){
+     *                 Name (Required): (recursive schema, see Name above)
+     *             }
+     *         ]
+     *     }
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param delimiter If specified, the operation returns a BlobPrefix element 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the List Blobs Hierarchical API along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listBlobHierarchySegmentWithResponseInternal(String delimiter, + RequestOptions requestOptions) { try { - 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); - } catch (BlobStorageExceptionInternal internalException) { + return service.listBlobHierarchySegmentSync(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), delimiter, accept, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { + * Returns a list of the blobs in Apache Arrow format as raw data, to be deserialized by the client. A delimiter can + * be used to traverse a virtual hierarchy of blobs as though it were a file system. + *

Query Parameters

+ * + * + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
prefixStringNoFilters the results to return only resources whose name begins + * with the specified prefix.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
startFromStringNoSpecifies the relative path to list paths from. For + * non-recursive list, only one entity level is supported; for recursive list, multiple entity levels are supported. + * (Inclusive)
endBeforeStringNoFilters the results to return only names that are ordered + * before this value. Currently only applies to Apache Arrow scenario.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
Content-TypeStringContent-Type header
+ * + * @param delimiter If specified, the operation returns a BlobPrefix element 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return represent a byte array along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listBlobHierarchySegmentApacheArrowWithResponseAsync(String delimiter, + RequestOptions requestOptions) { + final String accept = "application/vnd.apache.arrow.stream,application/xml"; + return FluxUtil + .withContext(context -> service.listBlobHierarchySegmentApacheArrow(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), accept, delimiter, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Returns a list of the blobs in Apache Arrow format as raw data, to be deserialized by the client. A delimiter can + * be used to traverse a virtual hierarchy of blobs as though it were a file system. + *

Query Parameters

+ * + * + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
prefixStringNoFilters the results to return only resources whose name begins + * with the specified prefix.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
startFromStringNoSpecifies the relative path to list paths from. For + * non-recursive list, only one entity level is supported; for recursive list, multiple entity levels are supported. + * (Inclusive)
endBeforeStringNoFilters the results to return only names that are ordered + * before this value. Currently only applies to Apache Arrow scenario.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * String
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
Content-TypeStringContent-Type header
+ * + * @param delimiter If specified, the operation returns a BlobPrefix element 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 requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return represent a byte array along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listBlobHierarchySegmentApacheArrowWithResponse(String delimiter, + RequestOptions requestOptions) { try { - 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.setAccessPolicyNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, - timeout, leaseId, access, ifModifiedSinceConverted, ifUnmodifiedSinceConverted, - this.client.getVersion(), requestId, containerAclConverted, accept, context); - } catch (BlobStorageExceptionInternal internalException) { + final String accept = "application/vnd.apache.arrow.stream,application/xml"; + return service.listBlobHierarchySegmentApacheArrowSync(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), accept, delimiter, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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://learn.microsoft.com/rest/api/storageservices/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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> restoreWithResponseAsync(containerName, timeout, requestId, deletedContainerName, - deletedContainerVersion, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Context context) { - return restoreWithResponseAsync(containerName, timeout, requestId, deletedContainerName, - deletedContainerVersion, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Returns information about the storage account. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-sku-nameStringThe SKU name of the account.
x-ms-account-kindStringThe account kind.
x-ms-is-hns-enabledbooleanIndicates if the account has a hierarchical namespace + * enabled.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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> getAccountInfoWithResponseInternalAsync(RequestOptions requestOptions) { return FluxUtil - .withContext(context -> restoreNoCustomHeadersWithResponseAsync(containerName, timeout, requestId, - deletedContainerName, deletedContainerVersion, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 restoreWithResponse(String containerName, Integer timeout, - String requestId, String deletedContainerName, String deletedContainerVersion, Context context) { - try { - 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); - } 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://learn.microsoft.com/rest/api/storageservices/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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> renameWithResponseAsync(containerName, sourceContainerName, timeout, requestId, - sourceLeaseId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return renameWithResponseAsync(containerName, sourceContainerName, timeout, requestId, sourceLeaseId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Context context) { - return renameWithResponseAsync(containerName, sourceContainerName, timeout, requestId, sourceLeaseId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> renameNoCustomHeadersWithResponseAsync(containerName, sourceContainerName, timeout, - requestId, sourceLeaseId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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. - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> submitBatchWithResponseAsync( - String containerName, long contentLength, String multipartContentType, Flux body, Integer timeout, - String requestId) { - return FluxUtil - .withContext(context -> submitBatchWithResponseAsync(containerName, contentLength, multipartContentType, - body, timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> submitBatchWithResponseAsync( - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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>. - * @param body Initial data. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Context context) { - return submitBatchWithResponseAsync(containerName, contentLength, multipartContentType, body, timeout, - requestId, context).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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>. - * @param body Initial data. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> submitBatchNoCustomHeadersWithResponseAsync(containerName, contentLength, - multipartContentType, body, timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> submitBatchWithResponseAsync( - String containerName, long contentLength, String multipartContentType, BinaryData body, Integer timeout, - String requestId) { - return FluxUtil - .withContext(context -> submitBatchWithResponseAsync(containerName, contentLength, multipartContentType, - body, timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> submitBatchWithResponseAsync( - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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>. - * @param body Initial data. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Context context) { - return submitBatchWithResponseAsync(containerName, contentLength, multipartContentType, body, timeout, - requestId, context).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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>. - * @param body Initial data. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> submitBatchNoCustomHeadersWithResponseAsync(containerName, contentLength, - multipartContentType, body, timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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. - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - 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. - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> filterBlobsWithResponseAsync( - String containerName, Integer timeout, String requestId, String where, String marker, Integer maxresults, - List include) { - return FluxUtil - .withContext(context -> filterBlobsWithResponseAsync(containerName, timeout, requestId, where, marker, - maxresults, include, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> filterBlobsWithResponseAsync( - 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 - .filterBlobs(this.client.getUrl(), containerName, restype, comp, timeout, this.client.getVersion(), - requestId, where, marker, maxresults, includeConverted, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) { - return filterBlobsWithResponseAsync(containerName, timeout, requestId, where, marker, maxresults, include) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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(String containerName, - Integer timeout, String requestId, String where, String marker, Integer maxresults, - List include) { - return FluxUtil - .withContext(context -> filterBlobsNoCustomHeadersWithResponseAsync(containerName, timeout, requestId, - where, marker, maxresults, include, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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(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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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.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); - } - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> acquireLeaseWithResponseAsync(containerName, timeout, duration, proposedLeaseId, - ifModifiedSince, ifUnmodifiedSince, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Context context) { - return acquireLeaseWithResponseAsync(containerName, timeout, duration, proposedLeaseId, ifModifiedSince, - ifUnmodifiedSince, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> acquireLeaseNoCustomHeadersWithResponseAsync(containerName, timeout, duration, - proposedLeaseId, ifModifiedSince, ifUnmodifiedSince, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, - Integer timeout, Integer duration, String proposedLeaseId, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { - try { - 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.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://learn.microsoft.com/rest/api/storageservices/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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> releaseLeaseWithResponseAsync(containerName, leaseId, timeout, ifModifiedSince, - ifUnmodifiedSince, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Context context) { - return releaseLeaseWithResponseAsync(containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, - requestId, context).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> releaseLeaseNoCustomHeadersWithResponseAsync(containerName, leaseId, timeout, - ifModifiedSince, ifUnmodifiedSince, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> renewLeaseWithResponseAsync(containerName, leaseId, timeout, ifModifiedSince, - ifUnmodifiedSince, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Context context) { - return renewLeaseWithResponseAsync(containerName, leaseId, timeout, ifModifiedSince, ifUnmodifiedSince, - requestId, context).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> renewLeaseNoCustomHeadersWithResponseAsync(containerName, leaseId, timeout, - ifModifiedSince, ifUnmodifiedSince, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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 - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> breakLeaseWithResponseAsync(containerName, timeout, breakPeriod, ifModifiedSince, - ifUnmodifiedSince, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Integer timeout, - Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { - return FluxUtil - .withContext(context -> breakLeaseNoCustomHeadersWithResponseAsync(containerName, timeout, breakPeriod, - ifModifiedSince, ifUnmodifiedSince, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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 - .breakLeaseNoCustomHeaders(this.client.getUrl(), containerName, comp, restype, action, timeout, breakPeriod, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, this.client.getVersion(), requestId, accept, - context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 breakLeaseWithResponse(String containerName, Integer timeout, - Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, - Context context) { - try { - 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.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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 breakLeaseNoCustomHeadersWithResponse(String containerName, Integer timeout, - Integer breakPeriod, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId, - Context context) { - try { - 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); - } 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) - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> changeLeaseWithResponseAsync(String containerName, - String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String requestId) { - return FluxUtil - .withContext(context -> changeLeaseWithResponseAsync(containerName, leaseId, proposedLeaseId, timeout, - ifModifiedSince, ifUnmodifiedSince, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 changeLeaseAsync(String containerName, String leaseId, String proposedLeaseId, Integer timeout, - OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, String requestId) { - return changeLeaseWithResponseAsync(containerName, leaseId, proposedLeaseId, timeout, ifModifiedSince, - ifUnmodifiedSince, requestId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 leaseId, - String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String requestId) { - return FluxUtil - .withContext(context -> changeLeaseNoCustomHeadersWithResponseAsync(containerName, leaseId, proposedLeaseId, - timeout, ifModifiedSince, ifUnmodifiedSince, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 changeLeaseWithResponse(String containerName, - String leaseId, String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String requestId, Context context) { - try { - 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.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) - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 changeLeaseNoCustomHeadersWithResponse(String containerName, String leaseId, - String proposedLeaseId, Integer timeout, OffsetDateTime ifModifiedSince, OffsetDateTime ifUnmodifiedSince, - String requestId, Context context) { - try { - 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.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); - } - } - - /** - * [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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - listBlobFlatSegmentWithResponseAsync(String containerName, String prefix, String marker, Integer maxresults, - List include, String startFrom, Integer timeout, String requestId) { - return FluxUtil - .withContext(context -> listBlobFlatSegmentWithResponseAsync(containerName, prefix, marker, maxresults, - include, startFrom, timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - listBlobFlatSegmentWithResponseAsync(String containerName, String prefix, String marker, Integer maxresults, - List include, String startFrom, 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 - .listBlobFlatSegment(this.client.getUrl(), containerName, restype, comp, prefix, marker, maxresults, - includeConverted, startFrom, timeout, this.client.getVersion(), requestId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, String startFrom, Integer timeout, - String requestId) { - return listBlobFlatSegmentWithResponseAsync(containerName, prefix, marker, maxresults, include, startFrom, - timeout, requestId).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, String startFrom, Integer timeout, - String requestId, Context context) { - return listBlobFlatSegmentWithResponseAsync(containerName, prefix, marker, maxresults, include, startFrom, - timeout, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listBlobFlatSegmentNoCustomHeadersWithResponseAsync( - String containerName, String prefix, String marker, Integer maxresults, List include, - String startFrom, Integer timeout, String requestId) { - return FluxUtil - .withContext(context -> listBlobFlatSegmentNoCustomHeadersWithResponseAsync(containerName, prefix, marker, - maxresults, include, startFrom, timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listBlobFlatSegmentNoCustomHeadersWithResponseAsync( - String containerName, String prefix, String marker, Integer maxresults, List include, - String startFrom, 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, startFrom, timeout, this.client.getVersion(), requestId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, String startFrom, Integer timeout, String requestId, Context context) { - try { - 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, startFrom, 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 - * 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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, String startFrom, Integer timeout, String requestId) { - try { - return listBlobFlatSegmentWithResponse(containerName, prefix, marker, maxresults, include, startFrom, - 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 - * 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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, String startFrom, - Integer timeout, String requestId, Context context) { - try { - 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.listBlobFlatSegmentNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, - prefix, marker, maxresults, includeConverted, startFrom, timeout, this.client.getVersion(), requestId, - accept, context); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache - * Arrow use case so response is returned as raw to be deserialized by the client. - * - * @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://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). - * @param requestId Provides 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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> - listBlobFlatSegmentApacheArrowWithResponseAsync(String containerName, String prefix, String marker, - Integer maxresults, List include, Integer timeout, String startFrom, String endBefore, - String requestId) { - return FluxUtil - .withContext(context -> listBlobFlatSegmentApacheArrowWithResponseAsync(containerName, prefix, marker, - maxresults, include, timeout, startFrom, endBefore, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache - * Arrow use case so response is returned as raw to be deserialized by the client. - * - * @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://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). - * @param requestId Provides 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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> - listBlobFlatSegmentApacheArrowWithResponseAsync(String containerName, String prefix, String marker, - Integer maxresults, List include, Integer timeout, String startFrom, String endBefore, - String requestId, Context context) { - final String restype = "container"; - final String comp = "list"; - final String accept = "application/vnd.apache.arrow.stream,application/xml"; - String includeConverted = (include == null) - ? null - : include.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return service - .listBlobFlatSegmentApacheArrow(this.client.getUrl(), containerName, restype, comp, accept, prefix, marker, - maxresults, includeConverted, timeout, startFrom, endBefore, this.client.getVersion(), requestId, - context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache - * Arrow use case so response is returned as raw to be deserialized by the client. - * - * @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://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). - * @param requestId Provides 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 BlobStorageExceptionInternal 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 listBlobFlatSegmentApacheArrowAsync(String containerName, String prefix, String marker, - Integer maxresults, List include, Integer timeout, String startFrom, String endBefore, - String requestId) { - return listBlobFlatSegmentApacheArrowWithResponseAsync(containerName, prefix, marker, maxresults, include, - timeout, startFrom, endBefore, requestId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); - } - - /** - * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache - * Arrow use case so response is returned as raw to be deserialized by the client. - * - * @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://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). - * @param requestId Provides 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 BlobStorageExceptionInternal 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 listBlobFlatSegmentApacheArrowAsync(String containerName, String prefix, String marker, - Integer maxresults, List include, Integer timeout, String startFrom, String endBefore, - String requestId, Context context) { - return listBlobFlatSegmentApacheArrowWithResponseAsync(containerName, prefix, marker, maxresults, include, - timeout, startFrom, endBefore, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); - } - - /** - * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache - * Arrow use case so response is returned as raw to be deserialized by the client. - * - * @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://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). - * @param requestId Provides 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 BlobStorageExceptionInternal 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 listBlobFlatSegmentApacheArrowNoCustomHeadersWithResponseAsync(String containerName, - String prefix, String marker, Integer maxresults, List include, Integer timeout, - String startFrom, String endBefore, String requestId) { - return FluxUtil - .withContext(context -> listBlobFlatSegmentApacheArrowNoCustomHeadersWithResponseAsync(containerName, - prefix, marker, maxresults, include, timeout, startFrom, endBefore, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache - * Arrow use case so response is returned as raw to be deserialized by the client. - * - * @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://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). - * @param requestId Provides 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 BlobStorageExceptionInternal 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 listBlobFlatSegmentApacheArrowNoCustomHeadersWithResponseAsync(String containerName, - String prefix, String marker, Integer maxresults, List include, Integer timeout, - String startFrom, String endBefore, String requestId, Context context) { - final String restype = "container"; - final String comp = "list"; - final String accept = "application/vnd.apache.arrow.stream,application/xml"; - String includeConverted = (include == null) - ? null - : include.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return service - .listBlobFlatSegmentApacheArrowNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, accept, - prefix, marker, maxresults, includeConverted, timeout, startFrom, endBefore, this.client.getVersion(), - requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache - * Arrow use case so response is returned as raw to be deserialized by the client. - * - * @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://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). - * @param requestId Provides 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 BlobStorageExceptionInternal 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 - listBlobFlatSegmentApacheArrowWithResponse(String containerName, String prefix, String marker, - Integer maxresults, List include, Integer timeout, String startFrom, String endBefore, - String requestId, Context context) { - try { - final String restype = "container"; - final String comp = "list"; - final String accept = "application/vnd.apache.arrow.stream,application/xml"; - String includeConverted = (include == null) - ? null - : include.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return service.listBlobFlatSegmentApacheArrowSync(this.client.getUrl(), containerName, restype, comp, - accept, prefix, marker, maxresults, includeConverted, timeout, startFrom, endBefore, - this.client.getVersion(), requestId, context); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache - * Arrow use case so response is returned as raw to be deserialized by the client. - * - * @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://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). - * @param requestId Provides 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 BlobStorageExceptionInternal 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 listBlobFlatSegmentApacheArrow(String containerName, String prefix, String marker, - Integer maxresults, List include, Integer timeout, String startFrom, String endBefore, - String requestId) { - try { - return listBlobFlatSegmentApacheArrowWithResponse(containerName, prefix, marker, maxresults, include, - timeout, startFrom, endBefore, requestId, Context.NONE).getValue(); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * The List Blobs operation returns a list of the blobs under the specified container. This operation is for Apache - * Arrow use case so response is returned as raw to be deserialized by the client. - * - * @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://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). - * @param requestId Provides 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 BlobStorageExceptionInternal 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 listBlobFlatSegmentApacheArrowNoCustomHeadersWithResponse(String containerName, - String prefix, String marker, Integer maxresults, List include, Integer timeout, - String startFrom, String endBefore, String requestId, Context context) { - try { - final String restype = "container"; - final String comp = "list"; - final String accept = "application/vnd.apache.arrow.stream,application/xml"; - String includeConverted = (include == null) - ? null - : include.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return service.listBlobFlatSegmentApacheArrowNoCustomHeadersSync(this.client.getUrl(), containerName, - restype, comp, accept, prefix, marker, maxresults, includeConverted, timeout, startFrom, endBefore, - this.client.getVersion(), requestId, 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 - * 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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - listBlobHierarchySegmentWithResponseAsync(String containerName, String delimiter, String prefix, String marker, - Integer maxresults, List include, String startFrom, Integer timeout, - String requestId) { - return FluxUtil - .withContext(context -> listBlobHierarchySegmentWithResponseAsync(containerName, delimiter, prefix, marker, - maxresults, include, startFrom, timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - listBlobHierarchySegmentWithResponseAsync(String containerName, String delimiter, String prefix, String marker, - Integer maxresults, List include, String startFrom, 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 - .listBlobHierarchySegment(this.client.getUrl(), containerName, restype, comp, prefix, delimiter, marker, - maxresults, includeConverted, startFrom, timeout, this.client.getVersion(), requestId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, String startFrom, - Integer timeout, String requestId) { - return listBlobHierarchySegmentWithResponseAsync(containerName, delimiter, prefix, marker, maxresults, include, - startFrom, timeout, requestId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, String startFrom, - Integer timeout, String requestId, Context context) { - return listBlobHierarchySegmentWithResponseAsync(containerName, delimiter, prefix, marker, maxresults, include, - startFrom, timeout, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listBlobHierarchySegmentNoCustomHeadersWithResponseAsync( - String containerName, String delimiter, String prefix, String marker, Integer maxresults, - List include, String startFrom, Integer timeout, String requestId) { - return FluxUtil - .withContext(context -> listBlobHierarchySegmentNoCustomHeadersWithResponseAsync(containerName, delimiter, - prefix, marker, maxresults, include, startFrom, timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listBlobHierarchySegmentNoCustomHeadersWithResponseAsync( - String containerName, String delimiter, String prefix, String marker, Integer maxresults, - List include, String startFrom, 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, startFrom, timeout, this.client.getVersion(), - requestId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, String startFrom, Integer timeout, String requestId, - Context context) { - try { - 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.listBlobHierarchySegmentSync(this.client.getUrl(), containerName, restype, comp, prefix, - delimiter, marker, maxresults, includeConverted, startFrom, 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 - * 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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, String startFrom, - Integer timeout, String requestId) { - try { - return listBlobHierarchySegmentWithResponse(containerName, delimiter, prefix, marker, maxresults, include, - startFrom, 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 - * 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 startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, String startFrom, Integer timeout, String requestId, Context context) { - try { - 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, startFrom, 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. This operation is - * for Apache Arrow use case so response is returned as raw to be deserialized by the client. - * - * @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://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). - * @param requestId Provides 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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> - listBlobHierarchySegmentApacheArrowWithResponseAsync(String containerName, String delimiter, String prefix, - String marker, Integer maxresults, List include, Integer timeout, String startFrom, - String endBefore, String requestId) { - return FluxUtil - .withContext(context -> listBlobHierarchySegmentApacheArrowWithResponseAsync(containerName, delimiter, - prefix, marker, maxresults, include, timeout, startFrom, endBefore, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container. This operation is - * for Apache Arrow use case so response is returned as raw to be deserialized by the client. - * - * @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://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). - * @param requestId Provides 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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> - listBlobHierarchySegmentApacheArrowWithResponseAsync(String containerName, String delimiter, String prefix, - String marker, Integer maxresults, List include, Integer timeout, String startFrom, - String endBefore, String requestId, Context context) { - final String restype = "container"; - final String comp = "list"; - final String accept = "application/vnd.apache.arrow.stream,application/xml"; - String includeConverted = (include == null) - ? null - : include.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return service - .listBlobHierarchySegmentApacheArrow(this.client.getUrl(), containerName, restype, comp, accept, prefix, - delimiter, marker, maxresults, includeConverted, timeout, startFrom, endBefore, - this.client.getVersion(), requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container. This operation is - * for Apache Arrow use case so response is returned as raw to be deserialized by the client. - * - * @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://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). - * @param requestId Provides 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 BlobStorageExceptionInternal 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 listBlobHierarchySegmentApacheArrowAsync(String containerName, String delimiter, - String prefix, String marker, Integer maxresults, List include, Integer timeout, - String startFrom, String endBefore, String requestId) { - return listBlobHierarchySegmentApacheArrowWithResponseAsync(containerName, delimiter, prefix, marker, - maxresults, include, timeout, startFrom, endBefore, requestId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); - } - - /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container. This operation is - * for Apache Arrow use case so response is returned as raw to be deserialized by the client. - * - * @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://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). - * @param requestId Provides 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 BlobStorageExceptionInternal 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 listBlobHierarchySegmentApacheArrowAsync(String containerName, String delimiter, - String prefix, String marker, Integer maxresults, List include, Integer timeout, - String startFrom, String endBefore, String requestId, Context context) { - return listBlobHierarchySegmentApacheArrowWithResponseAsync(containerName, delimiter, prefix, marker, - maxresults, include, timeout, startFrom, endBefore, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMapMany(fluxByteBufferResponse -> fluxByteBufferResponse.getValue()); - } - - /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container. This operation is - * for Apache Arrow use case so response is returned as raw to be deserialized by the client. - * - * @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://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). - * @param requestId Provides 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 BlobStorageExceptionInternal 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 listBlobHierarchySegmentApacheArrowNoCustomHeadersWithResponseAsync( - String containerName, String delimiter, String prefix, String marker, Integer maxresults, - List include, Integer timeout, String startFrom, String endBefore, String requestId) { - return FluxUtil - .withContext(context -> listBlobHierarchySegmentApacheArrowNoCustomHeadersWithResponseAsync(containerName, - delimiter, prefix, marker, maxresults, include, timeout, startFrom, endBefore, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container. This operation is - * for Apache Arrow use case so response is returned as raw to be deserialized by the client. - * - * @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://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). - * @param requestId Provides 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 BlobStorageExceptionInternal 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 listBlobHierarchySegmentApacheArrowNoCustomHeadersWithResponseAsync( - String containerName, String delimiter, String prefix, String marker, Integer maxresults, - List include, Integer timeout, String startFrom, String endBefore, String requestId, - Context context) { - final String restype = "container"; - final String comp = "list"; - final String accept = "application/vnd.apache.arrow.stream,application/xml"; - String includeConverted = (include == null) - ? null - : include.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return service - .listBlobHierarchySegmentApacheArrowNoCustomHeaders(this.client.getUrl(), containerName, restype, comp, - accept, prefix, delimiter, marker, maxresults, includeConverted, timeout, startFrom, endBefore, - this.client.getVersion(), requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container. This operation is - * for Apache Arrow use case so response is returned as raw to be deserialized by the client. - * - * @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://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). - * @param requestId Provides 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 BlobStorageExceptionInternal 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 - listBlobHierarchySegmentApacheArrowWithResponse(String containerName, String delimiter, String prefix, - String marker, Integer maxresults, List include, Integer timeout, String startFrom, - String endBefore, String requestId, Context context) { - try { - final String restype = "container"; - final String comp = "list"; - final String accept = "application/vnd.apache.arrow.stream,application/xml"; - String includeConverted = (include == null) - ? null - : include.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return service.listBlobHierarchySegmentApacheArrowSync(this.client.getUrl(), containerName, restype, comp, - accept, prefix, delimiter, marker, maxresults, includeConverted, timeout, startFrom, endBefore, - this.client.getVersion(), requestId, context); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container. This operation is - * for Apache Arrow use case so response is returned as raw to be deserialized by the client. - * - * @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://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). - * @param requestId Provides 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 BlobStorageExceptionInternal 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 listBlobHierarchySegmentApacheArrow(String containerName, String delimiter, String prefix, - String marker, Integer maxresults, List include, Integer timeout, String startFrom, - String endBefore, String requestId) { - try { - return listBlobHierarchySegmentApacheArrowWithResponse(containerName, delimiter, prefix, marker, maxresults, - include, timeout, startFrom, endBefore, 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. This operation is - * for Apache Arrow use case so response is returned as raw to be deserialized by the client. - * - * @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://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting - * Timeouts for Blob Service Operations.</a>. - * @param startFrom Specifies the relative path to list paths from. For non-recursive list, only one entity level is - * supported; For recursive list, multiple entity levels are supported. (Inclusive). - * @param endBefore Specifies the relative path to end before list paths. (Exclusive). - * @param requestId Provides 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 BlobStorageExceptionInternal 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 listBlobHierarchySegmentApacheArrowNoCustomHeadersWithResponse(String containerName, - String delimiter, String prefix, String marker, Integer maxresults, List include, - Integer timeout, String startFrom, String endBefore, String requestId, Context context) { - try { - final String restype = "container"; - final String comp = "list"; - final String accept = "application/vnd.apache.arrow.stream,application/xml"; - String includeConverted = (include == null) - ? null - : include.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - return service.listBlobHierarchySegmentApacheArrowNoCustomHeadersSync(this.client.getUrl(), containerName, - restype, comp, accept, prefix, delimiter, marker, maxresults, includeConverted, timeout, startFrom, - endBefore, this.client.getVersion(), requestId, context); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> getAccountInfoWithResponseAsync(containerName, timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Context context) { - return getAccountInfoWithResponseAsync(containerName, timeout, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext( - context -> getAccountInfoNoCustomHeadersWithResponseAsync(containerName, timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, - Integer timeout, String requestId, Context context) { - try { - final String restype = "account"; - final String comp = "properties"; - final String accept = "application/xml"; - return service.getAccountInfoSync(this.client.getUrl(), containerName, restype, comp, timeout, - this.client.getVersion(), requestId, accept, context); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Integer timeout, String requestId) { - getAccountInfoWithResponse(containerName, timeout, requestId, Context.NONE); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + .withContext(context -> service.getAccountInfo(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Returns information about the storage account. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-sku-nameStringThe SKU name of the account.
x-ms-account-kindStringThe account kind.
x-ms-is-hns-enabledbooleanIndicates if the account has a hierarchical namespace + * enabled.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAccountInfoNoCustomHeadersWithResponse(String containerName, Integer timeout, - String requestId, Context context) { - try { - final String restype = "account"; - final String comp = "properties"; - final String accept = "application/xml"; - return service.getAccountInfoNoCustomHeadersSync(this.client.getUrl(), containerName, restype, comp, - timeout, this.client.getVersion(), requestId, accept, context); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * The Create Session operation enables users to create a session scoped to a container. - * - * @param containerName The container name. - * @param createSessionConfiguration The createSessionConfiguration parameter. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> createSessionWithResponseAsync(String containerName, - CreateSessionConfiguration createSessionConfiguration, Integer timeout, String requestId) { - return FluxUtil - .withContext(context -> createSessionWithResponseAsync(containerName, createSessionConfiguration, timeout, - requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * The Create Session operation enables users to create a session scoped to a container. - * - * @param containerName The container name. - * @param createSessionConfiguration The createSessionConfiguration parameter. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> createSessionWithResponseAsync(String containerName, - CreateSessionConfiguration createSessionConfiguration, Integer timeout, String requestId, Context context) { - final String restype = "container"; - final String comp = "session"; - final String accept = "application/xml"; - return service - .createSession(this.client.getUrl(), containerName, restype, comp, timeout, this.client.getVersion(), - requestId, createSessionConfiguration, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * The Create Session operation enables users to create a session scoped to a container. - * - * @param containerName The container name. - * @param createSessionConfiguration The createSessionConfiguration parameter. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 createSessionAsync(String containerName, - CreateSessionConfiguration createSessionConfiguration, Integer timeout, String requestId) { - return createSessionWithResponseAsync(containerName, createSessionConfiguration, timeout, requestId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * The Create Session operation enables users to create a session scoped to a container. - * - * @param containerName The container name. - * @param createSessionConfiguration The createSessionConfiguration parameter. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 createSessionAsync(String containerName, - CreateSessionConfiguration createSessionConfiguration, Integer timeout, String requestId, Context context) { - return createSessionWithResponseAsync(containerName, createSessionConfiguration, timeout, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * The Create Session operation enables users to create a session scoped to a container. - * - * @param containerName The container name. - * @param createSessionConfiguration The createSessionConfiguration parameter. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 createSessionWithResponse(String containerName, - CreateSessionConfiguration createSessionConfiguration, Integer timeout, String requestId, Context context) { - try { - final String restype = "container"; - final String comp = "session"; - final String accept = "application/xml"; - return service.createSessionSync(this.client.getUrl(), containerName, restype, comp, timeout, - this.client.getVersion(), requestId, createSessionConfiguration, accept, context); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * The Create Session operation enables users to create a session scoped to a container. - * - * @param containerName The container name. - * @param createSessionConfiguration The createSessionConfiguration parameter. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 CreateSessionResponse createSession(String containerName, - CreateSessionConfiguration createSessionConfiguration, Integer timeout, String requestId) { + public Response getAccountInfoWithResponseInternal(RequestOptions requestOptions) { try { - return createSessionWithResponse(containerName, createSessionConfiguration, timeout, requestId, - Context.NONE).getValue(); - } catch (BlobStorageExceptionInternal internalException) { + return service.getAccountInfoSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobAsyncClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobAsyncClientInternal.java new file mode 100644 index 0000000000000..15f0482e6500d --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobAsyncClientInternal.java @@ -0,0 +1,2670 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.RequestConditions; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; +import com.azure.core.util.Base64Util; +import com.azure.core.util.BinaryData; +import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.serializer.ObjectSerializer; +import com.azure.storage.blob.implementation.models.BlobStorageErrorException; +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.PageBlobsSetSequenceNumberHeaders; +import com.azure.storage.blob.implementation.models.PageBlobsUploadPagesFromUrlHeaders; +import com.azure.storage.blob.implementation.models.PageBlobsUploadPagesHeaders; +import com.azure.storage.blob.implementation.models.PremiumPageBlobAccessTier; +import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; +import com.azure.storage.blob.models.EncryptionAlgorithmType; +import com.azure.storage.blob.models.FileShareTokenIntent; +import com.azure.storage.blob.models.PageList; +import com.azure.storage.blob.models.SequenceNumberActionType; +import java.time.OffsetDateTime; +import java.util.Map; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous AzureBlobStorage type. + */ +public final class PageBlobAsyncClientInternal { + @Generated + private static final ObjectSerializer XML_SERIALIZER = XmlSerializerProviders.createInstance(); + + @Generated + private final PageBlobsImpl serviceClient; + + /** + * Initializes an instance of PageBlobAsyncClientInternal class. + * + * @param serviceClient the service client implementation. + */ + @Generated + public PageBlobAsyncClientInternal(PageBlobsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Creates a new page blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-access-tierStringNoIndicates the tier to be set on the page blob. Allowed + * values: "P4", "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80".
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-blob-sequence-numberLongNoA value that can be used to track the request. + * The value of the sequence number must be between 0 and 2^63 - 1.
x-ms-tagsStringNoThe blob tags.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> createWithResponseInternal(long size, RequestOptions requestOptions) { + return this.serviceClient.createWithResponseInternalAsync(size, requestOptions); + } + + /** + * Writes a range of pages to the specified page blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-if-sequence-number-leLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than or equal to the specified.
x-ms-if-sequence-number-ltLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than the specified.
x-ms-if-sequence-number-eqLongNoSpecify this value to operate only on a blob + * if it has the specified sequence number.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-structured-bodyStringNoRequired if the request body is a structured + * message. Specifies the message schema version and properties.
x-ms-structured-content-lengthLongNoRequired if the request body is a + * structured message. Specifies the length of the blob/file content inside the message body. Will always be smaller + * than Content-Length.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-structured-bodyStringIndicates if the response body contains a structured message + * and specifies the message schema version and properties.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param contentLength The length of the request. + * @param range Specifies the range of the blob to operate on. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> uploadPagesWithResponseInternal(long contentLength, String range, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.uploadPagesWithResponseInternalAsync(contentLength, range, body, requestOptions); + } + + /** + * Clears a range of pages from the specified page blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-if-sequence-number-leLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than or equal to the specified.
x-ms-if-sequence-number-ltLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than the specified.
x-ms-if-sequence-number-eqLongNoSpecify this value to operate only on a blob + * if it has the specified sequence number.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param range Specifies the range of the blob to operate on. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> clearPagesWithResponseInternal(String range, RequestOptions requestOptions) { + return this.serviceClient.clearPagesWithResponseInternalAsync(range, requestOptions); + } + + /** + * Writes a range of pages to the specified page blob where the contents are read from a URL. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-source-content-md5byte[]NoSpecifies the MD5 hash calculated for the range + * of bytes that must be read from the copy source.
x-ms-source-content-crc64byte[]NoSpecifies the CRC64 calculated for the range + * of bytes that must be read from the source.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-if-sequence-number-leLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than or equal to the specified.
x-ms-if-sequence-number-ltLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than the specified.
x-ms-if-sequence-number-eqLongNoSpecify this value to operate only on a blob + * if it has the specified sequence number.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is + * supported, and the value must be a valid OAuth access token for the copy source.
x-ms-file-request-intentStringNoSpecifies the file request token intent. + * Allowed values: "backup".
x-ms-source-encryption-keyStringNoSpecifies the encryption key to use to + * decrypt the source data provided in the request.
x-ms-source-encryption-key-sha256StringNoThe SHA-256 hash of the provided + * source encryption key. Must be provided if the source encryption key is provided.
x-ms-source-encryption-algorithmStringNoThe algorithm used to produce the + * source encryption key hash. Must be provided if the source encryption key is provided. Allowed values: + * "AES256".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param sourceUrl Specifies the URL of the source. + * @param sourceRange Specifies the bytes of the source. + * @param contentLength The length of the request. + * @param range Specifies the range of the blob to operate on. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> uploadPagesFromUrlWithResponseInternal(String sourceUrl, String sourceRange, + long contentLength, String range, RequestOptions requestOptions) { + return this.serviceClient.uploadPagesFromUrlWithResponseInternalAsync(sourceUrl, sourceRange, contentLength, + range, requestOptions); + } + + /** + * Returns the list of valid page ranges for the specified page blob. + *

Query Parameters

+ * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
RangeStringNoSpecifies the range of the blob to operate on.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     PageRange (Optional): [
+     *          (Optional){
+     *             Start: long (Required)
+     *             End: long (Required)
+     *         }
+     *     ]
+     *     ClearRange (Optional): [
+     *          (Optional){
+     *             Start: long (Required)
+     *             End: long (Required)
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
ETagStringAn opaque identifier for the current state of the resource.
x-ms-blob-content-lengthlongThe size of the blob in bytes.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the Get Pages API along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getPageRangesWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getPageRangesWithResponseInternalAsync(requestOptions); + } + + /** + * Returns the list of page ranges in the diff between the specified page blob and the specified previous snapshot. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
prevsnapshotStringNoSpecifies the previous snapshot to be compared in the + * diff.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-previous-snapshot-urlStringNoSpecifies the previous snapshot URL to be + * compared in the diff.
RangeStringNoSpecifies the range of the blob to operate on.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     PageRange (Optional): [
+     *          (Optional){
+     *             Start: long (Required)
+     *             End: long (Required)
+     *         }
+     *     ]
+     *     ClearRange (Optional): [
+     *          (Optional){
+     *             Start: long (Required)
+     *             End: long (Required)
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
ETagStringAn opaque identifier for the current state of the resource.
x-ms-blob-content-lengthlongThe size of the blob in bytes.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the Get Pages API along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getPageRangesDiffWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getPageRangesDiffWithResponseInternalAsync(requestOptions); + } + + /** + * Changes the size of the specified page blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> resizeWithResponseInternal(long size, RequestOptions requestOptions) { + return this.serviceClient.resizeWithResponseInternalAsync(size, requestOptions); + } + + /** + * Updates the sequence number of the specified page blob. The operation will fail if the specified sequence number + * is less than the current sequence number of the blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-blob-sequence-numberLongNoA value that can be used to track the request. + * The value of the sequence number must be between 0 and 2^63 - 1.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param sequenceNumberAction Required if the blob sequence number is provided. This property indicates how the + * service should modify the blob's sequence number. Allowed values: "increment", "max", "update". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> setSequenceNumberWithResponseInternal(String sequenceNumberAction, + RequestOptions requestOptions) { + return this.serviceClient.setSequenceNumberWithResponseInternalAsync(sequenceNumberAction, requestOptions); + } + + /** + * 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. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-statusStringStatus of the copy operation.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> copyIncrementalWithResponseInternal(String copySource, RequestOptions requestOptions) { + return this.serviceClient.copyIncrementalWithResponseInternalAsync(copySource, requestOptions); + } + + /** + * Creates a new page blob. + * + * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. + * @param metadata The metadata headers. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 Indicates the tier to be set on the page blob. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobSequenceNumber A value that can be used to track the request. The value of the sequence number must be + * between 0 and 2^63 - 1. + * @param blobTagsString The blob tags. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createWithResponse(long size, Map metadata, + Integer timeout, PremiumPageBlobAccessTier tier, String blobContentType, String blobContentEncoding, + String blobContentLanguage, byte[] blobContentMd5, String blobCacheControl, String leaseId, + String blobContentDisposition, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String ifTags, Long blobSequenceNumber, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, RequestConditions requestConditions, + RequestOptions requestOptions) { + // Generated convenience method for createWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (tier != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (blobContentType != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentEncoding != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (blobContentMd5 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (blobCacheControl != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (leaseId != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (encryptionKey != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobSequenceNumber != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-sequence-number"), + String.valueOf(blobSequenceNumber)); + } + if (blobTagsString != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (immutabilityPolicyExpiry != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (ifModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return createWithResponseInternal(size, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new PageBlobsCreateHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Creates a new page blob. + * + * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. + * @param metadata The metadata headers. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 Indicates the tier to be set on the page blob. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobSequenceNumber A value that can be used to track the request. The value of the sequence number must be + * between 0 and 2^63 - 1. + * @param blobTagsString The blob tags. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono create(long size, Map metadata, Integer timeout, PremiumPageBlobAccessTier tier, + String blobContentType, String blobContentEncoding, String blobContentLanguage, byte[] blobContentMd5, + String blobCacheControl, String leaseId, String blobContentDisposition, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String ifTags, + Long blobSequenceNumber, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, RequestConditions requestConditions) { + // Generated convenience method for createWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (tier != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (blobContentType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentEncoding != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (blobContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (blobCacheControl != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobSequenceNumber != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-sequence-number"), + String.valueOf(blobSequenceNumber)); + } + if (blobTagsString != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (immutabilityPolicyExpiry != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return createWithResponseInternal(size, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Creates a new page blob. + * + * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono create(long size) { + // Generated convenience method for createWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return createWithResponseInternal(size, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Writes a range of pages to the specified page blob. + * + * @param contentLength The length of the request. + * @param range Specifies the range of the blob to operate on. + * @param body The body of the request. + * @param transactionalContentMd5 Specifies the transactional MD5 hash for the body. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifSequenceNumberLessThanOrEqualTo Specify this value to operate only on a blob if it has a sequence number + * less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this value to operate only on a blob if it has a sequence number less + * than the specified. + * @param ifSequenceNumberEqualTo Specify this value to operate only on a blob if it has the specified sequence + * number. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema + * version and properties. + * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the + * blob/file content inside the message body. Will always be smaller than Content-Length. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> uploadPagesWithResponse(long contentLength, + String range, BinaryData body, byte[] transactionalContentMd5, byte[] transactionalContentCrc64, + Integer timeout, String leaseId, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, Long ifSequenceNumberLessThanOrEqualTo, + Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, String ifTags, String structuredBodyType, + Long structuredContentLength, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for uploadPagesWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (transactionalContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifSequenceNumberLessThanOrEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-le"), + String.valueOf(ifSequenceNumberLessThanOrEqualTo)); + } + if (ifSequenceNumberLessThan != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-lt"), + String.valueOf(ifSequenceNumberLessThan)); + } + if (ifSequenceNumberEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-eq"), + String.valueOf(ifSequenceNumberEqualTo)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (structuredBodyType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-body"), structuredBodyType); + } + if (structuredContentLength != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-content-length"), + String.valueOf(structuredContentLength)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return uploadPagesWithResponseInternal(contentLength, range, body, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new PageBlobsUploadPagesHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Writes a range of pages to the specified page blob. + * + * @param contentLength The length of the request. + * @param range Specifies the range of the blob to operate on. + * @param body The body of the request. + * @param transactionalContentMd5 Specifies the transactional MD5 hash for the body. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifSequenceNumberLessThanOrEqualTo Specify this value to operate only on a blob if it has a sequence number + * less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this value to operate only on a blob if it has a sequence number less + * than the specified. + * @param ifSequenceNumberEqualTo Specify this value to operate only on a blob if it has the specified sequence + * number. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema + * version and properties. + * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the + * blob/file content inside the message body. Will always be smaller than Content-Length. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono uploadPages(long contentLength, String range, BinaryData body, byte[] transactionalContentMd5, + byte[] transactionalContentCrc64, Integer timeout, String leaseId, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, + Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, + String ifTags, String structuredBodyType, Long structuredContentLength, RequestConditions requestConditions) { + // Generated convenience method for uploadPagesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (transactionalContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifSequenceNumberLessThanOrEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-le"), + String.valueOf(ifSequenceNumberLessThanOrEqualTo)); + } + if (ifSequenceNumberLessThan != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-lt"), + String.valueOf(ifSequenceNumberLessThan)); + } + if (ifSequenceNumberEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-eq"), + String.valueOf(ifSequenceNumberEqualTo)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (structuredBodyType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-body"), structuredBodyType); + } + if (structuredContentLength != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-content-length"), + String.valueOf(structuredContentLength)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return uploadPagesWithResponseInternal(contentLength, range, body, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Writes a range of pages to the specified page blob. + * + * @param contentLength The length of the request. + * @param range Specifies the range of the blob to operate on. + * @param body The body of the request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono uploadPages(long contentLength, String range, BinaryData body) { + // Generated convenience method for uploadPagesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return uploadPagesWithResponseInternal(contentLength, range, body, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Clears a range of pages from the specified page blob. + * + * @param range Specifies the range of the blob to operate on. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifSequenceNumberLessThanOrEqualTo Specify this value to operate only on a blob if it has a sequence number + * less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this value to operate only on a blob if it has a sequence number less + * than the specified. + * @param ifSequenceNumberEqualTo Specify this value to operate only on a blob if it has the specified sequence + * number. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> clearPagesWithResponse(String range, Integer timeout, + String leaseId, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + String encryptionScope, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, + Long ifSequenceNumberEqualTo, String ifTags, RequestConditions requestConditions, + RequestOptions requestOptions) { + // Generated convenience method for clearPagesWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifSequenceNumberLessThanOrEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-le"), + String.valueOf(ifSequenceNumberLessThanOrEqualTo)); + } + if (ifSequenceNumberLessThan != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-lt"), + String.valueOf(ifSequenceNumberLessThan)); + } + if (ifSequenceNumberEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-eq"), + String.valueOf(ifSequenceNumberEqualTo)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return clearPagesWithResponseInternal(range, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new PageBlobsClearPagesHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Clears a range of pages from the specified page blob. + * + * @param range Specifies the range of the blob to operate on. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifSequenceNumberLessThanOrEqualTo Specify this value to operate only on a blob if it has a sequence number + * less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this value to operate only on a blob if it has a sequence number less + * than the specified. + * @param ifSequenceNumberEqualTo Specify this value to operate only on a blob if it has the specified sequence + * number. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono clearPages(String range, Integer timeout, String leaseId, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, + Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, + String ifTags, RequestConditions requestConditions) { + // Generated convenience method for clearPagesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifSequenceNumberLessThanOrEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-le"), + String.valueOf(ifSequenceNumberLessThanOrEqualTo)); + } + if (ifSequenceNumberLessThan != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-lt"), + String.valueOf(ifSequenceNumberLessThan)); + } + if (ifSequenceNumberEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-eq"), + String.valueOf(ifSequenceNumberEqualTo)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return clearPagesWithResponseInternal(range, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Clears a range of pages from the specified page blob. + * + * @param range Specifies the range of the blob to operate on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono clearPages(String range) { + // Generated convenience method for clearPagesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return clearPagesWithResponseInternal(range, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Writes a range of pages to the specified page blob where the contents are read from a URL. + * + * @param sourceUrl Specifies the URL of the source. + * @param sourceRange Specifies the bytes of the source. + * @param contentLength The length of the request. + * @param range Specifies the range of the blob to operate on. + * @param sourceContentMd5 Specifies the MD5 hash calculated for the range of bytes that must be read from the copy + * source. + * @param sourceContentCrc64 Specifies the CRC64 calculated for the range of bytes that must be read from the + * 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 encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this value to operate only on a blob if it has a sequence number + * less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this value to operate only on a blob if it has a sequence number less + * than the specified. + * @param ifSequenceNumberEqualTo Specify this value to operate only on a blob if it has the specified sequence + * number. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param copySourceAuthorization Only the Bearer authorization scheme is supported, and the value must be a valid + * OAuth access token for the copy source. + * @param fileRequestIntent Specifies the file request token intent. + * @param sourceEncryptionKey Specifies the encryption key to use to decrypt the source data provided in the + * request. + * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the + * source encryption key is provided. + * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Must be provided + * if the source encryption key is provided. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> uploadPagesFromUrlWithResponse(String sourceUrl, + String sourceRange, long contentLength, String range, byte[] sourceContentMd5, byte[] sourceContentCrc64, + Integer timeout, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + String encryptionScope, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, + Long ifSequenceNumberEqualTo, String ifTags, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, + String copySourceAuthorization, FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, + String sourceEncryptionKeySha256, EncryptionAlgorithmType sourceEncryptionAlgorithm, + RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for uploadPagesFromUrlWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (sourceContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-md5"), + Base64Util.encodeToString(sourceContentMd5)); + } + if (sourceContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-crc64"), + Base64Util.encodeToString(sourceContentCrc64)); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifSequenceNumberLessThanOrEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-le"), + String.valueOf(ifSequenceNumberLessThanOrEqualTo)); + } + if (ifSequenceNumberLessThan != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-lt"), + String.valueOf(ifSequenceNumberLessThan)); + } + if (ifSequenceNumberEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-eq"), + String.valueOf(ifSequenceNumberEqualTo)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (sourceIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (copySourceAuthorization != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-authorization"), + copySourceAuthorization); + } + if (fileRequestIntent != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-file-request-intent"), + fileRequestIntent.toString()); + } + if (sourceEncryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key"), sourceEncryptionKey); + } + if (sourceEncryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key-sha256"), + sourceEncryptionKeySha256); + } + if (sourceEncryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-algorithm"), + sourceEncryptionAlgorithm.toString()); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return uploadPagesFromUrlWithResponseInternal(sourceUrl, sourceRange, contentLength, range, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new PageBlobsUploadPagesFromUrlHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Writes a range of pages to the specified page blob where the contents are read from a URL. + * + * @param sourceUrl Specifies the URL of the source. + * @param sourceRange Specifies the bytes of the source. + * @param contentLength The length of the request. + * @param range Specifies the range of the blob to operate on. + * @param sourceContentMd5 Specifies the MD5 hash calculated for the range of bytes that must be read from the copy + * source. + * @param sourceContentCrc64 Specifies the CRC64 calculated for the range of bytes that must be read from the + * 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 encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this value to operate only on a blob if it has a sequence number + * less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this value to operate only on a blob if it has a sequence number less + * than the specified. + * @param ifSequenceNumberEqualTo Specify this value to operate only on a blob if it has the specified sequence + * number. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param copySourceAuthorization Only the Bearer authorization scheme is supported, and the value must be a valid + * OAuth access token for the copy source. + * @param fileRequestIntent Specifies the file request token intent. + * @param sourceEncryptionKey Specifies the encryption key to use to decrypt the source data provided in the + * request. + * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the + * source encryption key is provided. + * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Must be provided + * if the source encryption key is provided. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono uploadPagesFromUrl(String sourceUrl, String sourceRange, long contentLength, String range, + byte[] sourceContentMd5, byte[] sourceContentCrc64, Integer timeout, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String leaseId, + Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String copySourceAuthorization, + FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, + EncryptionAlgorithmType sourceEncryptionAlgorithm, RequestConditions requestConditions) { + // Generated convenience method for uploadPagesFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (sourceContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-md5"), + Base64Util.encodeToString(sourceContentMd5)); + } + if (sourceContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-crc64"), + Base64Util.encodeToString(sourceContentCrc64)); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifSequenceNumberLessThanOrEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-le"), + String.valueOf(ifSequenceNumberLessThanOrEqualTo)); + } + if (ifSequenceNumberLessThan != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-lt"), + String.valueOf(ifSequenceNumberLessThan)); + } + if (ifSequenceNumberEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-eq"), + String.valueOf(ifSequenceNumberEqualTo)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (sourceIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (copySourceAuthorization != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-authorization"), + copySourceAuthorization); + } + if (fileRequestIntent != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-file-request-intent"), + fileRequestIntent.toString()); + } + if (sourceEncryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key"), sourceEncryptionKey); + } + if (sourceEncryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key-sha256"), + sourceEncryptionKeySha256); + } + if (sourceEncryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-algorithm"), + sourceEncryptionAlgorithm.toString()); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return uploadPagesFromUrlWithResponseInternal(sourceUrl, sourceRange, contentLength, range, requestOptions) + .flatMap(FluxUtil::toMono); + } + + /** + * Writes a range of pages to the specified page blob where the contents are read from a URL. + * + * @param sourceUrl Specifies the URL of the source. + * @param sourceRange Specifies the bytes of the source. + * @param contentLength The length of the request. + * @param range Specifies the range of the blob to operate on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono uploadPagesFromUrl(String sourceUrl, String sourceRange, long contentLength, String range) { + // Generated convenience method for uploadPagesFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return uploadPagesFromUrlWithResponseInternal(sourceUrl, sourceRange, contentLength, range, requestOptions) + .flatMap(FluxUtil::toMono); + } + + /** + * Returns the list of valid page ranges for the specified page blob. + * + * @param snapshot Specifies the snapshot of 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 range Specifies the range of the blob to operate on. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Get Pages API along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getPageRangesWithResponse(String snapshot, + Integer timeout, String range, String leaseId, String ifTags, String marker, Integer maxresults, + RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for getPageRangesWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (range != null) { + requestOptions.setHeader(HttpHeaderName.RANGE, range); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return getPageRangesWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(PageList.class, XML_SERIALIZER), + new PageBlobsGetPageRangesHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Returns the list of valid page ranges for the specified page blob. + * + * @param snapshot Specifies the snapshot of 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 range Specifies the range of the blob to operate on. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Get Pages API on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getPageRanges(String snapshot, Integer timeout, String range, String leaseId, String ifTags, + String marker, Integer maxresults, RequestConditions requestConditions) { + // Generated convenience method for getPageRangesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (range != null) { + requestOptions.setHeader(HttpHeaderName.RANGE, range); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return getPageRangesWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(PageList.class, XML_SERIALIZER)); + } + + /** + * Returns the list of valid page ranges for the specified page blob. + * + * @throws BlobStorageErrorException 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 the Get Pages API on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getPageRanges() { + // Generated convenience method for getPageRangesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getPageRangesWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(PageList.class, XML_SERIALIZER)); + } + + /** + * Returns the list of page ranges in the diff between the specified page blob and the specified previous snapshot. + * + * @param snapshot Specifies the snapshot of 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 prevsnapshot Specifies the previous snapshot to be compared in the diff. + * @param prevSnapshotUrl Specifies the previous snapshot URL to be compared in the diff. + * @param range Specifies the range of the blob to operate on. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Get Pages API along with {@link ResponseBase} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getPageRangesDiffWithResponse( + String snapshot, Integer timeout, String prevsnapshot, String prevSnapshotUrl, String range, String leaseId, + String ifTags, String marker, Integer maxresults, RequestConditions requestConditions, + RequestOptions requestOptions) { + // Generated convenience method for getPageRangesDiffWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (prevsnapshot != null) { + requestOptions.addQueryParam("prevsnapshot", prevsnapshot, false); + } + if (prevSnapshotUrl != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-previous-snapshot-url"), prevSnapshotUrl); + } + if (range != null) { + requestOptions.setHeader(HttpHeaderName.RANGE, range); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return getPageRangesDiffWithResponseInternal(requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(PageList.class, XML_SERIALIZER), + new PageBlobsGetPageRangesDiffHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Returns the list of page ranges in the diff between the specified page blob and the specified previous snapshot. + * + * @param snapshot Specifies the snapshot of 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 prevsnapshot Specifies the previous snapshot to be compared in the diff. + * @param prevSnapshotUrl Specifies the previous snapshot URL to be compared in the diff. + * @param range Specifies the range of the blob to operate on. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Get Pages API on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getPageRangesDiff(String snapshot, Integer timeout, String prevsnapshot, + String prevSnapshotUrl, String range, String leaseId, String ifTags, String marker, Integer maxresults, + RequestConditions requestConditions) { + // Generated convenience method for getPageRangesDiffWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (prevsnapshot != null) { + requestOptions.addQueryParam("prevsnapshot", prevsnapshot, false); + } + if (prevSnapshotUrl != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-previous-snapshot-url"), prevSnapshotUrl); + } + if (range != null) { + requestOptions.setHeader(HttpHeaderName.RANGE, range); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return getPageRangesDiffWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(PageList.class, XML_SERIALIZER)); + } + + /** + * Returns the list of page ranges in the diff between the specified page blob and the specified previous snapshot. + * + * @throws BlobStorageErrorException 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 the Get Pages API on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getPageRangesDiff() { + // Generated convenience method for getPageRangesDiffWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getPageRangesDiffWithResponseInternal(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(PageList.class, XML_SERIALIZER)); + } + + /** + * Changes the size of the specified page blob. + * + * @param size The maximum size for the page blob. 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 encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> resizeWithResponse(long size, Integer timeout, + String leaseId, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + String encryptionScope, String ifTags, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for resizeWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return resizeWithResponseInternal(size, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new PageBlobsResizeHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Changes the size of the specified page blob. + * + * @param size The maximum size for the page blob. 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 encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono resize(long size, Integer timeout, String leaseId, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String ifTags, + RequestConditions requestConditions) { + // Generated convenience method for resizeWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return resizeWithResponseInternal(size, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Changes the size of the specified page blob. + * + * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono resize(long size) { + // Generated convenience method for resizeWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return resizeWithResponseInternal(size, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Updates the sequence number of the specified page blob. The operation will fail if the specified sequence number + * is less than the current sequence number of the blob. + * + * @param sequenceNumberAction Required if the blob sequence number is provided. 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 ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobSequenceNumber A value that can be used to track the request. The value of the sequence number must be + * between 0 and 2^63 - 1. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> setSequenceNumberWithResponse( + SequenceNumberActionType sequenceNumberAction, Integer timeout, String leaseId, String ifTags, + Long blobSequenceNumber, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for setSequenceNumberWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobSequenceNumber != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-sequence-number"), + String.valueOf(blobSequenceNumber)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return setSequenceNumberWithResponseInternal(sequenceNumberAction.toString(), requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new PageBlobsSetSequenceNumberHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * Updates the sequence number of the specified page blob. The operation will fail if the specified sequence number + * is less than the current sequence number of the blob. + * + * @param sequenceNumberAction Required if the blob sequence number is provided. 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 ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobSequenceNumber A value that can be used to track the request. The value of the sequence number must be + * between 0 and 2^63 - 1. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setSequenceNumber(SequenceNumberActionType sequenceNumberAction, Integer timeout, String leaseId, + String ifTags, Long blobSequenceNumber, RequestConditions requestConditions) { + // Generated convenience method for setSequenceNumberWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobSequenceNumber != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-sequence-number"), + String.valueOf(blobSequenceNumber)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return setSequenceNumberWithResponseInternal(sequenceNumberAction.toString(), requestOptions) + .flatMap(FluxUtil::toMono); + } + + /** + * Updates the sequence number of the specified page blob. The operation will fail if the specified sequence number + * is less than the current sequence number of the blob. + * + * @param sequenceNumberAction Required if the blob sequence number is provided. This property indicates how the + * service should modify the blob's sequence number. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setSequenceNumber(SequenceNumberActionType sequenceNumberAction) { + // Generated convenience method for setSequenceNumberWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return setSequenceNumberWithResponseInternal(sequenceNumberAction.toString(), requestOptions) + .flatMap(FluxUtil::toMono); + } + + /** + * 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. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> copyIncrementalWithResponse(String copySource, + Integer timeout, String ifTags, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for copyIncrementalWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return copyIncrementalWithResponseInternal(copySource, requestOptions) + .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), + protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), null, + new PageBlobsCopyIncrementalHeaders(protocolMethodResponse.getHeaders()))); + } + + /** + * 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. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono copyIncremental(String copySource, Integer timeout, String ifTags, + RequestConditions requestConditions) { + // Generated convenience method for copyIncrementalWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return copyIncrementalWithResponseInternal(copySource, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * 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. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono copyIncremental(String copySource) { + // Generated convenience method for copyIncrementalWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return copyIncrementalWithResponseInternal(copySource, requestOptions).flatMap(FluxUtil::toMono); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobClientInternal.java new file mode 100644 index 0000000000000..ed80f518ed8aa --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobClientInternal.java @@ -0,0 +1,2647 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.RequestConditions; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.ResponseBase; +import com.azure.core.util.Base64Util; +import com.azure.core.util.BinaryData; +import com.azure.core.util.DateTimeRfc1123; +import com.azure.core.util.serializer.ObjectSerializer; +import com.azure.storage.blob.implementation.models.BlobStorageErrorException; +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.PageBlobsSetSequenceNumberHeaders; +import com.azure.storage.blob.implementation.models.PageBlobsUploadPagesFromUrlHeaders; +import com.azure.storage.blob.implementation.models.PageBlobsUploadPagesHeaders; +import com.azure.storage.blob.implementation.models.PremiumPageBlobAccessTier; +import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; +import com.azure.storage.blob.models.EncryptionAlgorithmType; +import com.azure.storage.blob.models.FileShareTokenIntent; +import com.azure.storage.blob.models.PageList; +import com.azure.storage.blob.models.SequenceNumberActionType; +import java.time.OffsetDateTime; +import java.util.Map; + +/** + * Initializes a new instance of the synchronous AzureBlobStorage type. + */ +public final class PageBlobClientInternal { + @Generated + private static final ObjectSerializer XML_SERIALIZER = XmlSerializerProviders.createInstance(); + + @Generated + private final PageBlobsImpl serviceClient; + + /** + * Initializes an instance of PageBlobClientInternal class. + * + * @param serviceClient the service client implementation. + */ + @Generated + public PageBlobClientInternal(PageBlobsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Creates a new page blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-access-tierStringNoIndicates the tier to be set on the page blob. Allowed + * values: "P4", "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80".
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-blob-sequence-numberLongNoA value that can be used to track the request. + * The value of the sequence number must be between 0 and 2^63 - 1.
x-ms-tagsStringNoThe blob tags.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response createWithResponseInternal(long size, RequestOptions requestOptions) { + return this.serviceClient.createWithResponseInternal(size, requestOptions); + } + + /** + * Writes a range of pages to the specified page blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-if-sequence-number-leLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than or equal to the specified.
x-ms-if-sequence-number-ltLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than the specified.
x-ms-if-sequence-number-eqLongNoSpecify this value to operate only on a blob + * if it has the specified sequence number.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-structured-bodyStringNoRequired if the request body is a structured + * message. Specifies the message schema version and properties.
x-ms-structured-content-lengthLongNoRequired if the request body is a + * structured message. Specifies the length of the blob/file content inside the message body. Will always be smaller + * than Content-Length.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-structured-bodyStringIndicates if the response body contains a structured message + * and specifies the message schema version and properties.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param contentLength The length of the request. + * @param range Specifies the range of the blob to operate on. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response uploadPagesWithResponseInternal(long contentLength, String range, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.uploadPagesWithResponseInternal(contentLength, range, body, requestOptions); + } + + /** + * Clears a range of pages from the specified page blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-if-sequence-number-leLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than or equal to the specified.
x-ms-if-sequence-number-ltLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than the specified.
x-ms-if-sequence-number-eqLongNoSpecify this value to operate only on a blob + * if it has the specified sequence number.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param range Specifies the range of the blob to operate on. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response clearPagesWithResponseInternal(String range, RequestOptions requestOptions) { + return this.serviceClient.clearPagesWithResponseInternal(range, requestOptions); + } + + /** + * Writes a range of pages to the specified page blob where the contents are read from a URL. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-source-content-md5byte[]NoSpecifies the MD5 hash calculated for the range + * of bytes that must be read from the copy source.
x-ms-source-content-crc64byte[]NoSpecifies the CRC64 calculated for the range + * of bytes that must be read from the source.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-if-sequence-number-leLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than or equal to the specified.
x-ms-if-sequence-number-ltLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than the specified.
x-ms-if-sequence-number-eqLongNoSpecify this value to operate only on a blob + * if it has the specified sequence number.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is + * supported, and the value must be a valid OAuth access token for the copy source.
x-ms-file-request-intentStringNoSpecifies the file request token intent. + * Allowed values: "backup".
x-ms-source-encryption-keyStringNoSpecifies the encryption key to use to + * decrypt the source data provided in the request.
x-ms-source-encryption-key-sha256StringNoThe SHA-256 hash of the provided + * source encryption key. Must be provided if the source encryption key is provided.
x-ms-source-encryption-algorithmStringNoThe algorithm used to produce the + * source encryption key hash. Must be provided if the source encryption key is provided. Allowed values: + * "AES256".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param sourceUrl Specifies the URL of the source. + * @param sourceRange Specifies the bytes of the source. + * @param contentLength The length of the request. + * @param range Specifies the range of the blob to operate on. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response uploadPagesFromUrlWithResponseInternal(String sourceUrl, String sourceRange, long contentLength, + String range, RequestOptions requestOptions) { + return this.serviceClient.uploadPagesFromUrlWithResponseInternal(sourceUrl, sourceRange, contentLength, range, + requestOptions); + } + + /** + * Returns the list of valid page ranges for the specified page blob. + *

Query Parameters

+ * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
RangeStringNoSpecifies the range of the blob to operate on.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     PageRange (Optional): [
+     *          (Optional){
+     *             Start: long (Required)
+     *             End: long (Required)
+     *         }
+     *     ]
+     *     ClearRange (Optional): [
+     *          (Optional){
+     *             Start: long (Required)
+     *             End: long (Required)
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
ETagStringAn opaque identifier for the current state of the resource.
x-ms-blob-content-lengthlongThe size of the blob in bytes.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the Get Pages API along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPageRangesWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getPageRangesWithResponseInternal(requestOptions); + } + + /** + * Returns the list of page ranges in the diff between the specified page blob and the specified previous snapshot. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
prevsnapshotStringNoSpecifies the previous snapshot to be compared in the + * diff.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-previous-snapshot-urlStringNoSpecifies the previous snapshot URL to be + * compared in the diff.
RangeStringNoSpecifies the range of the blob to operate on.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     PageRange (Optional): [
+     *          (Optional){
+     *             Start: long (Required)
+     *             End: long (Required)
+     *         }
+     *     ]
+     *     ClearRange (Optional): [
+     *          (Optional){
+     *             Start: long (Required)
+     *             End: long (Required)
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
ETagStringAn opaque identifier for the current state of the resource.
x-ms-blob-content-lengthlongThe size of the blob in bytes.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the Get Pages API along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPageRangesDiffWithResponseInternal(RequestOptions requestOptions) { + return this.serviceClient.getPageRangesDiffWithResponseInternal(requestOptions); + } + + /** + * Changes the size of the specified page blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response resizeWithResponseInternal(long size, RequestOptions requestOptions) { + return this.serviceClient.resizeWithResponseInternal(size, requestOptions); + } + + /** + * Updates the sequence number of the specified page blob. The operation will fail if the specified sequence number + * is less than the current sequence number of the blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-blob-sequence-numberLongNoA value that can be used to track the request. + * The value of the sequence number must be between 0 and 2^63 - 1.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param sequenceNumberAction Required if the blob sequence number is provided. This property indicates how the + * service should modify the blob's sequence number. Allowed values: "increment", "max", "update". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response setSequenceNumberWithResponseInternal(String sequenceNumberAction, RequestOptions requestOptions) { + return this.serviceClient.setSequenceNumberWithResponseInternal(sequenceNumberAction, requestOptions); + } + + /** + * 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. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-statusStringStatus of the copy operation.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response copyIncrementalWithResponseInternal(String copySource, RequestOptions requestOptions) { + return this.serviceClient.copyIncrementalWithResponseInternal(copySource, requestOptions); + } + + /** + * Creates a new page blob. + * + * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. + * @param metadata The metadata headers. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 Indicates the tier to be set on the page blob. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobSequenceNumber A value that can be used to track the request. The value of the sequence number must be + * between 0 and 2^63 - 1. + * @param blobTagsString The blob tags. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase createWithResponse(long size, Map metadata, + Integer timeout, PremiumPageBlobAccessTier tier, String blobContentType, String blobContentEncoding, + String blobContentLanguage, byte[] blobContentMd5, String blobCacheControl, String leaseId, + String blobContentDisposition, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String ifTags, Long blobSequenceNumber, + String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, RequestConditions requestConditions, + RequestOptions requestOptions) { + // Generated convenience method for createWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + RequestOptions requestOptionsLocal = requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (tier != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (blobContentType != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentEncoding != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (blobContentMd5 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (blobCacheControl != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (leaseId != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (encryptionKey != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobSequenceNumber != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-blob-sequence-number"), + String.valueOf(blobSequenceNumber)); + } + if (blobTagsString != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (immutabilityPolicyExpiry != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptionsLocal.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (ifModifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptionsLocal.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = createWithResponseInternal(size, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, new PageBlobsCreateHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Creates a new page blob. + * + * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. + * @param metadata The metadata headers. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 Indicates the tier to be set on the page blob. + * @param blobContentType Specifies the blob's Content-Type. If specified, this property is stored with the blob and + * returned with a read request. + * @param blobContentEncoding Specifies the blob's Content-Encoding. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentLanguage Specifies the blob's Content-Language. If specified, this property is stored with the + * blob and returned with a read request. + * @param blobContentMd5 The MD5 hash of the blob content that is stored as a property on the blob. Note: This hash + * is not validated. + * @param blobCacheControl Specifies the blob's Cache-Control. If specified, this property is stored with the blob + * and returned with a read request. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param blobContentDisposition Specifies the blob's Content-Disposition. If specified, this property is stored + * with the blob and returned with a read request. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobSequenceNumber A value that can be used to track the request. The value of the sequence number must be + * between 0 and 2^63 - 1. + * @param blobTagsString The blob tags. + * @param immutabilityPolicyExpiry The date-time that indicates the time at which the blob immutability policy will + * expire. + * @param immutabilityPolicyMode Indicates the immutability policy mode of the blob. + * @param legalHold Indicates whether the blob has a legal hold. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void create(long size, Map metadata, Integer timeout, PremiumPageBlobAccessTier tier, + String blobContentType, String blobContentEncoding, String blobContentLanguage, byte[] blobContentMd5, + String blobCacheControl, String leaseId, String blobContentDisposition, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String ifTags, + Long blobSequenceNumber, String blobTagsString, OffsetDateTime immutabilityPolicyExpiry, + BlobImmutabilityPolicyMode immutabilityPolicyMode, Boolean legalHold, RequestConditions requestConditions) { + // Generated convenience method for createWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (metadata != null) { + metadata.forEach((key, value) -> { + if (key != null && value != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-meta-" + key), value); + } + }); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (tier != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-access-tier"), tier.toString()); + } + if (blobContentType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-type"), blobContentType); + } + if (blobContentEncoding != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-encoding"), blobContentEncoding); + } + if (blobContentLanguage != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-language"), blobContentLanguage); + } + if (blobContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-md5"), + Base64Util.encodeToString(blobContentMd5)); + } + if (blobCacheControl != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-cache-control"), blobCacheControl); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (blobContentDisposition != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-content-disposition"), + blobContentDisposition); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobSequenceNumber != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-sequence-number"), + String.valueOf(blobSequenceNumber)); + } + if (blobTagsString != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-tags"), blobTagsString); + } + if (immutabilityPolicyExpiry != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-until-date"), + String.valueOf(new DateTimeRfc1123(immutabilityPolicyExpiry))); + } + if (immutabilityPolicyMode != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-immutability-policy-mode"), + immutabilityPolicyMode.toString()); + } + if (legalHold != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-legal-hold"), String.valueOf(legalHold)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + createWithResponseInternal(size, requestOptions).getValue(); + } + + /** + * Creates a new page blob. + * + * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void create(long size) { + // Generated convenience method for createWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + createWithResponseInternal(size, requestOptions).getValue(); + } + + /** + * Writes a range of pages to the specified page blob. + * + * @param contentLength The length of the request. + * @param range Specifies the range of the blob to operate on. + * @param body The body of the request. + * @param transactionalContentMd5 Specifies the transactional MD5 hash for the body. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifSequenceNumberLessThanOrEqualTo Specify this value to operate only on a blob if it has a sequence number + * less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this value to operate only on a blob if it has a sequence number less + * than the specified. + * @param ifSequenceNumberEqualTo Specify this value to operate only on a blob if it has the specified sequence + * number. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema + * version and properties. + * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the + * blob/file content inside the message body. Will always be smaller than Content-Length. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase uploadPagesWithResponse(long contentLength, String range, + BinaryData body, byte[] transactionalContentMd5, byte[] transactionalContentCrc64, Integer timeout, + String leaseId, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + String encryptionScope, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, + Long ifSequenceNumberEqualTo, String ifTags, String structuredBodyType, Long structuredContentLength, + RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for uploadPagesWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (transactionalContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifSequenceNumberLessThanOrEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-le"), + String.valueOf(ifSequenceNumberLessThanOrEqualTo)); + } + if (ifSequenceNumberLessThan != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-lt"), + String.valueOf(ifSequenceNumberLessThan)); + } + if (ifSequenceNumberEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-eq"), + String.valueOf(ifSequenceNumberEqualTo)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (structuredBodyType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-body"), structuredBodyType); + } + if (structuredContentLength != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-content-length"), + String.valueOf(structuredContentLength)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse + = uploadPagesWithResponseInternal(contentLength, range, body, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new PageBlobsUploadPagesHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Writes a range of pages to the specified page blob. + * + * @param contentLength The length of the request. + * @param range Specifies the range of the blob to operate on. + * @param body The body of the request. + * @param transactionalContentMd5 Specifies the transactional MD5 hash for the body. + * @param transactionalContentCrc64 Specifies the transactional CRC64 hash for the 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 leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifSequenceNumberLessThanOrEqualTo Specify this value to operate only on a blob if it has a sequence number + * less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this value to operate only on a blob if it has a sequence number less + * than the specified. + * @param ifSequenceNumberEqualTo Specify this value to operate only on a blob if it has the specified sequence + * number. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param structuredBodyType Required if the request body is a structured message. Specifies the message schema + * version and properties. + * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the + * blob/file content inside the message body. Will always be smaller than Content-Length. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void uploadPages(long contentLength, String range, BinaryData body, byte[] transactionalContentMd5, + byte[] transactionalContentCrc64, Integer timeout, String leaseId, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, + Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, + String ifTags, String structuredBodyType, Long structuredContentLength, RequestConditions requestConditions) { + // Generated convenience method for uploadPagesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (transactionalContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.CONTENT_MD5, Base64Util.encodeToString(transactionalContentMd5)); + } + if (transactionalContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-content-crc64"), + Base64Util.encodeToString(transactionalContentCrc64)); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifSequenceNumberLessThanOrEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-le"), + String.valueOf(ifSequenceNumberLessThanOrEqualTo)); + } + if (ifSequenceNumberLessThan != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-lt"), + String.valueOf(ifSequenceNumberLessThan)); + } + if (ifSequenceNumberEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-eq"), + String.valueOf(ifSequenceNumberEqualTo)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (structuredBodyType != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-body"), structuredBodyType); + } + if (structuredContentLength != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-structured-content-length"), + String.valueOf(structuredContentLength)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + uploadPagesWithResponseInternal(contentLength, range, body, requestOptions).getValue(); + } + + /** + * Writes a range of pages to the specified page blob. + * + * @param contentLength The length of the request. + * @param range Specifies the range of the blob to operate on. + * @param body The body of the request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void uploadPages(long contentLength, String range, BinaryData body) { + // Generated convenience method for uploadPagesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + uploadPagesWithResponseInternal(contentLength, range, body, requestOptions).getValue(); + } + + /** + * Clears a range of pages from the specified page blob. + * + * @param range Specifies the range of the blob to operate on. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifSequenceNumberLessThanOrEqualTo Specify this value to operate only on a blob if it has a sequence number + * less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this value to operate only on a blob if it has a sequence number less + * than the specified. + * @param ifSequenceNumberEqualTo Specify this value to operate only on a blob if it has the specified sequence + * number. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase clearPagesWithResponse(String range, Integer timeout, + String leaseId, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + String encryptionScope, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, + Long ifSequenceNumberEqualTo, String ifTags, RequestConditions requestConditions, + RequestOptions requestOptions) { + // Generated convenience method for clearPagesWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifSequenceNumberLessThanOrEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-le"), + String.valueOf(ifSequenceNumberLessThanOrEqualTo)); + } + if (ifSequenceNumberLessThan != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-lt"), + String.valueOf(ifSequenceNumberLessThan)); + } + if (ifSequenceNumberEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-eq"), + String.valueOf(ifSequenceNumberEqualTo)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = clearPagesWithResponseInternal(range, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new PageBlobsClearPagesHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Clears a range of pages from the specified page blob. + * + * @param range Specifies the range of the blob to operate on. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"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 encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifSequenceNumberLessThanOrEqualTo Specify this value to operate only on a blob if it has a sequence number + * less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this value to operate only on a blob if it has a sequence number less + * than the specified. + * @param ifSequenceNumberEqualTo Specify this value to operate only on a blob if it has the specified sequence + * number. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void clearPages(String range, Integer timeout, String leaseId, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, + Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, + String ifTags, RequestConditions requestConditions) { + // Generated convenience method for clearPagesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifSequenceNumberLessThanOrEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-le"), + String.valueOf(ifSequenceNumberLessThanOrEqualTo)); + } + if (ifSequenceNumberLessThan != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-lt"), + String.valueOf(ifSequenceNumberLessThan)); + } + if (ifSequenceNumberEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-eq"), + String.valueOf(ifSequenceNumberEqualTo)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + clearPagesWithResponseInternal(range, requestOptions).getValue(); + } + + /** + * Clears a range of pages from the specified page blob. + * + * @param range Specifies the range of the blob to operate on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void clearPages(String range) { + // Generated convenience method for clearPagesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + clearPagesWithResponseInternal(range, requestOptions).getValue(); + } + + /** + * Writes a range of pages to the specified page blob where the contents are read from a URL. + * + * @param sourceUrl Specifies the URL of the source. + * @param sourceRange Specifies the bytes of the source. + * @param contentLength The length of the request. + * @param range Specifies the range of the blob to operate on. + * @param sourceContentMd5 Specifies the MD5 hash calculated for the range of bytes that must be read from the copy + * source. + * @param sourceContentCrc64 Specifies the CRC64 calculated for the range of bytes that must be read from the + * 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 encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this value to operate only on a blob if it has a sequence number + * less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this value to operate only on a blob if it has a sequence number less + * than the specified. + * @param ifSequenceNumberEqualTo Specify this value to operate only on a blob if it has the specified sequence + * number. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param copySourceAuthorization Only the Bearer authorization scheme is supported, and the value must be a valid + * OAuth access token for the copy source. + * @param fileRequestIntent Specifies the file request token intent. + * @param sourceEncryptionKey Specifies the encryption key to use to decrypt the source data provided in the + * request. + * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the + * source encryption key is provided. + * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Must be provided + * if the source encryption key is provided. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase uploadPagesFromUrlWithResponse(String sourceUrl, + String sourceRange, long contentLength, String range, byte[] sourceContentMd5, byte[] sourceContentCrc64, + Integer timeout, String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + String encryptionScope, String leaseId, Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, + Long ifSequenceNumberEqualTo, String ifTags, OffsetDateTime sourceIfModifiedSince, + OffsetDateTime sourceIfUnmodifiedSince, String sourceIfMatch, String sourceIfNoneMatch, + String copySourceAuthorization, FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, + String sourceEncryptionKeySha256, EncryptionAlgorithmType sourceEncryptionAlgorithm, + RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for uploadPagesFromUrlWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (sourceContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-md5"), + Base64Util.encodeToString(sourceContentMd5)); + } + if (sourceContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-crc64"), + Base64Util.encodeToString(sourceContentCrc64)); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifSequenceNumberLessThanOrEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-le"), + String.valueOf(ifSequenceNumberLessThanOrEqualTo)); + } + if (ifSequenceNumberLessThan != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-lt"), + String.valueOf(ifSequenceNumberLessThan)); + } + if (ifSequenceNumberEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-eq"), + String.valueOf(ifSequenceNumberEqualTo)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (sourceIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (copySourceAuthorization != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-authorization"), + copySourceAuthorization); + } + if (fileRequestIntent != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-file-request-intent"), + fileRequestIntent.toString()); + } + if (sourceEncryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key"), sourceEncryptionKey); + } + if (sourceEncryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key-sha256"), + sourceEncryptionKeySha256); + } + if (sourceEncryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-algorithm"), + sourceEncryptionAlgorithm.toString()); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse + = uploadPagesFromUrlWithResponseInternal(sourceUrl, sourceRange, contentLength, range, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new PageBlobsUploadPagesFromUrlHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Writes a range of pages to the specified page blob where the contents are read from a URL. + * + * @param sourceUrl Specifies the URL of the source. + * @param sourceRange Specifies the bytes of the source. + * @param contentLength The length of the request. + * @param range Specifies the range of the blob to operate on. + * @param sourceContentMd5 Specifies the MD5 hash calculated for the range of bytes that must be read from the copy + * source. + * @param sourceContentCrc64 Specifies the CRC64 calculated for the range of bytes that must be read from the + * 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 encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifSequenceNumberLessThanOrEqualTo Specify this value to operate only on a blob if it has a sequence number + * less than or equal to the specified. + * @param ifSequenceNumberLessThan Specify this value to operate only on a blob if it has a sequence number less + * than the specified. + * @param ifSequenceNumberEqualTo Specify this value to operate only on a blob if it has the specified sequence + * number. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param sourceIfModifiedSince Specify this value to operate only on a source 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 this value to operate only on a source blob with a matching Etag value. + * @param sourceIfNoneMatch Specify this value to operate only on a source blob with a non-matching Etag value. + * @param copySourceAuthorization Only the Bearer authorization scheme is supported, and the value must be a valid + * OAuth access token for the copy source. + * @param fileRequestIntent Specifies the file request token intent. + * @param sourceEncryptionKey Specifies the encryption key to use to decrypt the source data provided in the + * request. + * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the + * source encryption key is provided. + * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Must be provided + * if the source encryption key is provided. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void uploadPagesFromUrl(String sourceUrl, String sourceRange, long contentLength, String range, + byte[] sourceContentMd5, byte[] sourceContentCrc64, Integer timeout, String encryptionKey, + String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String leaseId, + Long ifSequenceNumberLessThanOrEqualTo, Long ifSequenceNumberLessThan, Long ifSequenceNumberEqualTo, + String ifTags, OffsetDateTime sourceIfModifiedSince, OffsetDateTime sourceIfUnmodifiedSince, + String sourceIfMatch, String sourceIfNoneMatch, String copySourceAuthorization, + FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, + EncryptionAlgorithmType sourceEncryptionAlgorithm, RequestConditions requestConditions) { + // Generated convenience method for uploadPagesFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (sourceContentMd5 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-md5"), + Base64Util.encodeToString(sourceContentMd5)); + } + if (sourceContentCrc64 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-content-crc64"), + Base64Util.encodeToString(sourceContentCrc64)); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifSequenceNumberLessThanOrEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-le"), + String.valueOf(ifSequenceNumberLessThanOrEqualTo)); + } + if (ifSequenceNumberLessThan != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-lt"), + String.valueOf(ifSequenceNumberLessThan)); + } + if (ifSequenceNumberEqualTo != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-sequence-number-eq"), + String.valueOf(ifSequenceNumberEqualTo)); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (sourceIfModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-modified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfModifiedSince))); + } + if (sourceIfUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-unmodified-since"), + String.valueOf(new DateTimeRfc1123(sourceIfUnmodifiedSince))); + } + if (sourceIfMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-match"), sourceIfMatch); + } + if (sourceIfNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-if-none-match"), sourceIfNoneMatch); + } + if (copySourceAuthorization != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-copy-source-authorization"), + copySourceAuthorization); + } + if (fileRequestIntent != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-file-request-intent"), + fileRequestIntent.toString()); + } + if (sourceEncryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key"), sourceEncryptionKey); + } + if (sourceEncryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-key-sha256"), + sourceEncryptionKeySha256); + } + if (sourceEncryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-source-encryption-algorithm"), + sourceEncryptionAlgorithm.toString()); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + uploadPagesFromUrlWithResponseInternal(sourceUrl, sourceRange, contentLength, range, requestOptions).getValue(); + } + + /** + * Writes a range of pages to the specified page blob where the contents are read from a URL. + * + * @param sourceUrl Specifies the URL of the source. + * @param sourceRange Specifies the bytes of the source. + * @param contentLength The length of the request. + * @param range Specifies the range of the blob to operate on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void uploadPagesFromUrl(String sourceUrl, String sourceRange, long contentLength, String range) { + // Generated convenience method for uploadPagesFromUrlWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + uploadPagesFromUrlWithResponseInternal(sourceUrl, sourceRange, contentLength, range, requestOptions).getValue(); + } + + /** + * Returns the list of valid page ranges for the specified page blob. + * + * @param snapshot Specifies the snapshot of 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 range Specifies the range of the blob to operate on. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Get Pages API along with {@link ResponseBase}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getPageRangesWithResponse(String snapshot, + Integer timeout, String range, String leaseId, String ifTags, String marker, Integer maxresults, + RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for getPageRangesWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (range != null) { + requestOptions.setHeader(HttpHeaderName.RANGE, range); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = getPageRangesWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(PageList.class, XML_SERIALIZER), + new PageBlobsGetPageRangesHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Returns the list of valid page ranges for the specified page blob. + * + * @param snapshot Specifies the snapshot of 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 range Specifies the range of the blob to operate on. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Get Pages API. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public PageList getPageRanges(String snapshot, Integer timeout, String range, String leaseId, String ifTags, + String marker, Integer maxresults, RequestConditions requestConditions) { + // Generated convenience method for getPageRangesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (range != null) { + requestOptions.setHeader(HttpHeaderName.RANGE, range); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return getPageRangesWithResponseInternal(requestOptions).getValue().toObject(PageList.class, XML_SERIALIZER); + } + + /** + * Returns the list of valid page ranges for the specified page blob. + * + * @throws BlobStorageErrorException 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 the Get Pages API. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public PageList getPageRanges() { + // Generated convenience method for getPageRangesWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getPageRangesWithResponseInternal(requestOptions).getValue().toObject(PageList.class, XML_SERIALIZER); + } + + /** + * Returns the list of page ranges in the diff between the specified page blob and the specified previous snapshot. + * + * @param snapshot Specifies the snapshot of 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 prevsnapshot Specifies the previous snapshot to be compared in the diff. + * @param prevSnapshotUrl Specifies the previous snapshot URL to be compared in the diff. + * @param range Specifies the range of the blob to operate on. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Get Pages API along with {@link ResponseBase}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase getPageRangesDiffWithResponse(String snapshot, + Integer timeout, String prevsnapshot, String prevSnapshotUrl, String range, String leaseId, String ifTags, + String marker, Integer maxresults, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for getPageRangesDiffWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (prevsnapshot != null) { + requestOptions.addQueryParam("prevsnapshot", prevsnapshot, false); + } + if (prevSnapshotUrl != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-previous-snapshot-url"), prevSnapshotUrl); + } + if (range != null) { + requestOptions.setHeader(HttpHeaderName.RANGE, range); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = getPageRangesDiffWithResponseInternal(requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), + protocolMethodResponse.getValue().toObject(PageList.class, XML_SERIALIZER), + new PageBlobsGetPageRangesDiffHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Returns the list of page ranges in the diff between the specified page blob and the specified previous snapshot. + * + * @param snapshot Specifies the snapshot of 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 prevsnapshot Specifies the previous snapshot to be compared in the diff. + * @param prevSnapshotUrl Specifies the previous snapshot URL to be compared in the diff. + * @param range Specifies the range of the blob to operate on. + * @param leaseId If specified, the operation only succeeds if the resource's lease is active and matches this ID. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param marker An opaque string value that identifies the portion of the result set to return with this operation. + * @param maxresults Specifies the maximum number of resources to return. If the request does not specify + * maxresults, or specifies a value greater than 5000, the server will return up to 5000 items. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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 the Get Pages API. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public PageList getPageRangesDiff(String snapshot, Integer timeout, String prevsnapshot, String prevSnapshotUrl, + String range, String leaseId, String ifTags, String marker, Integer maxresults, + RequestConditions requestConditions) { + // Generated convenience method for getPageRangesDiffWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (snapshot != null) { + requestOptions.addQueryParam("snapshot", snapshot, false); + } + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (prevsnapshot != null) { + requestOptions.addQueryParam("prevsnapshot", prevsnapshot, false); + } + if (prevSnapshotUrl != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-previous-snapshot-url"), prevSnapshotUrl); + } + if (range != null) { + requestOptions.setHeader(HttpHeaderName.RANGE, range); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (marker != null) { + requestOptions.addQueryParam("marker", marker, false); + } + if (maxresults != null) { + requestOptions.addQueryParam("maxresults", String.valueOf(maxresults), false); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return getPageRangesDiffWithResponseInternal(requestOptions).getValue() + .toObject(PageList.class, XML_SERIALIZER); + } + + /** + * Returns the list of page ranges in the diff between the specified page blob and the specified previous snapshot. + * + * @throws BlobStorageErrorException 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 the Get Pages API. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public PageList getPageRangesDiff() { + // Generated convenience method for getPageRangesDiffWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + return getPageRangesDiffWithResponseInternal(requestOptions).getValue() + .toObject(PageList.class, XML_SERIALIZER); + } + + /** + * Changes the size of the specified page blob. + * + * @param size The maximum size for the page blob. 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 encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase resizeWithResponse(long size, Integer timeout, String leaseId, + String encryptionKey, String encryptionKeySha256, EncryptionAlgorithmType encryptionAlgorithm, + String encryptionScope, String ifTags, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for resizeWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = resizeWithResponseInternal(size, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, new PageBlobsResizeHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Changes the size of the specified page blob. + * + * @param size The maximum size for the page blob. 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 encryptionKey Specifies the encryption key to use to encrypt the data provided in the request. + * @param encryptionKeySha256 The SHA-256 hash of the provided encryption key. Must be provided if the encryption + * key is provided. + * @param encryptionAlgorithm The algorithm used to produce the encryption key hash. Must be provided if the + * encryption key is provided. + * @param encryptionScope Specifies the encryption scope used to encrypt the data. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void resize(long size, Integer timeout, String leaseId, String encryptionKey, String encryptionKeySha256, + EncryptionAlgorithmType encryptionAlgorithm, String encryptionScope, String ifTags, + RequestConditions requestConditions) { + // Generated convenience method for resizeWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (encryptionKey != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key"), encryptionKey); + } + if (encryptionKeySha256 != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-key-sha256"), encryptionKeySha256); + } + if (encryptionAlgorithm != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-algorithm"), + encryptionAlgorithm.toString()); + } + if (encryptionScope != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-encryption-scope"), encryptionScope); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + resizeWithResponseInternal(size, requestOptions).getValue(); + } + + /** + * Changes the size of the specified page blob. + * + * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void resize(long size) { + // Generated convenience method for resizeWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + resizeWithResponseInternal(size, requestOptions).getValue(); + } + + /** + * Updates the sequence number of the specified page blob. The operation will fail if the specified sequence number + * is less than the current sequence number of the blob. + * + * @param sequenceNumberAction Required if the blob sequence number is provided. 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 ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobSequenceNumber A value that can be used to track the request. The value of the sequence number must be + * between 0 and 2^63 - 1. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase setSequenceNumberWithResponse( + SequenceNumberActionType sequenceNumberAction, Integer timeout, String leaseId, String ifTags, + Long blobSequenceNumber, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for setSequenceNumberWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobSequenceNumber != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-sequence-number"), + String.valueOf(blobSequenceNumber)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse + = setSequenceNumberWithResponseInternal(sequenceNumberAction.toString(), requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new PageBlobsSetSequenceNumberHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * Updates the sequence number of the specified page blob. The operation will fail if the specified sequence number + * is less than the current sequence number of the blob. + * + * @param sequenceNumberAction Required if the blob sequence number is provided. 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 ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param blobSequenceNumber A value that can be used to track the request. The value of the sequence number must be + * between 0 and 2^63 - 1. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setSequenceNumber(SequenceNumberActionType sequenceNumberAction, Integer timeout, String leaseId, + String ifTags, Long blobSequenceNumber, RequestConditions requestConditions) { + // Generated convenience method for setSequenceNumberWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (leaseId != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (blobSequenceNumber != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-blob-sequence-number"), + String.valueOf(blobSequenceNumber)); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + setSequenceNumberWithResponseInternal(sequenceNumberAction.toString(), requestOptions).getValue(); + } + + /** + * Updates the sequence number of the specified page blob. The operation will fail if the specified sequence number + * is less than the current sequence number of the blob. + * + * @param sequenceNumberAction Required if the blob sequence number is provided. This property indicates how the + * service should modify the blob's sequence number. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void setSequenceNumber(SequenceNumberActionType sequenceNumberAction) { + // Generated convenience method for setSequenceNumberWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + setSequenceNumberWithResponseInternal(sequenceNumberAction.toString(), requestOptions).getValue(); + } + + /** + * 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. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ResponseBase copyIncrementalWithResponse(String copySource, + Integer timeout, String ifTags, RequestConditions requestConditions, RequestOptions requestOptions) { + // Generated convenience method for copyIncrementalWithResponseInternal + requestOptions = requestOptions == null ? new RequestOptions() : requestOptions; + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + Response protocolMethodResponse = copyIncrementalWithResponseInternal(copySource, requestOptions); + return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), + protocolMethodResponse.getHeaders(), null, + new PageBlobsCopyIncrementalHeaders(protocolMethodResponse.getHeaders())); + } + + /** + * 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. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param timeout The timeout parameter is expressed in seconds. For more information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>. + * @param ifTags Specifies a SQL-like where clause on blob tags to operate only on a blob with matching tags. + * @param requestConditions Specifies HTTP options for conditional requests based on modification time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void copyIncremental(String copySource, Integer timeout, String ifTags, + RequestConditions requestConditions) { + // Generated convenience method for copyIncrementalWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + OffsetDateTime ifModifiedSince = requestConditions == null ? null : requestConditions.getIfModifiedSince(); + OffsetDateTime ifUnmodifiedSince = requestConditions == null ? null : requestConditions.getIfUnmodifiedSince(); + String ifNoneMatch = requestConditions == null ? null : requestConditions.getIfNoneMatch(); + String ifMatch = requestConditions == null ? null : requestConditions.getIfMatch(); + if (timeout != null) { + requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); + } + if (ifTags != null) { + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); + } + if (ifModifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_MODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifModifiedSince))); + } + if (ifUnmodifiedSince != null) { + requestOptions.setHeader(HttpHeaderName.IF_UNMODIFIED_SINCE, + String.valueOf(new DateTimeRfc1123(ifUnmodifiedSince))); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + copyIncrementalWithResponseInternal(copySource, requestOptions).getValue(); + } + + /** + * 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. + * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void copyIncremental(String copySource) { + // Generated convenience method for copyIncrementalWithResponseInternal + RequestOptions requestOptions = new RequestOptions(); + copyIncrementalWithResponseInternal(copySource, requestOptions).getValue(); + } +} 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 3ce34a5fa7f20..168c744112033 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation; import com.azure.core.annotation.BodyParam; @@ -9,45 +9,20 @@ import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; import com.azure.core.annotation.ServiceMethod; import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.ResponseBase; import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Base64Util; import com.azure.core.util.BinaryData; 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.BlobStorageExceptionInternal; -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.PageBlobsUploadPagesFromURLHeaders; -import com.azure.storage.blob.implementation.models.PageBlobsUploadPagesHeaders; -import com.azure.storage.blob.implementation.models.PremiumPageBlobAccessTier; +import com.azure.storage.blob.BlobServiceVersion; +import com.azure.storage.blob.implementation.models.BlobStorageErrorException; import com.azure.storage.blob.implementation.util.ModelHelper; -import com.azure.storage.blob.models.BlobHttpHeaders; -import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; -import com.azure.storage.blob.models.CpkInfo; -import com.azure.storage.blob.models.EncryptionAlgorithmType; -import com.azure.storage.blob.models.FileShareTokenIntent; -import com.azure.storage.blob.models.PageList; -import com.azure.storage.blob.models.SequenceNumberActionType; -import java.nio.ByteBuffer; -import java.time.OffsetDateTime; -import java.util.Map; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -76,6 +51,19 @@ public final class PageBlobsImpl { this.client = client; } + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public BlobServiceVersion getServiceVersion() { + try { + return client.getServiceVersion(); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } + } + /** * The interface defining all the services for AzureBlobStoragePageBlobs to be used by the proxy service to perform * REST calls. @@ -84,6257 +72,1703 @@ public final class PageBlobsImpl { @ServiceInterface(name = "AzureBlobStoragePageBlobs") public interface PageBlobsService { - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") Flux body, @HeaderParam("Accept") String accept, - Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") Flux body, @HeaderParam("Accept") String accept, - Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, - Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, - Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, - Context context); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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, - @HeaderParam("x-ms-structured-body") String structuredBodyType, - @HeaderParam("x-ms-structured-content-length") Long structuredContentLength, - @BodyParam("application/octet-stream") BinaryData body, @HeaderParam("Accept") String accept, - Context context); - - @Put("/{containerName}/{blob}") + @Put("/") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> create(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-blob-content-length") long size, @HeaderParam("Content-Length") int contentLength, + @HeaderParam("x-ms-blob-type") String blobType, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("/") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response createSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-blob-content-length") long size, @HeaderParam("Content-Length") int contentLength, + @HeaderParam("x-ms-blob-type") String blobType, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=page") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> uploadPages(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Range") String range, @HeaderParam("x-ms-page-write") String pageWrite, + @BodyParam("application/octet-stream") BinaryData body, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=page") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response uploadPagesSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Range") String range, @HeaderParam("x-ms-page-write") String pageWrite, + @BodyParam("application/octet-stream") BinaryData body, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=page") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-file-request-intent") FileShareTokenIntent fileRequestIntent, - @HeaderParam("x-ms-source-encryption-key") String sourceEncryptionKey, - @HeaderParam("x-ms-source-encryption-key-sha256") String sourceEncryptionKeySha256, - @HeaderParam("x-ms-source-encryption-algorithm") EncryptionAlgorithmType sourceEncryptionAlgorithm, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> clearPages(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Length") int contentLength, @HeaderParam("Range") String range, + @HeaderParam("x-ms-page-write") String pageWrite, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=page") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-file-request-intent") FileShareTokenIntent fileRequestIntent, - @HeaderParam("x-ms-source-encryption-key") String sourceEncryptionKey, - @HeaderParam("x-ms-source-encryption-key-sha256") String sourceEncryptionKeySha256, - @HeaderParam("x-ms-source-encryption-algorithm") EncryptionAlgorithmType sourceEncryptionAlgorithm, - @HeaderParam("Accept") String accept, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response clearPagesSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Length") int contentLength, @HeaderParam("Range") String range, + @HeaderParam("x-ms-page-write") String pageWrite, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=page") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-file-request-intent") FileShareTokenIntent fileRequestIntent, - @HeaderParam("x-ms-source-encryption-key") String sourceEncryptionKey, - @HeaderParam("x-ms-source-encryption-key-sha256") String sourceEncryptionKeySha256, - @HeaderParam("x-ms-source-encryption-algorithm") EncryptionAlgorithmType sourceEncryptionAlgorithm, - @HeaderParam("Accept") String accept, Context context); - - @Put("/{containerName}/{blob}") + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> uploadPagesFromUrl(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("x-ms-copy-source") String sourceUrl, + @HeaderParam("x-ms-source-range") String sourceRange, @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Range") String range, @HeaderParam("x-ms-page-write") String pageWrite, + RequestOptions requestOptions, Context context); + + @Put("?comp=page") @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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("x-ms-file-request-intent") FileShareTokenIntent fileRequestIntent, - @HeaderParam("x-ms-source-encryption-key") String sourceEncryptionKey, - @HeaderParam("x-ms-source-encryption-key-sha256") String sourceEncryptionKeySha256, - @HeaderParam("x-ms-source-encryption-algorithm") EncryptionAlgorithmType sourceEncryptionAlgorithm, - @HeaderParam("Accept") String accept, Context context); - - @Get("/{containerName}/{blob}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.class) - 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}") + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response uploadPagesFromUrlSync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("x-ms-copy-source") String sourceUrl, + @HeaderParam("x-ms-source-range") String sourceRange, @HeaderParam("Content-Length") long contentLength, + @HeaderParam("Range") String range, @HeaderParam("x-ms-page-write") String pageWrite, + RequestOptions requestOptions, Context context); + + @Get("?comp=pagelist") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> getPageRanges(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); - @Get("/{containerName}/{blob}") + @Get("?comp=pagelist") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response getPageRangesSync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); - @Get("/{containerName}/{blob}") + @Get("?comp=pagelist") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> getPageRangesDiff(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); - @Get("/{containerName}/{blob}") + @Get("?comp=pagelist") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response getPageRangesDiffSync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=properties") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> resize(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-blob-content-length") long size, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=properties") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response resizeSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-blob-content-length") long size, RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=properties") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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); - - @Put("/{containerName}/{blob}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> setSequenceNumber(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-sequence-number-action") String sequenceNumberAction, RequestOptions requestOptions, + Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=properties") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response setSequenceNumberSync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-sequence-number-action") String sequenceNumberAction, RequestOptions requestOptions, + Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=incrementalcopy") @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> copyIncremental(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("x-ms-copy-source") String copySource, + RequestOptions requestOptions, Context context); - @Put("/{containerName}/{blob}") + @Put("?comp=incrementalcopy") @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - 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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response copyIncrementalSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("x-ms-copy-source") String copySource, RequestOptions requestOptions, Context context); + } + + /** + * Creates a new page blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-access-tierStringNoIndicates the tier to be set on the page blob. Allowed + * values: "P4", "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80".
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-blob-sequence-numberLongNoA value that can be used to track the request. + * The value of the sequence number must be between 0 and 2^63 - 1.
x-ms-tagsStringNoThe blob tags.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} 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> createWithResponseInternalAsync(long size, RequestOptions requestOptions) { + final int contentLength = 0; + final String blobType = "PageBlob"; return FluxUtil - .withContext(context -> createWithResponseAsync(containerName, blob, contentLength, blobContentLength, - timeout, tier, metadata, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, - blobSequenceNumber, requestId, blobTagsString, immutabilityPolicyExpiry, immutabilityPolicyMode, - legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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. - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase} on successful completion of {@link Mono}. + .withContext(context -> service.create(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + size, contentLength, blobType, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Creates a new page blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-metaMap<String, String>NoThe metadata headers.
x-ms-access-tierStringNoIndicates the tier to be set on the page blob. Allowed + * values: "P4", "P6", "P10", "P15", "P20", "P30", "P40", "P50", "P60", "P70", "P80".
x-ms-blob-content-typeStringNoSpecifies the blob's Content-Type. If specified, + * this property is stored with the blob and returned with a read request.
x-ms-blob-content-encodingStringNoSpecifies the blob's Content-Encoding. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-languageStringNoSpecifies the blob's Content-Language. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-blob-content-md5byte[]NoThe MD5 hash of the blob content that is stored + * as a property on the blob. Note: This hash is not validated.
x-ms-blob-cache-controlStringNoSpecifies the blob's Cache-Control. If + * specified, this property is stored with the blob and returned with a read request.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-blob-content-dispositionStringNoSpecifies the blob's Content-Disposition. + * If specified, this property is stored with the blob and returned with a read request.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-blob-sequence-numberLongNoA value that can be used to track the request. + * The value of the sequence number must be between 0 and 2^63 - 1.
x-ms-tagsStringNoThe blob tags.
x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that + * indicates the time at which the blob immutability policy will expire.
x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of + * the blob. Allowed values: "mutable", "locked", "unlocked".
x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-version-idStringThe version ID of the blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @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) { - 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(); - } - 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(); + public Response createWithResponseInternal(long size, RequestOptions requestOptions) { + try { + final int contentLength = 0; + final String blobType = "PageBlob"; + return service.createSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), size, + contentLength, blobType, requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); } - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } /** - * The Create operation creates a new page blob. + * Writes a range of pages to the specified page blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-if-sequence-number-leLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than or equal to the specified.
x-ms-if-sequence-number-ltLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than the specified.
x-ms-if-sequence-number-eqLongNoSpecify this value to operate only on a blob + * if it has the specified sequence number.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-structured-bodyStringNoRequired if the request body is a structured + * message. Specifies the message schema version and properties.
x-ms-structured-content-lengthLongNoRequired if the request body is a + * structured message. Specifies the length of the blob/file content inside the message body. Will always be smaller + * than Content-Length.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-structured-bodyStringIndicates if the response body contains a structured message + * and specifies the message schema version and properties.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
* - * @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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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. + * @param range Specifies the range of the blob to operate on. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. */ @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).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); - } - - /** - * The Create operation creates a new page blob. + public Mono> uploadPagesWithResponseInternalAsync(long contentLength, String range, BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/octet-stream"; + final String pageWrite = "update"; + return FluxUtil + .withContext( + context -> service.uploadPages(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + contentType, contentLength, range, pageWrite, body, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Writes a range of pages to the specified page blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-MD5byte[]NoSpecifies the transactional MD5 hash for the + * body.
x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the + * body.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-if-sequence-number-leLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than or equal to the specified.
x-ms-if-sequence-number-ltLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than the specified.
x-ms-if-sequence-number-eqLongNoSpecify this value to operate only on a blob + * if it has the specified sequence number.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-structured-bodyStringNoRequired if the request body is a structured + * message. Specifies the message schema version and properties.
x-ms-structured-content-lengthLongNoRequired if the request body is a + * structured message. Specifies the length of the blob/file content inside the message body. Will always be smaller + * than Content-Length.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
x-ms-structured-bodyStringIndicates if the response body contains a structured message + * and specifies the message schema version and properties.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
* - * @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://learn.microsoft.com/rest/api/storageservices/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. - * @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. - * @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. + * @param range Specifies the range of the blob to operate on. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); + public Response uploadPagesWithResponseInternal(long contentLength, String range, BinaryData body, + RequestOptions requestOptions) { + try { + final String contentType = "application/octet-stream"; + final String pageWrite = "update"; + return service.uploadPagesSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + contentType, contentLength, range, pageWrite, body, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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. - * @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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Clears a range of pages from the specified page blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-if-sequence-number-leLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than or equal to the specified.
x-ms-if-sequence-number-ltLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than the specified.
x-ms-if-sequence-number-eqLongNoSpecify this value to operate only on a blob + * if it has the specified sequence number.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param range Specifies the range of the blob to operate on. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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> clearPagesWithResponseInternalAsync(String range, RequestOptions requestOptions) { + final int contentLength = 0; + final String pageWrite = "clear"; return FluxUtil - .withContext(context -> createNoCustomHeadersWithResponseAsync(containerName, blob, contentLength, - blobContentLength, timeout, tier, metadata, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, ifTags, blobSequenceNumber, requestId, blobTagsString, immutabilityPolicyExpiry, - immutabilityPolicyMode, legalHold, blobHttpHeaders, cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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. - * @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. - * @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> 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; - 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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. - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link ResponseBase}. + .withContext(context -> service.clearPages(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), contentLength, range, pageWrite, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Clears a range of pages from the specified page blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-if-sequence-number-leLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than or equal to the specified.
x-ms-if-sequence-number-ltLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than the specified.
x-ms-if-sequence-number-eqLongNoSpecify this value to operate only on a blob + * if it has the specified sequence number.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param range Specifies the range of the blob to operate on. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - 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) { + public Response clearPagesWithResponseInternal(String range, RequestOptions requestOptions) { try { - 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(); - } - 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, 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) { + final int contentLength = 0; + final String pageWrite = "clear"; + return service.clearPagesSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + contentLength, range, pageWrite, requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } } /** - * The Create operation creates a new page blob. - * - * @param containerName The container name. - * @param blob The blob name. + * Writes a range of pages to the specified page blob where the contents are read from a URL. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-source-content-md5byte[]NoSpecifies the MD5 hash calculated for the range + * of bytes that must be read from the copy source.
x-ms-source-content-crc64byte[]NoSpecifies the CRC64 calculated for the range + * of bytes that must be read from the source.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-if-sequence-number-leLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than or equal to the specified.
x-ms-if-sequence-number-ltLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than the specified.
x-ms-if-sequence-number-eqLongNoSpecify this value to operate only on a blob + * if it has the specified sequence number.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is + * supported, and the value must be a valid OAuth access token for the copy source.
x-ms-file-request-intentStringNoSpecifies the file request token intent. + * Allowed values: "backup".
x-ms-source-encryption-keyStringNoSpecifies the encryption key to use to + * decrypt the source data provided in the request.
x-ms-source-encryption-key-sha256StringNoThe SHA-256 hash of the provided + * source encryption key. Must be provided if the source encryption key is provided.
x-ms-source-encryption-algorithmStringNoThe algorithm used to produce the + * source encryption key hash. Must be provided if the source encryption key is provided. Allowed values: + * "AES256".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param sourceUrl Specifies the URL of the source. + * @param sourceRange Specifies the bytes of the source. * @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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @param range Specifies the range of the blob to operate on. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. */ @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. + public Mono> uploadPagesFromUrlWithResponseInternalAsync(String sourceUrl, String sourceRange, + long contentLength, String range, RequestOptions requestOptions) { + final String pageWrite = "update"; + return FluxUtil + .withContext(context -> service.uploadPagesFromUrl(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), sourceUrl, sourceRange, contentLength, range, pageWrite, + requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Writes a range of pages to the specified page blob where the contents are read from a URL. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-source-content-md5byte[]NoSpecifies the MD5 hash calculated for the range + * of bytes that must be read from the copy source.
x-ms-source-content-crc64byte[]NoSpecifies the CRC64 calculated for the range + * of bytes that must be read from the source.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-if-sequence-number-leLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than or equal to the specified.
x-ms-if-sequence-number-ltLongNoSpecify this value to operate only on a blob + * if it has a sequence number less than the specified.
x-ms-if-sequence-number-eqLongNoSpecify this value to operate only on a blob + * if it has the specified sequence number.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-source-if-modified-sinceOffsetDateTimeNoSpecify this value to operate + * only on a source blob if it has been modified since the specified date-time.
x-ms-source-if-unmodified-sinceOffsetDateTimeNoSpecify this header value to + * operate only on a blob if it has not been modified since the specified date-time.
x-ms-source-if-matchStringNoSpecify this value to operate only on a source + * blob with a matching Etag value.
x-ms-source-if-none-matchStringNoSpecify this value to operate only on a + * source blob with a non-matching Etag value.
x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is + * supported, and the value must be a valid OAuth access token for the copy source.
x-ms-file-request-intentStringNoSpecifies the file request token intent. + * Allowed values: "backup".
x-ms-source-encryption-keyStringNoSpecifies the encryption key to use to + * decrypt the source data provided in the request.
x-ms-source-encryption-key-sha256StringNoThe SHA-256 hash of the provided + * source encryption key. Must be provided if the source encryption key is provided.
x-ms-source-encryption-algorithmStringNoThe algorithm used to produce the + * source encryption key hash. Must be provided if the source encryption key is provided. Allowed values: + * "AES256".
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
Content-MD5byte[]The blob content MD5 hash. Only returned if the full blob is + * read.
x-ms-content-crc64byte[]The CRC64 hash of the content.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
x-ms-request-server-encryptedbooleanIndicates whether the contents of the request are + * successfully encrypted.
x-ms-encryption-key-sha256StringThe SHA-256 hash of the provided encryption + * key.
x-ms-encryption-scopeStringSpecifies the encryption scope used to encrypt the + * data.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param sourceUrl Specifies the URL of the source. + * @param sourceRange Specifies the bytes of the source. * @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://learn.microsoft.com/rest/api/storageservices/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. - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @param range Specifies the range of the blob to operate on. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - 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) { + public Response uploadPagesFromUrlWithResponseInternal(String sourceUrl, String sourceRange, + long contentLength, String range, RequestOptions requestOptions) { try { - 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(); - } - 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.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) { + final String pageWrite = "update"; + return service.uploadPagesFromUrlSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + sourceUrl, sourceRange, contentLength, range, pageWrite, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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. - * @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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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> 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, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + * Returns the list of valid page ranges for the specified page blob. + *

Query Parameters

+ * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
RangeStringNoSpecifies the range of the blob to operate on.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     PageRange (Optional): [
+     *          (Optional){
+     *             Start: long (Required)
+     *             End: long (Required)
+     *         }
+     *     ]
+     *     ClearRange (Optional): [
+     *          (Optional){
+     *             Start: long (Required)
+     *             End: long (Required)
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
ETagStringAn opaque identifier for the current state of the resource.
x-ms-blob-content-lengthlongThe size of the blob in bytes.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the Get Pages API along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getPageRangesWithResponseInternalAsync(RequestOptions requestOptions) { + final String accept = "application/xml"; return FluxUtil - .withContext(context -> uploadPagesWithResponseAsync(containerName, blob, contentLength, body, - transactionalContentMD5, transactionalContentCrc64, timeout, range, leaseId, - ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, - cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + .withContext(context -> service.getPageRanges(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Returns the list of valid page ranges for the specified page blob. + *

Query Parameters

+ * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
RangeStringNoSpecifies the range of the blob to operate on.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     PageRange (Optional): [
+     *          (Optional){
+     *             Start: long (Required)
+     *             End: long (Required)
+     *         }
+     *     ]
+     *     ClearRange (Optional): [
+     *          (Optional){
+     *             Start: long (Required)
+     *             End: long (Required)
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
ETagStringAn opaque identifier for the current state of the resource.
x-ms-blob-content-lengthlongThe size of the blob in bytes.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the Get Pages API along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPageRangesWithResponseInternal(RequestOptions requestOptions) { + try { + final String accept = "application/xml"; + return service.getPageRangesSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), accept, + requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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. - * @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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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> 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, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam, Context context) { - final String comp = "page"; - final String pageWrite = "update"; + * Returns the list of page ranges in the diff between the specified page blob and the specified previous snapshot. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
prevsnapshotStringNoSpecifies the previous snapshot to be compared in the + * diff.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-previous-snapshot-urlStringNoSpecifies the previous snapshot URL to be + * compared in the diff.
RangeStringNoSpecifies the range of the blob to operate on.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     PageRange (Optional): [
+     *          (Optional){
+     *             Start: long (Required)
+     *             End: long (Required)
+     *         }
+     *     ]
+     *     ClearRange (Optional): [
+     *          (Optional){
+     *             Start: long (Required)
+     *             End: long (Required)
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
ETagStringAn opaque identifier for the current state of the resource.
x-ms-blob-content-lengthlongThe size of the blob in bytes.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the Get Pages API along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getPageRangesDiffWithResponseInternalAsync(RequestOptions requestOptions) { 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(); + return FluxUtil + .withContext(context -> service.getPageRangesDiff(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Returns the list of page ranges in the diff between the specified page blob and the specified previous snapshot. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
snapshotStringNoSpecifies the snapshot of the blob.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
prevsnapshotStringNoSpecifies the previous snapshot to be compared in the + * diff.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-previous-snapshot-urlStringNoSpecifies the previous snapshot URL to be + * compared in the diff.
RangeStringNoSpecifies the range of the blob to operate on.
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     PageRange (Optional): [
+     *          (Optional){
+     *             Start: long (Required)
+     *             End: long (Required)
+     *         }
+     *     ]
+     *     ClearRange (Optional): [
+     *          (Optional){
+     *             Start: long (Required)
+     *             End: long (Required)
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
ETagStringAn opaque identifier for the current state of the resource.
x-ms-blob-content-lengthlongThe size of the blob in bytes.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the Get Pages API along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPageRangesDiffWithResponseInternal(RequestOptions requestOptions) { + try { + final String accept = "application/xml"; + return service.getPageRangesDiffSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + accept, requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); } - 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, structuredBodyType, structuredContentLength, body, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return uploadPagesWithResponseAsync(containerName, blob, contentLength, body, transactionalContentMD5, - transactionalContentCrc64, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, - ifTags, requestId, structuredBodyType, structuredContentLength, cpkInfo, encryptionScopeParam) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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, String structuredBodyType, Long structuredContentLength, 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, structuredBodyType, structuredContentLength, cpkInfo, encryptionScopeParam, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Changes the size of the specified page blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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, - String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> resizeWithResponseInternalAsync(long size, RequestOptions requestOptions) { return FluxUtil - .withContext(context -> uploadPagesNoCustomHeadersWithResponseAsync(containerName, blob, contentLength, - body, transactionalContentMD5, transactionalContentCrc64, timeout, range, leaseId, - ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, - cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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}. + .withContext(context -> service.resize(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + size, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Changes the size of the specified page blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
x-ms-encryption-keyStringNoSpecifies the encryption key to use to encrypt the + * data provided in the request.
x-ms-encryption-key-sha256StringNoThe SHA-256 hash of the provided encryption + * key. Must be provided if the encryption key is provided.
x-ms-encryption-algorithmStringNoThe algorithm used to produce the encryption + * key hash. Must be provided if the encryption key is provided. Allowed values: "AES256".
x-ms-encryption-scopeStringNoSpecifies the encryption scope used to encrypt + * the data.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @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, - String structuredBodyType, Long structuredContentLength, 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(); + public Response resizeWithResponseInternal(long size, RequestOptions requestOptions) { + try { + return service.resizeSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), size, + requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); } - 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, structuredBodyType, structuredContentLength, body, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); } /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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}. + * Updates the sequence number of the specified page blob. The operation will fail if the specified sequence number + * is less than the current sequence number of the blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-blob-sequence-numberLongNoA value that can be used to track the request. + * The value of the sequence number must be between 0 and 2^63 - 1.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param sequenceNumberAction Required if the blob sequence number is provided. This property indicates how the + * service should modify the blob's sequence number. Allowed values: "increment", "max", "update". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} 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, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> setSequenceNumberWithResponseInternalAsync(String sequenceNumberAction, + RequestOptions requestOptions) { return FluxUtil - .withContext(context -> uploadPagesWithResponseAsync(containerName, blob, contentLength, body, - transactionalContentMD5, transactionalContentCrc64, timeout, range, leaseId, - ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, - cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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}. + .withContext(context -> service.setSequenceNumber(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), sequenceNumberAction, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Updates the sequence number of the specified page blob. The operation will fail if the specified sequence number + * is less than the current sequence number of the blob. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
x-ms-lease-idStringNoIf specified, the operation only succeeds if the + * resource's lease is active and matches this ID.
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
x-ms-blob-sequence-numberLongNoA value that can be used to track the request. + * The value of the sequence number must be between 0 and 2^63 - 1.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-blob-sequence-numberlongThe current sequence number for a page blob.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param sequenceNumberAction Required if the blob sequence number is provided. This property indicates how the + * service should modify the blob's sequence number. Allowed values: "increment", "max", "update". + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @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, String structuredBodyType, Long structuredContentLength, 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(); + public Response setSequenceNumberWithResponseInternal(String sequenceNumberAction, + RequestOptions requestOptions) { + try { + return service.setSequenceNumberSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + sequenceNumberAction, requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); } - 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, structuredBodyType, structuredContentLength, body, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, 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, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - return uploadPagesWithResponseAsync(containerName, blob, contentLength, body, transactionalContentMD5, - transactionalContentCrc64, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, - ifTags, requestId, structuredBodyType, structuredContentLength, cpkInfo, encryptionScopeParam) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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, 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, String structuredBodyType, Long structuredContentLength, 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, structuredBodyType, structuredContentLength, cpkInfo, encryptionScopeParam, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * 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. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-statusStringStatus of the copy operation.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. * @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, - String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { + public Mono> copyIncrementalWithResponseInternalAsync(String copySource, + RequestOptions requestOptions) { return FluxUtil - .withContext(context -> uploadPagesNoCustomHeadersWithResponseAsync(containerName, blob, contentLength, - body, transactionalContentMD5, transactionalContentCrc64, timeout, range, leaseId, - ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, structuredBodyType, structuredContentLength, - cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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, 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, - String structuredBodyType, Long structuredContentLength, 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, structuredBodyType, structuredContentLength, body, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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}. + .withContext(context -> service.copyIncremental(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), copySource, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * 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. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
If-Modified-SinceOffsetDateTimeNoSpecify this value to operate only on a blob + * if it has been modified since the specified date-time.
If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a + * blob if it has not been modified since the specified date-time.
If-None-MatchStringNoSpecify this value to operate only on a blob with a + * non-matching Etag value.
If-MatchStringNoSpecify this value to operate only on a blob with a matching + * Etag value.
x-ms-if-tagsStringNoSpecifies a SQL-like where clause on blob tags to operate + * only on a blob with matching tags.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
ETagStringAn opaque identifier for the current state of the resource.
Last-ModifiedOffsetDateTimeThe date-time that the resource was last modified.
x-ms-copy-idStringIdentifier for this copy operation.
x-ms-copy-statusStringStatus of the copy operation.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as + * it would appear in a request URI. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @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, - String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, - Context context) { + public Response copyIncrementalWithResponseInternal(String copySource, RequestOptions requestOptions) { try { - 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, structuredBodyType, structuredContentLength, 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. - * @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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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, String structuredBodyType, Long structuredContentLength, CpkInfo cpkInfo, - EncryptionScope encryptionScopeParam) { - uploadPagesWithResponse(containerName, blob, contentLength, body, transactionalContentMD5, - transactionalContentCrc64, timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, - ifTags, requestId, structuredBodyType, structuredContentLength, 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://learn.microsoft.com/rest/api/storageservices/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 structuredBodyType Required if the request body is a structured message. Specifies the message schema - * version and properties. - * @param structuredContentLength Required if the request body is a structured message. Specifies the length of the - * blob/file content inside the message body. Will always be smaller than Content-Length. - * @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 BlobStorageExceptionInternal 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, String structuredBodyType, Long structuredContentLength, - CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, Context context) { - try { - 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.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, structuredBodyType, structuredContentLength, body, 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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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) { - return FluxUtil - .withContext(context -> clearPagesWithResponseAsync(containerName, blob, contentLength, timeout, range, - leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, - encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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"; - 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 - .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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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) { - return FluxUtil - .withContext(context -> clearPagesNoCustomHeadersWithResponseAsync(containerName, blob, contentLength, - timeout, range, leaseId, ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, - cpkInfo, encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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"; - 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 - .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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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. - * @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://learn.microsoft.com/rest/api/storageservices/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. - * @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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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> 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { - return FluxUtil - .withContext(context -> 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, fileRequestIntent, - sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, cpkInfo, - encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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. - * @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://learn.microsoft.com/rest/api/storageservices/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. - * @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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @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 BlobStorageExceptionInternal 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> 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, 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 - .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, - fileRequestIntent, sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, accept, - context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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. - * @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://learn.microsoft.com/rest/api/storageservices/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. - * @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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, 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, fileRequestIntent, sourceEncryptionKey, sourceEncryptionKeySha256, - sourceEncryptionAlgorithm, cpkInfo, encryptionScopeParam) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @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://learn.microsoft.com/rest/api/storageservices/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. - * @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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @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 BlobStorageExceptionInternal 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 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, 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, fileRequestIntent, sourceEncryptionKey, sourceEncryptionKeySha256, - sourceEncryptionAlgorithm, cpkInfo, encryptionScopeParam, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @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://learn.microsoft.com/rest/api/storageservices/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. - * @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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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> 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam) { - return FluxUtil - .withContext(context -> uploadPagesFromURLNoCustomHeadersWithResponseAsync(containerName, blob, sourceUrl, - sourceRange, contentLength, range, sourceContentMD5, sourceContentcrc64, timeout, leaseId, - ifSequenceNumberLessThanOrEqualTo, ifSequenceNumberLessThan, ifSequenceNumberEqualTo, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, sourceIfModifiedSince, sourceIfUnmodifiedSince, - sourceIfMatch, sourceIfNoneMatch, requestId, copySourceAuthorization, fileRequestIntent, - sourceEncryptionKey, sourceEncryptionKeySha256, sourceEncryptionAlgorithm, cpkInfo, - encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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. - * @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://learn.microsoft.com/rest/api/storageservices/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. - * @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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @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 BlobStorageExceptionInternal 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> 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, 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 - .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, fileRequestIntent, sourceEncryptionKey, - sourceEncryptionKeySha256, sourceEncryptionAlgorithm, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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. - * @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://learn.microsoft.com/rest/api/storageservices/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. - * @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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @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 BlobStorageExceptionInternal 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 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, - Context context) { - try { - 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.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, fileRequestIntent, sourceEncryptionKey, - sourceEncryptionKeySha256, sourceEncryptionAlgorithm, 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. - * @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://learn.microsoft.com/rest/api/storageservices/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. - * @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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @param cpkInfo Parameter group. - * @param encryptionScopeParam Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws BlobStorageExceptionInternal 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 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, 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, fileRequestIntent, sourceEncryptionKey, sourceEncryptionKeySha256, - sourceEncryptionAlgorithm, cpkInfo, encryptionScopeParam, Context.NONE); - } - - /** - * 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. - * @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://learn.microsoft.com/rest/api/storageservices/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. - * @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 fileRequestIntent Valid value is backup. - * @param sourceEncryptionKey Optional. Specifies the source encryption key to use to encrypt the source data - * provided in the request. - * @param sourceEncryptionKeySha256 The SHA-256 hash of the provided source encryption key. Must be provided if the - * x-ms-source-encryption-key header is provided. - * @param sourceEncryptionAlgorithm The algorithm used to produce the source encryption key hash. Currently, the - * only accepted value is "AES256". Must be provided if the x-ms-source-encryption-key is provided. - * @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 BlobStorageExceptionInternal 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 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, - FileShareTokenIntent fileRequestIntent, String sourceEncryptionKey, String sourceEncryptionKeySha256, - EncryptionAlgorithmType sourceEncryptionAlgorithm, CpkInfo cpkInfo, EncryptionScope encryptionScopeParam, - Context context) { - try { - 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, fileRequestIntent, sourceEncryptionKey, - sourceEncryptionKeySha256, sourceEncryptionAlgorithm, 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 - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> getPageRangesWithResponseAsync(containerName, blob, snapshot, timeout, range, - leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, - maxresults, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> getPageRangesNoCustomHeadersWithResponseAsync(containerName, blob, snapshot, - timeout, range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, - marker, maxresults, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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 - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - 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 - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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 - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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) { - return FluxUtil - .withContext(context -> getPageRangesDiffWithResponseAsync(containerName, blob, snapshot, timeout, - prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, - ifTags, requestId, marker, maxresults, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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) { - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Context context) { - return getPageRangesDiffWithResponseAsync(containerName, blob, snapshot, timeout, prevsnapshot, prevSnapshotUrl, - range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, marker, - maxresults, context).onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> getPageRangesDiffNoCustomHeadersWithResponseAsync(containerName, blob, snapshot, - timeout, prevsnapshot, prevSnapshotUrl, range, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, - ifNoneMatch, ifTags, requestId, marker, maxresults, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * [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://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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 - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - 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 - * snapshot to retrieve. For more information on working with blob snapshots, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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 - * must be aligned to a 512-byte boundary. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> resizeWithResponseAsync(containerName, blob, blobContentLength, timeout, leaseId, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, - encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return resizeWithResponseAsync(containerName, blob, blobContentLength, timeout, leaseId, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, encryptionScopeParam) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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) { - return FluxUtil - .withContext(context -> resizeNoCustomHeadersWithResponseAsync(containerName, blob, blobContentLength, - timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, cpkInfo, - encryptionScopeParam, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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; - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) { - try { - 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); - } 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 - * must be aligned to a 512-byte boundary. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) { - try { - 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.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); - } - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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) { - return FluxUtil - .withContext(context -> updateSequenceNumberWithResponseAsync(containerName, blob, sequenceNumberAction, - timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, blobSequenceNumber, - requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Context context) { - return updateSequenceNumberWithResponseAsync(containerName, blob, sequenceNumberAction, timeout, leaseId, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, blobSequenceNumber, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> updateSequenceNumberNoCustomHeadersWithResponseAsync(containerName, blob, - sequenceNumberAction, timeout, leaseId, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, - ifTags, blobSequenceNumber, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) { - try { - 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); - } 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 - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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.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); - } - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> copyIncrementalWithResponseAsync( - String containerName, String blob, String copySource, Integer timeout, OffsetDateTime ifModifiedSince, - OffsetDateTime ifUnmodifiedSince, String ifMatch, String ifNoneMatch, String ifTags, String requestId) { - return FluxUtil - .withContext(context -> copyIncrementalWithResponseAsync(containerName, blob, copySource, timeout, - ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> copyIncrementalWithResponseAsync( - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Context context) { - return copyIncrementalWithResponseAsync(containerName, blob, copySource, timeout, ifModifiedSince, - ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> copyIncrementalNoCustomHeadersWithResponseAsync(containerName, blob, copySource, - timeout, ifModifiedSince, ifUnmodifiedSince, ifMatch, ifNoneMatch, ifTags, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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.copyIncrementalNoCustomHeadersSync(this.client.getUrl(), containerName, blob, comp, timeout, - ifModifiedSinceConverted, ifUnmodifiedSinceConverted, ifMatch, ifNoneMatch, ifTags, copySource, - this.client.getVersion(), requestId, accept, context); - } catch (BlobStorageExceptionInternal internalException) { + return service.copyIncrementalSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + copySource, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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 23a29c763e6dc..5110db2a5fe20 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation; import com.azure.core.annotation.BodyParam; @@ -9,7 +9,6 @@ import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; @@ -17,43 +16,15 @@ import com.azure.core.annotation.ServiceInterface; 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.RequestOptions; import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.ResponseBase; import com.azure.core.http.rest.RestProxy; -import com.azure.core.http.rest.StreamResponse; import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.storage.blob.implementation.models.BlobContainersSegment; -import com.azure.storage.blob.implementation.models.BlobStorageExceptionInternal; -import com.azure.storage.blob.implementation.models.FilterBlobSegment; -import com.azure.storage.blob.implementation.models.FilterBlobsIncludeItem; -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.models.ServicesListBlobContainersSegmentHeaders; -import com.azure.storage.blob.implementation.models.ServicesListBlobContainersSegmentNextHeaders; -import com.azure.storage.blob.implementation.models.ServicesSetPropertiesHeaders; -import com.azure.storage.blob.implementation.models.ServicesSubmitBatchHeaders; +import com.azure.storage.blob.BlobServiceVersion; +import com.azure.storage.blob.implementation.models.BlobStorageErrorException; import com.azure.storage.blob.implementation.util.ModelHelper; -import com.azure.storage.blob.models.BlobContainerItem; -import com.azure.storage.blob.models.BlobServiceProperties; -import com.azure.storage.blob.models.BlobServiceStatistics; -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; -import java.util.stream.Collectors; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -81,6 +52,19 @@ public final class ServicesImpl { this.client = client; } + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public BlobServiceVersion getServiceVersion() { + try { + return client.getServiceVersion(); + } catch (BlobStorageErrorException internalException) { + throw ModelHelper.mapToBlobStorageException(internalException); + } + } + /** * The interface defining all the services for AzureBlobStorageServices to be used by the proxy service to perform * REST calls. @@ -89,3121 +73,1277 @@ public final class ServicesImpl { @ServiceInterface(name = "AzureBlobStorageServices") public interface ServicesService { - @Put("/") + @Put("?restype=service&comp=properties") @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); - - @Put("/") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); - - @Put("/") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); - - @Get("/") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); - - @Get("/") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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); - - @Get("/") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); - - @Get("/") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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, + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> setProperties(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/xml") BinaryData storageServiceProperties, RequestOptions requestOptions, Context context); - @Get("/") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); - - @Get("/") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, + @Put("?restype=service&comp=properties") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response setPropertiesSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/xml") BinaryData storageServiceProperties, RequestOptions requestOptions, Context context); - @Get("/") + @Get("?restype=service&comp=properties") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> getProperties(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); - @Get("/") + @Get("?restype=service&comp=properties") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response getPropertiesSync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); - @Post("/") + @Get("?restype=service&comp=stats") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> getStatistics(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); - @Post("/") + @Get("?restype=service&comp=stats") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response getStatisticsSync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); - @Post("/") + @Get("?comp=list") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> listContainersSegment(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); - @Post("/") + @Get("?comp=list") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response listContainersSegmentSync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); - @Get("/") + @Post("?restype=service&comp=userdelegationkey") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> getUserDelegationKey(@HostParam("url") String url, + @HeaderParam("Content-Type") String contentType, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Accept") String accept, @BodyParam("application/xml") BinaryData keyInfo, + RequestOptions requestOptions, Context context); - @Get("/") + @Post("?restype=service&comp=userdelegationkey") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response getUserDelegationKeySync(@HostParam("url") String url, + @HeaderParam("Content-Type") String contentType, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Accept") String accept, @BodyParam("application/xml") BinaryData keyInfo, + RequestOptions requestOptions, Context context); - @Get("/") + @Get("?restype=account&comp=properties") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - ResponseBase getAccountInfoSync(@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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> getAccountInfo(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, RequestOptions requestOptions, Context context); - @Get("/") + @Get("?restype=account&comp=properties") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.class) - Response getAccountInfoNoCustomHeadersSync(@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); - - @Post("/") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response getAccountInfoSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, + RequestOptions requestOptions, Context context); - @Post("/") + @Post("?comp=batch") @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> submitBatch(@HostParam("url") String url, + @HeaderParam("Content-Type") String contentType, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("Accept") String accept, + @BodyParam("multipart/mixed") BinaryData body, RequestOptions requestOptions, Context context); - @Post("/") + @Post("?comp=batch") @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); - - @Post("/") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); - - @Post("/") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); - - @Get("/") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); - - @Get("/") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response submitBatchSync(@HostParam("url") String url, + @HeaderParam("Content-Type") String contentType, @HeaderParam("x-ms-version") String xMsVersion, + @HeaderParam("Content-Length") long contentLength, @HeaderParam("Accept") String accept, + @BodyParam("multipart/mixed") BinaryData body, RequestOptions requestOptions, Context context); - @Get("{nextLink}") + @Get("?comp=blobs") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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, Context context); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Mono> filterBlobs(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @QueryParam("where") String filterExpression, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Get("{nextLink}") + @Get("?comp=blobs") @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(BlobStorageExceptionInternal.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(BlobStorageExceptionInternal.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); + @UnexpectedResponseExceptionType(BlobStorageErrorException.class) + Response filterBlobsSync(@HostParam("url") String url, + @HeaderParam("x-ms-version") String xMsVersion, @QueryParam("where") String filterExpression, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     Logging (Optional): {
+     *         Version: String (Required)
+     *         Delete: boolean (Required)
+     *         Read: boolean (Required)
+     *         Write: boolean (Required)
+     *         RetentionPolicy (Required): {
+     *             Enabled: boolean (Required)
+     *             Days: Integer (Optional)
+     *             AllowPermanentDelete: Boolean (Optional)
+     *         }
+     *     }
+     *     HourMetrics (Optional): {
+     *         Version: String (Optional)
+     *         Enabled: boolean (Required)
+     *         IncludeAPIs: Boolean (Optional)
+     *         RetentionPolicy (Optional): (recursive schema, see RetentionPolicy above)
+     *     }
+     *     MinuteMetrics (Optional): (recursive schema, see MinuteMetrics above)
+     *     Cors (Optional): [
+     *          (Optional){
+     *             AllowedOrigins: String (Required)
+     *             AllowedMethods: String (Required)
+     *             AllowedHeaders: String (Required)
+     *             ExposedHeaders: String (Required)
+     *             MaxAgeInSeconds: int (Required)
+     *         }
+     *     ]
+     *     DefaultServiceVersion: String (Optional)
+     *     DeleteRetentionPolicy (Optional): (recursive schema, see DeleteRetentionPolicy above)
+     *     StaticWebsite (Optional): {
+     *         Enabled: boolean (Required)
+     *         IndexDocument: String (Optional)
+     *         ErrorDocument404Path: String (Optional)
+     *         DefaultIndexDocumentPath: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param storageServiceProperties The storage service properties to set. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - setPropertiesWithResponseAsync(BlobServiceProperties blobServiceProperties, Integer timeout, String requestId) { + public Mono> setPropertiesWithResponseInternalAsync(BinaryData storageServiceProperties, + RequestOptions requestOptions) { + final String contentType = "application/xml"; return FluxUtil - .withContext(context -> setPropertiesWithResponseAsync(blobServiceProperties, timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return setPropertiesWithResponseAsync(blobServiceProperties, timeout, requestId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, - Context context) { - return setPropertiesWithResponseAsync(blobServiceProperties, timeout, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(ignored -> Mono.empty()); + .withContext( + context -> service.setProperties(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + contentType, storageServiceProperties, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); } /** * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     Logging (Optional): {
+     *         Version: String (Required)
+     *         Delete: boolean (Required)
+     *         Read: boolean (Required)
+     *         Write: boolean (Required)
+     *         RetentionPolicy (Required): {
+     *             Enabled: boolean (Required)
+     *             Days: Integer (Optional)
+     *             AllowPermanentDelete: Boolean (Optional)
+     *         }
+     *     }
+     *     HourMetrics (Optional): {
+     *         Version: String (Optional)
+     *         Enabled: boolean (Required)
+     *         IncludeAPIs: Boolean (Optional)
+     *         RetentionPolicy (Optional): (recursive schema, see RetentionPolicy above)
+     *     }
+     *     MinuteMetrics (Optional): (recursive schema, see MinuteMetrics above)
+     *     Cors (Optional): [
+     *          (Optional){
+     *             AllowedOrigins: String (Required)
+     *             AllowedMethods: String (Required)
+     *             AllowedHeaders: String (Required)
+     *             ExposedHeaders: String (Required)
+     *             MaxAgeInSeconds: int (Required)
+     *         }
+     *     ]
+     *     DefaultServiceVersion: String (Optional)
+     *     DeleteRetentionPolicy (Optional): (recursive schema, see DeleteRetentionPolicy above)
+     *     StaticWebsite (Optional): {
+     *         Enabled: boolean (Required)
+     *         IndexDocument: String (Optional)
+     *         ErrorDocument404Path: String (Optional)
+     *         DefaultIndexDocumentPath: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param storageServiceProperties The storage service properties to set. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> setPropertiesNoCustomHeadersWithResponseAsync( - BlobServiceProperties blobServiceProperties, Integer timeout, String requestId) { - return FluxUtil - .withContext(context -> setPropertiesNoCustomHeadersWithResponseAsync(blobServiceProperties, timeout, - requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + public Response setPropertiesWithResponseInternal(BinaryData storageServiceProperties, + RequestOptions requestOptions) { + try { + final String contentType = "application/xml"; + return service.setPropertiesSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + contentType, storageServiceProperties, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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> setPropertiesNoCustomHeadersWithResponseAsync( - BlobServiceProperties blobServiceProperties, Integer timeout, String requestId, Context context) { - final String restype = "service"; - final String comp = "properties"; + * Retrieves properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     Logging (Optional): {
+     *         Version: String (Required)
+     *         Delete: boolean (Required)
+     *         Read: boolean (Required)
+     *         Write: boolean (Required)
+     *         RetentionPolicy (Required): {
+     *             Enabled: boolean (Required)
+     *             Days: Integer (Optional)
+     *             AllowPermanentDelete: Boolean (Optional)
+     *         }
+     *     }
+     *     HourMetrics (Optional): {
+     *         Version: String (Optional)
+     *         Enabled: boolean (Required)
+     *         IncludeAPIs: Boolean (Optional)
+     *         RetentionPolicy (Optional): (recursive schema, see RetentionPolicy above)
+     *     }
+     *     MinuteMetrics (Optional): (recursive schema, see MinuteMetrics above)
+     *     Cors (Optional): [
+     *          (Optional){
+     *             AllowedOrigins: String (Required)
+     *             AllowedMethods: String (Required)
+     *             AllowedHeaders: String (Required)
+     *             ExposedHeaders: String (Required)
+     *             MaxAgeInSeconds: int (Required)
+     *         }
+     *     ]
+     *     DefaultServiceVersion: String (Optional)
+     *     DeleteRetentionPolicy (Optional): (recursive schema, see DeleteRetentionPolicy above)
+     *     StaticWebsite (Optional): {
+     *         Enabled: boolean (Required)
+     *         IndexDocument: String (Optional)
+     *         ErrorDocument404Path: String (Optional)
+     *         DefaultIndexDocumentPath: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the blob service properties along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getPropertiesWithResponseInternalAsync(RequestOptions requestOptions) { final String accept = "application/xml"; - return service - .setPropertiesNoCustomHeaders(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), - requestId, blobServiceProperties, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); + return FluxUtil + .withContext(context -> service.getProperties(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); } /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { + * Retrieves properties of a storage account's Blob service, including properties for Storage Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     Logging (Optional): {
+     *         Version: String (Required)
+     *         Delete: boolean (Required)
+     *         Read: boolean (Required)
+     *         Write: boolean (Required)
+     *         RetentionPolicy (Required): {
+     *             Enabled: boolean (Required)
+     *             Days: Integer (Optional)
+     *             AllowPermanentDelete: Boolean (Optional)
+     *         }
+     *     }
+     *     HourMetrics (Optional): {
+     *         Version: String (Optional)
+     *         Enabled: boolean (Required)
+     *         IncludeAPIs: Boolean (Optional)
+     *         RetentionPolicy (Optional): (recursive schema, see RetentionPolicy above)
+     *     }
+     *     MinuteMetrics (Optional): (recursive schema, see MinuteMetrics above)
+     *     Cors (Optional): [
+     *          (Optional){
+     *             AllowedOrigins: String (Required)
+     *             AllowedMethods: String (Required)
+     *             AllowedHeaders: String (Required)
+     *             ExposedHeaders: String (Required)
+     *             MaxAgeInSeconds: int (Required)
+     *         }
+     *     ]
+     *     DefaultServiceVersion: String (Optional)
+     *     DeleteRetentionPolicy (Optional): (recursive schema, see DeleteRetentionPolicy above)
+     *     StaticWebsite (Optional): {
+     *         Enabled: boolean (Required)
+     *         IndexDocument: String (Optional)
+     *         ErrorDocument404Path: String (Optional)
+     *         DefaultIndexDocumentPath: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the blob service properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPropertiesWithResponseInternal(RequestOptions requestOptions) { try { - 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); - } catch (BlobStorageExceptionInternal internalException) { + return service.getPropertiesSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), accept, + requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * 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. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     GeoReplication (Optional): {
+     *         Status: String(live/bootstrap/unavailable) (Required)
+     *         LastSyncTime: DateTimeRfc1123 (Required)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return stats for the storage service along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void setProperties(BlobServiceProperties blobServiceProperties, Integer timeout, String requestId) { - setPropertiesWithResponse(blobServiceProperties, timeout, requestId, Context.NONE); + public Mono> getStatisticsWithResponseInternalAsync(RequestOptions requestOptions) { + final String accept = "application/xml"; + return FluxUtil + .withContext(context -> service.getStatistics(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); } /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + * 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. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     GeoReplication (Optional): {
+     *         Status: String(live/bootstrap/unavailable) (Required)
+     *         LastSyncTime: DateTimeRfc1123 (Required)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return stats for the storage service along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response setPropertiesNoCustomHeadersWithResponse(BlobServiceProperties blobServiceProperties, - Integer timeout, String requestId, Context context) { + public Response getStatisticsWithResponseInternal(RequestOptions requestOptions) { try { - 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); - } catch (BlobStorageExceptionInternal internalException) { + return service.getStatisticsSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), accept, + requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - getPropertiesWithResponseAsync(Integer timeout, String requestId) { - return FluxUtil.withContext(context -> getPropertiesWithResponseAsync(timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + * Returns a list of the containers in the specified account. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
prefixStringNoFilters the results to return only resources whose name begins + * with the specified prefix.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     ServiceEndpoint: String (Required)
+     *     Prefix: String (Optional)
+     *     Marker: String (Optional)
+     *     MaxResults: Integer (Optional)
+     *     Containers (Required): [
+     *          (Required){
+     *             Name: String (Required)
+     *             Deleted: Boolean (Optional)
+     *             Version: String (Optional)
+     *             Properties (Required): {
+     *                 Last-Modified: DateTimeRfc1123 (Required)
+     *                 Etag: String (Required)
+     *                 LeaseStatus: String(unlocked/locked) (Optional)
+     *                 LeaseState: String(available/leased/expired/breaking/broken) (Optional)
+     *                 LeaseDuration: String(infinite/fixed) (Optional)
+     *                 PublicAccess: String(blob/container) (Optional)
+     *                 HasImmutabilityPolicy: Boolean (Optional)
+     *                 HasLegalHold: Boolean (Optional)
+     *                 DefaultEncryptionScope: String (Optional)
+     *                 DenyEncryptionScopeOverride: Boolean (Optional)
+     *                 DeletedTime: DateTimeRfc1123 (Optional)
+     *                 RemainingRetentionDays: Integer (Optional)
+     *                 ImmutableStorageWithVersioningEnabled: Boolean (Optional)
+     *             }
+     *             Metadata (Optional): {
+     *                 String: String (Required)
+     *             }
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the List Containers API along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - getPropertiesWithResponseAsync(Integer timeout, String requestId, Context context) { - final String restype = "service"; - final String comp = "properties"; + public Mono> listContainersSegmentWithResponseInternalAsync(RequestOptions requestOptions) { final String accept = "application/xml"; - return service - .getProperties(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId, accept, - context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPropertiesAsync(Integer timeout, String requestId) { - return getPropertiesWithResponseAsync(timeout, requestId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPropertiesAsync(Integer timeout, String requestId, Context context) { - return getPropertiesWithResponseAsync(timeout, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getPropertiesNoCustomHeadersWithResponseAsync(Integer timeout, - String requestId) { return FluxUtil - .withContext(context -> getPropertiesNoCustomHeadersWithResponseAsync(timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { + .withContext(context -> service.listContainersSegment(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Returns a list of the containers in the specified account. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
prefixStringNoFilters the results to return only resources whose name begins + * with the specified prefix.
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     ServiceEndpoint: String (Required)
+     *     Prefix: String (Optional)
+     *     Marker: String (Optional)
+     *     MaxResults: Integer (Optional)
+     *     Containers (Required): [
+     *          (Required){
+     *             Name: String (Required)
+     *             Deleted: Boolean (Optional)
+     *             Version: String (Optional)
+     *             Properties (Required): {
+     *                 Last-Modified: DateTimeRfc1123 (Required)
+     *                 Etag: String (Required)
+     *                 LeaseStatus: String(unlocked/locked) (Optional)
+     *                 LeaseState: String(available/leased/expired/breaking/broken) (Optional)
+     *                 LeaseDuration: String(infinite/fixed) (Optional)
+     *                 PublicAccess: String(blob/container) (Optional)
+     *                 HasImmutabilityPolicy: Boolean (Optional)
+     *                 HasLegalHold: Boolean (Optional)
+     *                 DefaultEncryptionScope: String (Optional)
+     *                 DenyEncryptionScopeOverride: Boolean (Optional)
+     *                 DeletedTime: DateTimeRfc1123 (Optional)
+     *                 RemainingRetentionDays: Integer (Optional)
+     *                 ImmutableStorageWithVersioningEnabled: Boolean (Optional)
+     *             }
+     *             Metadata (Optional): {
+     *                 String: String (Required)
+     *             }
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the List Containers API along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listContainersSegmentWithResponseInternal(RequestOptions requestOptions) { try { - 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); - } catch (BlobStorageExceptionInternal internalException) { + return service.listContainersSegmentSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + accept, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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. + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token + * authentication. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     Start: String (Required)
+     *     Expiry: String (Required)
+     *     DelegatedUserTid: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     SignedOid: String (Required)
+     *     SignedTid: String (Required)
+     *     SignedStart: OffsetDateTime (Required)
+     *     SignedExpiry: OffsetDateTime (Required)
+     *     SignedService: String (Required)
+     *     SignedVersion: String (Required)
+     *     SignedDelegatedUserTid: String (Optional)
+     *     Value: String (Required)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param keyInfo Key information provided in the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return a user delegation key along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BlobServiceProperties getProperties(Integer timeout, String requestId) { - try { - return getPropertiesWithResponse(timeout, requestId, Context.NONE).getValue(); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } + public Mono> getUserDelegationKeyWithResponseInternalAsync(BinaryData keyInfo, + RequestOptions requestOptions) { + final String contentType = "application/xml"; + final String accept = "application/xml"; + return FluxUtil + .withContext(context -> service.getUserDelegationKey(this.client.getUrl(), contentType, + this.client.getServiceVersion().getVersion(), accept, keyInfo, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); } /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token + * authentication. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     Start: String (Required)
+     *     Expiry: String (Required)
+     *     DelegatedUserTid: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     SignedOid: String (Required)
+     *     SignedTid: String (Required)
+     *     SignedStart: OffsetDateTime (Required)
+     *     SignedExpiry: OffsetDateTime (Required)
+     *     SignedService: String (Required)
+     *     SignedVersion: String (Required)
+     *     SignedDelegatedUserTid: String (Optional)
+     *     Value: String (Required)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param keyInfo Key information provided in the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return a user delegation key along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPropertiesNoCustomHeadersWithResponse(Integer timeout, String requestId, - Context context) { + public Response getUserDelegationKeyWithResponseInternal(BinaryData keyInfo, + RequestOptions requestOptions) { try { - final String restype = "service"; - final String comp = "properties"; + final String contentType = "application/xml"; final String accept = "application/xml"; - return service.getPropertiesNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, - this.client.getVersion(), requestId, accept, context); - } catch (BlobStorageExceptionInternal internalException) { + return service.getUserDelegationKeySync(this.client.getUrl(), contentType, + this.client.getServiceVersion().getVersion(), accept, keyInfo, requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil.withContext(context -> getStatisticsWithResponseAsync(timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 on successful completion of {@link Mono}. + * Returns information about the storage account. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-sku-nameStringThe SKU name of the account.
x-ms-account-kindStringThe account kind.
x-ms-is-hns-enabledbooleanIndicates if the account has hierarchical namespace + * enabled.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getStatisticsAsync(Integer timeout, String requestId) { - return getStatisticsWithResponseAsync(timeout, requestId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 on successful completion of {@link Mono}. + public Mono> getAccountInfoWithResponseInternalAsync(RequestOptions requestOptions) { + return FluxUtil + .withContext(context -> service.getAccountInfo(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Returns information about the storage account. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-sku-nameStringThe SKU name of the account.
x-ms-account-kindStringThe account kind.
x-ms-is-hns-enabledbooleanIndicates if the account has hierarchical namespace + * enabled.
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getStatisticsAsync(Integer timeout, String requestId, Context context) { - return getStatisticsWithResponseAsync(timeout, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response getAccountInfoWithResponseInternal(RequestOptions requestOptions) { + try { + return service.getAccountInfoSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + requestOptions, Context.NONE); + } catch (BlobStorageErrorException 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. + * Allows multiple API calls to be embedded into a single HTTP request. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     body (Required): {
+     *         content: BinaryData (Required)
+     *         filename: String (Optional)
+     *         contentType: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     body (Required): {
+     *         content: BinaryData (Required)
+     *         filename: String (Optional)
+     *         contentType: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
* - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + * @param contentLength The length of the request. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getStatisticsNoCustomHeadersWithResponseAsync(Integer timeout, - String requestId) { + public Mono> submitBatchWithResponseAsync(long contentLength, BinaryData body, + RequestOptions requestOptions) { + final String contentType = "multipart/mixed"; + final String accept = "multipart/mixed"; return FluxUtil - .withContext(context -> getStatisticsNoCustomHeadersWithResponseAsync(timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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. + .withContext(context -> service.submitBatch(this.client.getUrl(), contentType, + this.client.getServiceVersion().getVersion(), contentLength, accept, body, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Allows multiple API calls to be embedded into a single HTTP request. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     body (Required): {
+     *         content: BinaryData (Required)
+     *         filename: String (Optional)
+     *         contentType: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     body (Required): {
+     *         content: BinaryData (Required)
+     *         filename: String (Optional)
+     *         contentType: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
* - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. + * @param contentLength The length of the request. + * @param body The body of the request. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResponseBase getStatisticsWithResponse(Integer timeout, - String requestId, Context context) { + public Response submitBatchWithResponse(long contentLength, BinaryData body, + RequestOptions requestOptions) { try { - 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); - } catch (BlobStorageExceptionInternal internalException) { + final String contentType = "multipart/mixed"; + final String accept = "multipart/mixed"; + return service.submitBatchSync(this.client.getUrl(), contentType, + this.client.getServiceVersion().getVersion(), contentLength, accept, body, requestOptions, + Context.NONE); + } catch (BlobStorageErrorException 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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. + * Lists blobs across all containers whose tags match a given search expression. + *

Query Parameters

+ * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     ServiceEndpoint: String (Required)
+     *     Where: String (Required)
+     *     Blobs (Required): [
+     *          (Required){
+     *             Name: String (Required)
+     *             ContainerName: String (Required)
+     *             Tags (Optional): {
+     *                 TagSet (Required): [
+     *                      (Required){
+     *                         Key: String (Required)
+     *                         Value: String (Required)
+     *                     }
+     *                 ]
+     *             }
+     *             VersionId: String (Optional)
+     *             IsCurrentVersion: Boolean (Optional)
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param filterExpression Filters the results to return only blobs whose tags match the specified expression. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the Find Blobs by Tags API along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BlobServiceStatistics getStatistics(Integer timeout, String requestId) { - 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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 - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - 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.listBlobContainersSegment(this.client.getUrl(), comp, prefix, marker, - maxresults, listBlobContainersIncludeTypeConverted, timeout, this.client.getVersion(), requestId, - accept, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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 - .listBlobContainersSegment(this.client.getUrl(), comp, prefix, marker, maxresults, - listBlobContainersIncludeTypeConverted, timeout, this.client.getVersion(), requestId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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()); - } 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 - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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()); - } 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 - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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), - 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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. - * @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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 listBlobContainersSegmentNoCustomHeadersSinglePage(String prefix, - String marker, Integer maxresults, List listBlobContainersIncludeType, - Integer timeout, String requestId) { - try { - final String comp = "list"; - final String accept = "application/xml"; - 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); - } 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 - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 listBlobContainersSegmentNoCustomHeadersSinglePage(String prefix, - String marker, Integer maxresults, List listBlobContainersIncludeType, - Integer timeout, String requestId, Context context) { - try { - final String comp = "list"; - final String accept = "application/xml"; - 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); - } 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 - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 listBlobContainersSegmentNoCustomHeaders(String prefix, String marker, - Integer maxresults, List listBlobContainersIncludeType, Integer timeout, - String requestId) { - return new PagedIterable<>( - () -> listBlobContainersSegmentNoCustomHeadersSinglePage(prefix, marker, maxresults, - listBlobContainersIncludeType, timeout, requestId), - 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - getUserDelegationKeyWithResponseAsync(KeyInfo keyInfo, Integer timeout, String requestId) { - return FluxUtil - .withContext(context -> getUserDelegationKeyWithResponseAsync(keyInfo, timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getUserDelegationKeyAsync(KeyInfo keyInfo, Integer timeout, String requestId) { - return getUserDelegationKeyWithResponseAsync(keyInfo, timeout, requestId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getUserDelegationKeyAsync(KeyInfo keyInfo, Integer timeout, String requestId, - Context context) { - return getUserDelegationKeyWithResponseAsync(keyInfo, timeout, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext( - context -> getUserDelegationKeyNoCustomHeadersWithResponseAsync(keyInfo, timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * Returns the sku name and account kind. - * - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil.withContext(context -> getAccountInfoWithResponseAsync(timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * Returns the sku name and account kind. - * - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * Returns the sku name and account kind. - * - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Context context) { - return getAccountInfoWithResponseAsync(timeout, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> getAccountInfoNoCustomHeadersWithResponseAsync(timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * Returns the sku name and account kind. - * - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * Returns the sku name and account kind. - * - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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(Integer timeout, - String requestId, Context context) { - try { - final String restype = "account"; - final String comp = "properties"; - final String accept = "application/xml"; - return service.getAccountInfoSync(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), - requestId, accept, context); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * Returns the sku name and account kind. - * - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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(Integer timeout, String requestId) { - getAccountInfoWithResponse(timeout, requestId, Context.NONE); - } - - /** - * Returns the sku name and account kind. - * - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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(Integer timeout, String requestId, - Context context) { - try { - final String restype = "account"; - final String comp = "properties"; - final String accept = "application/xml"; - return service.getAccountInfoNoCustomHeadersSync(this.client.getUrl(), restype, comp, timeout, - this.client.getVersion(), requestId, 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>. - * @param body Initial data. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> submitBatchWithResponseAsync( - long contentLength, String multipartContentType, Flux body, Integer timeout, String requestId) { - return FluxUtil - .withContext(context -> submitBatchWithResponseAsync(contentLength, multipartContentType, body, timeout, - requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> submitBatchWithResponseAsync( - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return submitBatchWithResponseAsync(contentLength, multipartContentType, body, timeout, requestId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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>. - * @param body Initial data. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Context context) { - return submitBatchWithResponseAsync(contentLength, multipartContentType, body, timeout, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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>. - * @param body Initial data. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> submitBatchNoCustomHeadersWithResponseAsync(contentLength, multipartContentType, - body, timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> submitBatchWithResponseAsync( - long contentLength, String multipartContentType, BinaryData body, Integer timeout, String requestId) { - return FluxUtil - .withContext(context -> submitBatchWithResponseAsync(contentLength, multipartContentType, body, timeout, - requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> submitBatchWithResponseAsync( - 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return submitBatchWithResponseAsync(contentLength, multipartContentType, body, timeout, requestId) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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>. - * @param body Initial data. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, Context context) { - return submitBatchWithResponseAsync(contentLength, multipartContentType, body, timeout, requestId, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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>. - * @param body Initial data. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> submitBatchNoCustomHeadersWithResponseAsync(contentLength, multipartContentType, - body, timeout, requestId, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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, 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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>. - * @param body Initial data. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - 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>. - * @param body Initial data. - * @param timeout The timeout parameter is expressed in seconds. For more information, see <a - * href="https://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - try { - 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); - } 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> filterBlobsWithResponseAsync( - Integer timeout, String requestId, String where, String marker, Integer maxresults, - List include) { - return FluxUtil.withContext( - context -> filterBlobsWithResponseAsync(timeout, requestId, where, marker, maxresults, include, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> filterBlobsWithResponseAsync( - 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 - .filterBlobs(this.client.getUrl(), comp, timeout, this.client.getVersion(), requestId, where, marker, - maxresults, includeConverted, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) { - return filterBlobsWithResponseAsync(timeout, requestId, where, marker, maxresults, include) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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 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) { - return filterBlobsWithResponseAsync(timeout, requestId, where, marker, maxresults, include, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - return FluxUtil - .withContext(context -> filterBlobsNoCustomHeadersWithResponseAsync(timeout, requestId, where, marker, - maxresults, include, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException); - } - - /** - * 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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(Integer timeout, - String requestId, String where, String marker, Integer maxresults, List include, - Context context) { - try { - 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(), 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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) { - 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://learn.microsoft.com/rest/api/storageservices/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 BlobStorageExceptionInternal 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(Integer timeout, String requestId, - String where, String marker, Integer maxresults, List include, Context context) { - try { - 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.filterBlobsNoCustomHeadersSync(this.client.getUrl(), comp, timeout, this.client.getVersion(), - requestId, where, marker, maxresults, includeConverted, accept, context); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param requestId Provides 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 BlobStorageExceptionInternal 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) { - final String accept = "application/xml"; - return FluxUtil - .withContext(context -> service.listBlobContainersSegmentNext(nextLink, this.client.getUrl(), - this.client.getVersion(), requestId, accept, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @param requestId Provides 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 BlobStorageExceptionInternal 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, Context context) { - final String accept = "application/xml"; - return service - .listBlobContainersSegmentNext(nextLink, this.client.getUrl(), this.client.getVersion(), requestId, accept, - context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @param requestId Provides 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 BlobStorageExceptionInternal 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> filterBlobsWithResponseInternalAsync(String filterExpression, + RequestOptions requestOptions) { final String accept = "application/xml"; return FluxUtil - .withContext(context -> service.listBlobContainersSegmentNextNoCustomHeaders(nextLink, this.client.getUrl(), - this.client.getVersion(), requestId, accept, context)) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @param requestId Provides 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 BlobStorageExceptionInternal 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, Context context) { - final String accept = "application/xml"; - return service - .listBlobContainersSegmentNextNoCustomHeaders(nextLink, this.client.getUrl(), this.client.getVersion(), - requestId, accept, context) - .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException) - .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. - * @param requestId Provides 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 BlobStorageExceptionInternal 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) { - try { - 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()); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param requestId Provides 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 BlobStorageExceptionInternal 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) { - try { - 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()); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param requestId Provides 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 BlobStorageExceptionInternal 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) { - try { - 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); - } catch (BlobStorageExceptionInternal internalException) { - throw ModelHelper.mapToBlobStorageException(internalException); - } - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param requestId Provides 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 BlobStorageExceptionInternal 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) { + .withContext(context -> service.filterBlobs(this.client.getUrl(), + this.client.getServiceVersion().getVersion(), filterExpression, accept, requestOptions, context)) + .onErrorMap(BlobStorageErrorException.class, ModelHelper::mapToBlobStorageException); + } + + /** + * Lists blobs across all containers whose tags match a given search expression. + *

Query Parameters

+ * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
timeoutIntegerNoThe timeout parameter is expressed in seconds. For more + * information, see <a + * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting + * Timeouts for Blob Service Operations.</a>
markerStringNoAn opaque string value that identifies the portion of the result + * set to return with this operation.
maxresultsIntegerNoSpecifies the maximum number of resources to return. If the + * request does not specify maxresults, or specifies a value greater than 5000, the server will return up to 5000 + * items.
includeList<String>NoSpecify to include additional, optional + * information. In the form of "," separated string.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     ServiceEndpoint: String (Required)
+     *     Where: String (Required)
+     *     Blobs (Required): [
+     *          (Required){
+     *             Name: String (Required)
+     *             ContainerName: String (Required)
+     *             Tags (Optional): {
+     *                 TagSet (Required): [
+     *                      (Required){
+     *                         Key: String (Required)
+     *                         Value: String (Required)
+     *                     }
+     *                 ]
+     *             }
+     *             VersionId: String (Optional)
+     *             IsCurrentVersion: Boolean (Optional)
+     *         }
+     *     ]
+     *     NextMarker: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
DateOffsetDateTimeDate-time value generated by the service that indicates the time at + * which the response was initiated.
x-ms-versionStringSpecifies the version of the operation to use for this + * request.
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
x-ms-client-request-idStringAn opaque, globally-unique, client-generated string + * identifier for the request.
+ * + * @param filterExpression Filters the results to return only blobs whose tags match the specified expression. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws BlobStorageErrorException thrown if the request is rejected by server. + * @return the result of the Find Blobs by Tags API along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response filterBlobsWithResponseInternal(String filterExpression, + RequestOptions requestOptions) { try { 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); - } catch (BlobStorageExceptionInternal internalException) { + return service.filterBlobsSync(this.client.getUrl(), this.client.getServiceVersion().getVersion(), + filterExpression, accept, requestOptions, Context.NONE); + } catch (BlobStorageErrorException internalException) { throw ModelHelper.mapToBlobStorageException(internalException); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/XmlSerializer.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/XmlSerializer.java new file mode 100644 index 0000000000000..04fbc4eb5cb36 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/XmlSerializer.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation; + +import com.azure.core.util.serializer.ObjectSerializer; +import com.azure.core.util.serializer.TypeReference; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.UncheckedIOException; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.concurrent.ConcurrentHashMap; +import javax.xml.stream.XMLStreamException; +import reactor.core.publisher.Mono; + +// DO NOT modify this helper class + +/** + * An {@link ObjectSerializer} implementation that serializes and deserializes {@link XmlSerializable} types using + * {@code azure-xml}. Deserialization relies on the generated static {@code fromXml(XmlReader)} factory method on the + * target type. + */ +public final class XmlSerializer implements ObjectSerializer { + + private static final ConcurrentHashMap, Method> FROM_XML_CACHE = new ConcurrentHashMap<>(); + + @Override + @SuppressWarnings("unchecked") + public T deserialize(InputStream stream, TypeReference typeReference) { + Class clazz = typeReference.getJavaClass(); + Method fromXml = FROM_XML_CACHE.computeIfAbsent(clazz, c -> { + try { + return c.getDeclaredMethod("fromXml", XmlReader.class); + } catch (NoSuchMethodException e) { + throw new IllegalStateException( + "Type " + c.getName() + " does not have a static fromXml(XmlReader) method.", e); + } + }); + try (XmlReader xmlReader = XmlReader.fromStream(stream)) { + return (T) fromXml.invoke(null, xmlReader); + } catch (XMLStreamException | IllegalAccessException e) { + throw new IllegalStateException(e); + } catch (InvocationTargetException e) { + throw new IllegalStateException(e.getCause() == null ? e : e.getCause()); + } + } + + @Override + public Mono deserializeAsync(InputStream stream, TypeReference typeReference) { + return Mono.fromCallable(() -> deserialize(stream, typeReference)); + } + + @Override + public void serialize(OutputStream stream, Object value) { + if (!(value instanceof XmlSerializable)) { + throw new IllegalArgumentException("Value must implement XmlSerializable to be serialized as XML, but was: " + + (value == null ? "null" : value.getClass().getName())); + } + try (XmlWriter xmlWriter = XmlWriter.toStream(stream)) { + xmlWriter.writeStartDocument(); + xmlWriter.writeXml((XmlSerializable) value); + xmlWriter.flush(); + } catch (XMLStreamException e) { + throw new UncheckedIOException(new IOException(e)); + } + } + + @Override + public Mono serializeAsync(OutputStream stream, Object value) { + return Mono.fromRunnable(() -> serialize(stream, value)); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/XmlSerializerProviders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/XmlSerializerProviders.java new file mode 100644 index 0000000000000..7c5467973c6d4 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/XmlSerializerProviders.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation; + +import com.azure.core.util.serializer.ObjectSerializer; + +// DO NOT modify this helper class + +/** + * This class is a proxy for creating an {@link ObjectSerializer} that serializes and deserializes XML payloads using + * {@code azure-xml}. It mirrors the pattern of {@code JsonSerializerProviders} in {@code azure-core}, but for XML. + */ +public final class XmlSerializerProviders { + + /** + * Creates an instance of an XML {@link ObjectSerializer}. + * + * @return A new instance of an XML {@link ObjectSerializer}. + */ + public static ObjectSerializer createInstance() { + return new XmlSerializer(); + } + + private XmlSerializerProviders() { + // no-op + } +} 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 7f7e3e593af2b..4646449a2acdb 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; @@ -16,96 +16,102 @@ /** * The AppendBlobsAppendBlockFromUrlHeaders model. */ -@Fluent +@Immutable public final class AppendBlobsAppendBlockFromUrlHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* * The Content-MD5 property. */ @Generated - private byte[] contentMD5; + private final byte[] contentMd5; /* * The x-ms-content-crc64 property. */ @Generated - private byte[] xMsContentCrc64; + private final byte[] contentCrc64; /* - * The x-ms-request-id property. + * The x-ms-blob-append-offset property. */ @Generated - private String xMsRequestId; + private final String blobAppendOffset; /* - * The x-ms-version property. + * The x-ms-blob-committed-block-count property. */ @Generated - private String xMsVersion; + private final Integer blobCommittedBlockCount; /* - * The Date property. + * The x-ms-request-server-encrypted property. */ @Generated - private DateTimeRfc1123 date; + private final Boolean isServerEncrypted; /* - * The x-ms-blob-append-offset property. + * The x-ms-encryption-key-sha256 property. */ @Generated - private String xMsBlobAppendOffset; + private final String encryptionKeySha256; /* - * The x-ms-blob-committed-block-count property. + * The x-ms-encryption-scope property. */ @Generated - private Integer xMsBlobCommittedBlockCount; + private final String encryptionScope; /* - * The x-ms-encryption-key-sha256 property. + * The Date property. */ @Generated - private String xMsEncryptionKeySha256; + private final DateTimeRfc1123 date; /* - * The x-ms-encryption-scope property. + * The x-ms-version property. */ @Generated - private String xMsEncryptionScope; + private final String version; /* - * The x-ms-request-server-encrypted property. + * The x-ms-request-id property. */ @Generated - private Boolean xMsRequestServerEncrypted; + private final String requestId; - private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); + /* + * The x-ms-client-request-id property. + */ + @Generated + private final String clientRequestId; - 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_APPEND_OFFSET = HttpHeaderName.fromString("x-ms-blob-append-offset"); private static final HttpHeaderName X_MS_BLOB_COMMITTED_BLOCK_COUNT = HttpHeaderName.fromString("x-ms-blob-committed-block-count"); + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); - private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED - = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); // HttpHeaders containing the raw property values. /** @@ -121,41 +127,42 @@ public AppendBlobsAppendBlockFromUrlHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); - if (contentMD5 != null) { - this.contentMD5 = Base64.getDecoder().decode(contentMD5); + String contentMd5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMd5 != null) { + this.contentMd5 = Base64.getDecoder().decode(contentMd5); } else { - this.contentMD5 = null; + this.contentMd5 = null; } - String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); - if (xMsContentCrc64 != null) { - this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); + String contentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (contentCrc64 != null) { + this.contentCrc64 = Base64.getDecoder().decode(contentCrc64); } else { - this.xMsContentCrc64 = null; + this.contentCrc64 = null; } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - String date = rawHeaders.getValue(HttpHeaderName.DATE); - if (date != null) { - this.date = new DateTimeRfc1123(date); + this.blobAppendOffset = rawHeaders.getValue(X_MS_BLOB_APPEND_OFFSET); + String blobCommittedBlockCount = rawHeaders.getValue(X_MS_BLOB_COMMITTED_BLOCK_COUNT); + if (blobCommittedBlockCount != null) { + this.blobCommittedBlockCount = Integer.parseInt(blobCommittedBlockCount); } else { - this.date = null; + this.blobCommittedBlockCount = null; } - this.xMsBlobAppendOffset = rawHeaders.getValue(X_MS_BLOB_APPEND_OFFSET); - String xMsBlobCommittedBlockCount = rawHeaders.getValue(X_MS_BLOB_COMMITTED_BLOCK_COUNT); - if (xMsBlobCommittedBlockCount != null) { - this.xMsBlobCommittedBlockCount = Integer.parseInt(xMsBlobCommittedBlockCount); + String isServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (isServerEncrypted != null) { + this.isServerEncrypted = Boolean.parseBoolean(isServerEncrypted); } else { - this.xMsBlobCommittedBlockCount = null; + this.isServerEncrypted = null; } - this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); - String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); - if (xMsRequestServerEncrypted != null) { - this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); + this.encryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.encryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); } else { - this.xMsRequestServerEncrypted = null; + this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -168,18 +175,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. - */ - @Generated - public AppendBlobsAppendBlockFromUrlHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -194,107 +189,73 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. - */ - @Generated - public AppendBlobsAppendBlockFromUrlHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the contentMD5 property: The Content-MD5 property. - * - * @return the contentMD5 value. - */ - @Generated - public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); - } - - /** - * Set the contentMD5 property: The Content-MD5 property. + * Get the contentMd5 property: The Content-MD5 property. * - * @param contentMD5 the contentMD5 value to set. - * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. + * @return the contentMd5 value. */ @Generated - public AppendBlobsAppendBlockFromUrlHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); - return this; + public byte[] getContentMd5() { + return CoreUtils.clone(this.contentMd5); } /** - * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. + * Get the contentCrc64 property: The x-ms-content-crc64 property. * - * @return the xMsContentCrc64 value. + * @return the contentCrc64 value. */ @Generated - public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); + public byte[] getContentCrc64() { + return CoreUtils.clone(this.contentCrc64); } /** - * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. + * Get the blobAppendOffset property: The x-ms-blob-append-offset property. * - * @param xMsContentCrc64 the xMsContentCrc64 value to set. - * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. + * @return the blobAppendOffset value. */ @Generated - public AppendBlobsAppendBlockFromUrlHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); - return this; + public String getBlobAppendOffset() { + return this.blobAppendOffset; } /** - * Get the xMsRequestId property: The x-ms-request-id property. + * Get the blobCommittedBlockCount property: The x-ms-blob-committed-block-count property. * - * @return the xMsRequestId value. + * @return the blobCommittedBlockCount value. */ @Generated - public String getXMsRequestId() { - return this.xMsRequestId; + public Integer getBlobCommittedBlockCount() { + return this.blobCommittedBlockCount; } /** - * Set the xMsRequestId property: The x-ms-request-id property. + * Get the isServerEncrypted property: The x-ms-request-server-encrypted property. * - * @param xMsRequestId the xMsRequestId value to set. - * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. + * @return the isServerEncrypted value. */ @Generated - public AppendBlobsAppendBlockFromUrlHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; + public Boolean isServerEncrypted() { + return this.isServerEncrypted; } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the encryptionKeySha256 property: The x-ms-encryption-key-sha256 property. * - * @return the xMsVersion value. + * @return the encryptionKeySha256 value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public String getEncryptionKeySha256() { + return this.encryptionKeySha256; } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the encryptionScope property: The x-ms-encryption-scope property. * - * @param xMsVersion the xMsVersion value to set. - * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. + * @return the encryptionScope value. */ @Generated - public AppendBlobsAppendBlockFromUrlHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getEncryptionScope() { + return this.encryptionScope; } /** @@ -311,128 +272,32 @@ public OffsetDateTime getDate() { } /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. - */ - @Generated - public AppendBlobsAppendBlockFromUrlHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsBlobAppendOffset property: The x-ms-blob-append-offset property. - * - * @return the xMsBlobAppendOffset value. - */ - @Generated - public String getXMsBlobAppendOffset() { - return this.xMsBlobAppendOffset; - } - - /** - * Set the xMsBlobAppendOffset property: The x-ms-blob-append-offset property. - * - * @param xMsBlobAppendOffset the xMsBlobAppendOffset value to set. - * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. - */ - @Generated - public AppendBlobsAppendBlockFromUrlHeaders setXMsBlobAppendOffset(String xMsBlobAppendOffset) { - this.xMsBlobAppendOffset = xMsBlobAppendOffset; - return this; - } - - /** - * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * - * @return the xMsBlobCommittedBlockCount value. - */ - @Generated - public Integer getXMsBlobCommittedBlockCount() { - return this.xMsBlobCommittedBlockCount; - } - - /** - * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * - * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. - * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. - */ - @Generated - public AppendBlobsAppendBlockFromUrlHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCommittedBlockCount) { - this.xMsBlobCommittedBlockCount = xMsBlobCommittedBlockCount; - return this; - } - - /** - * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @return the xMsEncryptionKeySha256 value. - */ - @Generated - public String getXMsEncryptionKeySha256() { - return this.xMsEncryptionKeySha256; - } - - /** - * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. - * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. - */ - @Generated - public AppendBlobsAppendBlockFromUrlHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { - this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; - return this; - } - - /** - * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * - * @return the xMsEncryptionScope value. - */ - @Generated - public String getXMsEncryptionScope() { - return this.xMsEncryptionScope; - } - - /** - * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. + * Get the version property: The x-ms-version property. * - * @param xMsEncryptionScope the xMsEncryptionScope value to set. - * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. + * @return the version value. */ @Generated - public AppendBlobsAppendBlockFromUrlHeaders setXMsEncryptionScope(String xMsEncryptionScope) { - this.xMsEncryptionScope = xMsEncryptionScope; - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsRequestServerEncrypted value. + * @return the requestId value. */ @Generated - public Boolean isXMsRequestServerEncrypted() { - return this.xMsRequestServerEncrypted; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. - * @return the AppendBlobsAppendBlockFromUrlHeaders object itself. + * @return the clientRequestId value. */ @Generated - public AppendBlobsAppendBlockFromUrlHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { - this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 7568a6a471245..d934c2a9e85a0 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; @@ -16,96 +16,94 @@ /** * The AppendBlobsAppendBlockHeaders model. */ -@Fluent +@Immutable public final class AppendBlobsAppendBlockHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* * The Content-MD5 property. */ @Generated - private byte[] contentMD5; + private final byte[] contentMd5; /* * The x-ms-content-crc64 property. */ @Generated - private byte[] xMsContentCrc64; + private final byte[] contentCrc64; /* - * The x-ms-client-request-id property. + * The x-ms-blob-append-offset property. */ @Generated - private String xMsClientRequestId; + private final String blobAppendOffset; /* - * The x-ms-request-id property. + * The x-ms-blob-committed-block-count property. */ @Generated - private String xMsRequestId; + private final Integer blobCommittedBlockCount; /* - * The x-ms-version property. + * The x-ms-request-server-encrypted property. */ @Generated - private String xMsVersion; + private final Boolean isServerEncrypted; /* - * The Date property. + * The x-ms-encryption-key-sha256 property. */ @Generated - private DateTimeRfc1123 date; + private final String encryptionKeySha256; /* - * The x-ms-blob-append-offset property. + * The x-ms-encryption-scope property. */ @Generated - private String xMsBlobAppendOffset; + private final String encryptionScope; /* - * The x-ms-blob-committed-block-count property. + * The x-ms-structured-body property. */ @Generated - private Integer xMsBlobCommittedBlockCount; + private final String structuredBodyType; /* - * The x-ms-request-server-encrypted property. + * The Date property. */ @Generated - private Boolean xMsRequestServerEncrypted; + private final DateTimeRfc1123 date; /* - * The x-ms-encryption-key-sha256 property. + * The x-ms-version property. */ @Generated - private String xMsEncryptionKeySha256; + private final String version; /* - * The x-ms-encryption-scope property. + * The x-ms-request-id property. */ @Generated - private String xMsEncryptionScope; + private final String requestId; /* - * The x-ms-structured-body property. + * The x-ms-client-request-id property. */ @Generated - private String xMsStructuredBody; + private final String clientRequestId; private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_BLOB_APPEND_OFFSET = HttpHeaderName.fromString("x-ms-blob-append-offset"); private static final HttpHeaderName X_MS_BLOB_COMMITTED_BLOCK_COUNT @@ -121,6 +119,8 @@ public final class AppendBlobsAppendBlockHeaders { private static final HttpHeaderName X_MS_STRUCTURED_BODY = HttpHeaderName.fromString("x-ms-structured-body"); + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + // HttpHeaders containing the raw property values. /** * Creates an instance of AppendBlobsAppendBlockHeaders class. @@ -135,43 +135,43 @@ public AppendBlobsAppendBlockHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); - if (contentMD5 != null) { - this.contentMD5 = Base64.getDecoder().decode(contentMD5); + String contentMd5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMd5 != null) { + this.contentMd5 = Base64.getDecoder().decode(contentMd5); } else { - this.contentMD5 = null; + this.contentMd5 = null; } - String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); - if (xMsContentCrc64 != null) { - this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); + String contentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (contentCrc64 != null) { + this.contentCrc64 = Base64.getDecoder().decode(contentCrc64); } else { - this.xMsContentCrc64 = null; + this.contentCrc64 = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - String date = rawHeaders.getValue(HttpHeaderName.DATE); - if (date != null) { - this.date = new DateTimeRfc1123(date); + this.blobAppendOffset = rawHeaders.getValue(X_MS_BLOB_APPEND_OFFSET); + String blobCommittedBlockCount = rawHeaders.getValue(X_MS_BLOB_COMMITTED_BLOCK_COUNT); + if (blobCommittedBlockCount != null) { + this.blobCommittedBlockCount = Integer.parseInt(blobCommittedBlockCount); } else { - this.date = null; + this.blobCommittedBlockCount = null; } - this.xMsBlobAppendOffset = rawHeaders.getValue(X_MS_BLOB_APPEND_OFFSET); - String xMsBlobCommittedBlockCount = rawHeaders.getValue(X_MS_BLOB_COMMITTED_BLOCK_COUNT); - if (xMsBlobCommittedBlockCount != null) { - this.xMsBlobCommittedBlockCount = Integer.parseInt(xMsBlobCommittedBlockCount); + String isServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (isServerEncrypted != null) { + this.isServerEncrypted = Boolean.parseBoolean(isServerEncrypted); } else { - this.xMsBlobCommittedBlockCount = null; + this.isServerEncrypted = null; } - String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); - if (xMsRequestServerEncrypted != null) { - this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); + this.encryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.encryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + this.structuredBodyType = rawHeaders.getValue(X_MS_STRUCTURED_BODY); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); } else { - this.xMsRequestServerEncrypted = null; + this.date = null; } - this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); - this.xMsStructuredBody = rawHeaders.getValue(X_MS_STRUCTURED_BODY); + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -184,18 +184,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the AppendBlobsAppendBlockHeaders object itself. - */ - @Generated - public AppendBlobsAppendBlockHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -210,129 +198,83 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. + * Get the contentMd5 property: The Content-MD5 property. * - * @param lastModified the lastModified value to set. - * @return the AppendBlobsAppendBlockHeaders object itself. + * @return the contentMd5 value. */ @Generated - public AppendBlobsAppendBlockHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; + public byte[] getContentMd5() { + return CoreUtils.clone(this.contentMd5); } /** - * Get the contentMD5 property: The Content-MD5 property. + * Get the contentCrc64 property: The x-ms-content-crc64 property. * - * @return the contentMD5 value. + * @return the contentCrc64 value. */ @Generated - public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + public byte[] getContentCrc64() { + return CoreUtils.clone(this.contentCrc64); } /** - * Set the contentMD5 property: The Content-MD5 property. + * Get the blobAppendOffset property: The x-ms-blob-append-offset property. * - * @param contentMD5 the contentMD5 value to set. - * @return the AppendBlobsAppendBlockHeaders object itself. + * @return the blobAppendOffset value. */ @Generated - public AppendBlobsAppendBlockHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); - return this; + public String getBlobAppendOffset() { + return this.blobAppendOffset; } /** - * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. + * Get the blobCommittedBlockCount property: The x-ms-blob-committed-block-count property. * - * @return the xMsContentCrc64 value. + * @return the blobCommittedBlockCount value. */ @Generated - public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); + public Integer getBlobCommittedBlockCount() { + return this.blobCommittedBlockCount; } /** - * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. + * Get the isServerEncrypted property: The x-ms-request-server-encrypted property. * - * @param xMsContentCrc64 the xMsContentCrc64 value to set. - * @return the AppendBlobsAppendBlockHeaders object itself. + * @return the isServerEncrypted value. */ @Generated - public AppendBlobsAppendBlockHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); - return this; + public Boolean isServerEncrypted() { + return this.isServerEncrypted; } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * Get the encryptionKeySha256 property: The x-ms-encryption-key-sha256 property. * - * @return the xMsClientRequestId value. + * @return the encryptionKeySha256 value. */ @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; + public String getEncryptionKeySha256() { + return this.encryptionKeySha256; } /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * Get the encryptionScope property: The x-ms-encryption-scope property. * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the AppendBlobsAppendBlockHeaders object itself. + * @return the encryptionScope value. */ @Generated - public AppendBlobsAppendBlockHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; + public String getEncryptionScope() { + return this.encryptionScope; } /** - * Get the xMsRequestId property: The x-ms-request-id property. + * Get the structuredBodyType property: The x-ms-structured-body property. * - * @return the xMsRequestId value. + * @return the structuredBodyType value. */ @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the AppendBlobsAppendBlockHeaders object itself. - */ - @Generated - public AppendBlobsAppendBlockHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the AppendBlobsAppendBlockHeaders object itself. - */ - @Generated - public AppendBlobsAppendBlockHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getStructuredBodyType() { + return this.structuredBodyType; } /** @@ -349,150 +291,32 @@ public OffsetDateTime getDate() { } /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the AppendBlobsAppendBlockHeaders object itself. - */ - @Generated - public AppendBlobsAppendBlockHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsBlobAppendOffset property: The x-ms-blob-append-offset property. - * - * @return the xMsBlobAppendOffset value. - */ - @Generated - public String getXMsBlobAppendOffset() { - return this.xMsBlobAppendOffset; - } - - /** - * Set the xMsBlobAppendOffset property: The x-ms-blob-append-offset property. - * - * @param xMsBlobAppendOffset the xMsBlobAppendOffset value to set. - * @return the AppendBlobsAppendBlockHeaders object itself. - */ - @Generated - public AppendBlobsAppendBlockHeaders setXMsBlobAppendOffset(String xMsBlobAppendOffset) { - this.xMsBlobAppendOffset = xMsBlobAppendOffset; - return this; - } - - /** - * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * - * @return the xMsBlobCommittedBlockCount value. - */ - @Generated - public Integer getXMsBlobCommittedBlockCount() { - return this.xMsBlobCommittedBlockCount; - } - - /** - * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * - * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. - * @return the AppendBlobsAppendBlockHeaders object itself. - */ - @Generated - public AppendBlobsAppendBlockHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCommittedBlockCount) { - this.xMsBlobCommittedBlockCount = xMsBlobCommittedBlockCount; - return this; - } - - /** - * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @return the xMsRequestServerEncrypted value. - */ - @Generated - public Boolean isXMsRequestServerEncrypted() { - return this.xMsRequestServerEncrypted; - } - - /** - * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. - * @return the AppendBlobsAppendBlockHeaders object itself. - */ - @Generated - public AppendBlobsAppendBlockHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { - this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; - return this; - } - - /** - * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @return the xMsEncryptionKeySha256 value. - */ - @Generated - public String getXMsEncryptionKeySha256() { - return this.xMsEncryptionKeySha256; - } - - /** - * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. - * @return the AppendBlobsAppendBlockHeaders object itself. - */ - @Generated - public AppendBlobsAppendBlockHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { - this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; - return this; - } - - /** - * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * - * @return the xMsEncryptionScope value. - */ - @Generated - public String getXMsEncryptionScope() { - return this.xMsEncryptionScope; - } - - /** - * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. + * Get the version property: The x-ms-version property. * - * @param xMsEncryptionScope the xMsEncryptionScope value to set. - * @return the AppendBlobsAppendBlockHeaders object itself. + * @return the version value. */ @Generated - public AppendBlobsAppendBlockHeaders setXMsEncryptionScope(String xMsEncryptionScope) { - this.xMsEncryptionScope = xMsEncryptionScope; - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsStructuredBody property: The x-ms-structured-body property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsStructuredBody value. + * @return the requestId value. */ @Generated - public String getXMsStructuredBody() { - return this.xMsStructuredBody; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsStructuredBody property: The x-ms-structured-body property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsStructuredBody the xMsStructuredBody value to set. - * @return the AppendBlobsAppendBlockHeaders object itself. + * @return the clientRequestId value. */ @Generated - public AppendBlobsAppendBlockHeaders setXMsStructuredBody(String xMsStructuredBody) { - this.xMsStructuredBody = xMsStructuredBody; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 26ee089580125..a4694e1109d3b 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; @@ -16,75 +16,73 @@ /** * The AppendBlobsCreateHeaders model. */ -@Fluent +@Immutable public final class AppendBlobsCreateHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* * The Content-MD5 property. */ @Generated - private byte[] contentMD5; + private final byte[] contentMd5; /* - * The x-ms-client-request-id property. + * The x-ms-version-id property. */ @Generated - private String xMsClientRequestId; + private final String versionId; /* - * The x-ms-request-id property. + * The x-ms-request-server-encrypted property. */ @Generated - private String xMsRequestId; + private final Boolean isServerEncrypted; /* - * The x-ms-version property. + * The x-ms-encryption-key-sha256 property. */ @Generated - private String xMsVersion; + private final String encryptionKeySha256; /* - * The x-ms-version-id property. + * The x-ms-encryption-scope property. */ @Generated - private String xMsVersionId; + private final String encryptionScope; /* * The Date property. */ @Generated - private DateTimeRfc1123 date; + private final DateTimeRfc1123 date; /* - * The x-ms-request-server-encrypted property. + * The x-ms-version property. */ @Generated - private Boolean xMsRequestServerEncrypted; + private final String version; /* - * The x-ms-encryption-key-sha256 property. + * The x-ms-request-id property. */ @Generated - private String xMsEncryptionKeySha256; + private final String requestId; /* - * The x-ms-encryption-scope property. + * The x-ms-client-request-id property. */ @Generated - private String xMsEncryptionScope; - - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); @@ -96,6 +94,8 @@ public final class AppendBlobsCreateHeaders { private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + // HttpHeaders containing the raw property values. /** * Creates an instance of AppendBlobsCreateHeaders class. @@ -110,30 +110,30 @@ public AppendBlobsCreateHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); - if (contentMD5 != null) { - this.contentMD5 = Base64.getDecoder().decode(contentMD5); + String contentMd5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMd5 != null) { + this.contentMd5 = Base64.getDecoder().decode(contentMd5); } else { - this.contentMD5 = null; + this.contentMd5 = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); + this.versionId = rawHeaders.getValue(X_MS_VERSION_ID); + String isServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (isServerEncrypted != null) { + this.isServerEncrypted = Boolean.parseBoolean(isServerEncrypted); + } else { + this.isServerEncrypted = null; + } + this.encryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.encryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } - String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); - if (xMsRequestServerEncrypted != null) { - this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); - } else { - this.xMsRequestServerEncrypted = null; - } - this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -146,18 +146,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the AppendBlobsCreateHeaders object itself. - */ - @Generated - public AppendBlobsCreateHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -172,129 +160,53 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the AppendBlobsCreateHeaders object itself. - */ - @Generated - public AppendBlobsCreateHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the contentMD5 property: The Content-MD5 property. - * - * @return the contentMD5 value. - */ - @Generated - public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); - } - - /** - * Set the contentMD5 property: The Content-MD5 property. - * - * @param contentMD5 the contentMD5 value to set. - * @return the AppendBlobsCreateHeaders object itself. - */ - @Generated - public AppendBlobsCreateHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the AppendBlobsCreateHeaders object itself. - */ - @Generated - public AppendBlobsCreateHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. + * Get the contentMd5 property: The Content-MD5 property. * - * @param xMsRequestId the xMsRequestId value to set. - * @return the AppendBlobsCreateHeaders object itself. + * @return the contentMd5 value. */ @Generated - public AppendBlobsCreateHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; + public byte[] getContentMd5() { + return CoreUtils.clone(this.contentMd5); } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the versionId property: The x-ms-version-id property. * - * @return the xMsVersion value. + * @return the versionId value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public String getVersionId() { + return this.versionId; } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the isServerEncrypted property: The x-ms-request-server-encrypted property. * - * @param xMsVersion the xMsVersion value to set. - * @return the AppendBlobsCreateHeaders object itself. + * @return the isServerEncrypted value. */ @Generated - public AppendBlobsCreateHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public Boolean isServerEncrypted() { + return this.isServerEncrypted; } /** - * Get the xMsVersionId property: The x-ms-version-id property. + * Get the encryptionKeySha256 property: The x-ms-encryption-key-sha256 property. * - * @return the xMsVersionId value. + * @return the encryptionKeySha256 value. */ @Generated - public String getXMsVersionId() { - return this.xMsVersionId; + public String getEncryptionKeySha256() { + return this.encryptionKeySha256; } /** - * Set the xMsVersionId property: The x-ms-version-id property. + * Get the encryptionScope property: The x-ms-encryption-scope property. * - * @param xMsVersionId the xMsVersionId value to set. - * @return the AppendBlobsCreateHeaders object itself. + * @return the encryptionScope value. */ @Generated - public AppendBlobsCreateHeaders setXMsVersionId(String xMsVersionId) { - this.xMsVersionId = xMsVersionId; - return this; + public String getEncryptionScope() { + return this.encryptionScope; } /** @@ -311,84 +223,32 @@ public OffsetDateTime getDate() { } /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the AppendBlobsCreateHeaders object itself. - */ - @Generated - public AppendBlobsCreateHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @return the xMsRequestServerEncrypted value. - */ - @Generated - public Boolean isXMsRequestServerEncrypted() { - return this.xMsRequestServerEncrypted; - } - - /** - * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. - * @return the AppendBlobsCreateHeaders object itself. - */ - @Generated - public AppendBlobsCreateHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { - this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; - return this; - } - - /** - * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @return the xMsEncryptionKeySha256 value. - */ - @Generated - public String getXMsEncryptionKeySha256() { - return this.xMsEncryptionKeySha256; - } - - /** - * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * Get the version property: The x-ms-version property. * - * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. - * @return the AppendBlobsCreateHeaders object itself. + * @return the version value. */ @Generated - public AppendBlobsCreateHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { - this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsEncryptionScope value. + * @return the requestId value. */ @Generated - public String getXMsEncryptionScope() { - return this.xMsEncryptionScope; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsEncryptionScope the xMsEncryptionScope value to set. - * @return the AppendBlobsCreateHeaders object itself. + * @return the clientRequestId value. */ @Generated - public AppendBlobsCreateHeaders setXMsEncryptionScope(String xMsEncryptionScope) { - this.xMsEncryptionScope = xMsEncryptionScope; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 880053acf06c4..66b7ba88eafe2 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,54 +14,54 @@ /** * The AppendBlobsSealHeaders model. */ -@Fluent +@Immutable public final class AppendBlobsSealHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* - * The x-ms-client-request-id property. + * The x-ms-blob-sealed property. */ @Generated - private String xMsClientRequestId; + private final Boolean isSealed; /* - * The x-ms-request-id property. + * The Date property. */ @Generated - private String xMsRequestId; + private final DateTimeRfc1123 date; /* * The x-ms-version property. */ @Generated - private String xMsVersion; + private final String version; /* - * The Date property. + * The x-ms-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String requestId; /* - * The x-ms-blob-sealed property. + * The x-ms-client-request-id property. */ @Generated - private Boolean xMsBlobSealed; - - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private final String clientRequestId; private static final HttpHeaderName X_MS_BLOB_SEALED = HttpHeaderName.fromString("x-ms-blob-sealed"); + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + // HttpHeaders containing the raw property values. /** * Creates an instance of AppendBlobsSealHeaders class. @@ -76,21 +76,21 @@ public AppendBlobsSealHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + String isSealed = rawHeaders.getValue(X_MS_BLOB_SEALED); + if (isSealed != null) { + this.isSealed = Boolean.parseBoolean(isSealed); + } else { + this.isSealed = null; + } String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } - String xMsBlobSealed = rawHeaders.getValue(X_MS_BLOB_SEALED); - if (xMsBlobSealed != null) { - this.xMsBlobSealed = Boolean.parseBoolean(xMsBlobSealed); - } else { - this.xMsBlobSealed = null; - } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -103,18 +103,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the AppendBlobsSealHeaders object itself. - */ - @Generated - public AppendBlobsSealHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -129,85 +117,13 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the AppendBlobsSealHeaders object itself. - */ - @Generated - public AppendBlobsSealHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the AppendBlobsSealHeaders object itself. - */ - @Generated - public AppendBlobsSealHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. + * Get the isSealed property: The x-ms-blob-sealed property. * - * @param xMsRequestId the xMsRequestId value to set. - * @return the AppendBlobsSealHeaders object itself. + * @return the isSealed value. */ @Generated - public AppendBlobsSealHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the AppendBlobsSealHeaders object itself. - */ - @Generated - public AppendBlobsSealHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public Boolean isSealed() { + return this.isSealed; } /** @@ -224,40 +140,32 @@ public OffsetDateTime getDate() { } /** - * Set the date property: The Date property. + * Get the version property: The x-ms-version property. * - * @param date the date value to set. - * @return the AppendBlobsSealHeaders object itself. + * @return the version value. */ @Generated - public AppendBlobsSealHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsBlobSealed property: The x-ms-blob-sealed property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsBlobSealed value. + * @return the requestId value. */ @Generated - public Boolean isXMsBlobSealed() { - return this.xMsBlobSealed; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsBlobSealed property: The x-ms-blob-sealed property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsBlobSealed the xMsBlobSealed value to set. - * @return the AppendBlobsSealHeaders object itself. + * @return the clientRequestId value. */ @Generated - public AppendBlobsSealHeaders setXMsBlobSealed(Boolean xMsBlobSealed) { - this.xMsBlobSealed = xMsBlobSealed; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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/ArrowFieldInternal.java similarity index 57% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ArrowField.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ArrowFieldInternal.java index e8c2223a6c4af..86fd4047061b2 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/ArrowFieldInternal.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; @@ -14,43 +14,46 @@ import javax.xml.stream.XMLStreamException; /** - * Groups settings regarding specific field of an arrow schema. + * Represents an Apache Arrow field. */ @Fluent -public final class ArrowField implements XmlSerializable { +public final class ArrowFieldInternal implements XmlSerializable { /* - * The Type property. + * The arrow field type. */ @Generated - private String type; + private final String type; /* - * The Name property. + * The arrow field name. */ @Generated private String name; /* - * The Precision property. + * The arrow field precision. */ @Generated private Integer precision; /* - * The Scale property. + * The arrow field scale. */ @Generated private Integer scale; /** - * Creates an instance of ArrowField class. + * Creates an instance of ArrowFieldInternal class. + * + * @param type the type value to set. */ @Generated - public ArrowField() { + public ArrowFieldInternal(String type) { + this.type = type; } /** - * Get the type property: The Type property. + * Get the type property: The arrow field type. * * @return the type value. */ @@ -60,19 +63,7 @@ public String getType() { } /** - * Set the type property: The Type property. - * - * @param type the type value to set. - * @return the ArrowField object itself. - */ - @Generated - public ArrowField setType(String type) { - this.type = type; - return this; - } - - /** - * Get the name property: The Name property. + * Get the name property: The arrow field name. * * @return the name value. */ @@ -82,19 +73,19 @@ public String getName() { } /** - * Set the name property: The Name property. + * Set the name property: The arrow field name. * * @param name the name value to set. - * @return the ArrowField object itself. + * @return the ArrowFieldInternal object itself. */ @Generated - public ArrowField setName(String name) { + public ArrowFieldInternal setName(String name) { this.name = name; return this; } /** - * Get the precision property: The Precision property. + * Get the precision property: The arrow field precision. * * @return the precision value. */ @@ -104,19 +95,19 @@ public Integer getPrecision() { } /** - * Set the precision property: The Precision property. + * Set the precision property: The arrow field precision. * * @param precision the precision value to set. - * @return the ArrowField object itself. + * @return the ArrowFieldInternal object itself. */ @Generated - public ArrowField setPrecision(Integer precision) { + public ArrowFieldInternal setPrecision(Integer precision) { this.precision = precision; return this; } /** - * Get the scale property: The Scale property. + * Get the scale property: The arrow field scale. * * @return the scale value. */ @@ -126,13 +117,13 @@ public Integer getScale() { } /** - * Set the scale property: The Scale property. + * Set the scale property: The arrow field scale. * * @param scale the scale value to set. - * @return the ArrowField object itself. + * @return the ArrowFieldInternal object itself. */ @Generated - public ArrowField setScale(Integer scale) { + public ArrowFieldInternal setScale(Integer scale) { this.scale = scale; return this; } @@ -156,50 +147,59 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt } /** - * Reads an instance of ArrowField from the XmlReader. + * Reads an instance of ArrowFieldInternal 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 XMLStreamException If an error occurs while reading the ArrowField. + * @return An instance of ArrowFieldInternal 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 ArrowFieldInternal. */ @Generated - public static ArrowField fromXml(XmlReader xmlReader) throws XMLStreamException { + public static ArrowFieldInternal fromXml(XmlReader xmlReader) throws XMLStreamException { return fromXml(xmlReader, null); } /** - * Reads an instance of ArrowField from the XmlReader. + * Reads an instance of ArrowFieldInternal 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 XMLStreamException If an error occurs while reading the ArrowField. + * @return An instance of ArrowFieldInternal 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 ArrowFieldInternal. */ @Generated - public static ArrowField fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + public static ArrowFieldInternal fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "Field" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - ArrowField deserializedArrowField = new ArrowField(); + String type = null; + String name = null; + Integer precision = null; + Integer scale = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); if ("Type".equals(elementName.getLocalPart())) { - deserializedArrowField.type = reader.getStringElement(); + type = reader.getStringElement(); } else if ("Name".equals(elementName.getLocalPart())) { - deserializedArrowField.name = reader.getStringElement(); + name = reader.getStringElement(); } else if ("Precision".equals(elementName.getLocalPart())) { - deserializedArrowField.precision = reader.getNullableElement(Integer::parseInt); + precision = reader.getNullableElement(Integer::parseInt); } else if ("Scale".equals(elementName.getLocalPart())) { - deserializedArrowField.scale = reader.getNullableElement(Integer::parseInt); + scale = reader.getNullableElement(Integer::parseInt); } else { reader.skipElement(); } } + ArrowFieldInternal deserializedArrowFieldInternal = new ArrowFieldInternal(type); + deserializedArrowFieldInternal.name = name; + deserializedArrowFieldInternal.precision = precision; + deserializedArrowFieldInternal.scale = scale; - return deserializedArrowField; + return deserializedArrowFieldInternal; }); } } 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/ArrowTextConfigurationInternal.java similarity index 58% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ArrowConfiguration.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ArrowTextConfigurationInternal.java index 5201843065edf..ff8407ac49b72 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/ArrowTextConfigurationInternal.java @@ -1,63 +1,55 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; 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.Collections; 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. + * Represents the Apache Arrow configuration. */ -@Fluent -public final class ArrowConfiguration implements XmlSerializable { +@Immutable +public final class ArrowTextConfigurationInternal implements XmlSerializable { /* - * The Schema property. + * The Apache Arrow schema. */ @Generated - private List schema; + private final List schema; /** - * Creates an instance of ArrowConfiguration class. + * Creates an instance of ArrowTextConfigurationInternal class. + * + * @param schema the schema value to set. */ @Generated - public ArrowConfiguration() { + public ArrowTextConfigurationInternal(List schema) { + this.schema = schema; } /** - * Get the schema property: The Schema property. + * Get the schema property: The Apache Arrow schema. * * @return the schema value. */ @Generated - public List getSchema() { + public List getSchema() { if (this.schema == null) { - this.schema = new ArrayList<>(); + return Collections.emptyList(); } return this.schema; } - /** - * Set the schema property: The Schema property. - * - * @param schema the schema value to set. - * @return the ArrowConfiguration object itself. - */ - @Generated - public ArrowConfiguration setSchema(List schema) { - this.schema = schema; - return this; - } - @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @@ -71,7 +63,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt xmlWriter.writeStartElement(rootElementName); if (this.schema != null) { xmlWriter.writeStartElement("Schema"); - for (ArrowField element : this.schema) { + for (ArrowFieldInternal element : this.schema) { xmlWriter.writeXml(element, "Field"); } xmlWriter.writeEndElement(); @@ -80,34 +72,37 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt } /** - * Reads an instance of ArrowConfiguration from the XmlReader. + * Reads an instance of ArrowTextConfigurationInternal 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 XMLStreamException If an error occurs while reading the ArrowConfiguration. + * @return An instance of ArrowTextConfigurationInternal 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 ArrowTextConfigurationInternal. */ @Generated - public static ArrowConfiguration fromXml(XmlReader xmlReader) throws XMLStreamException { + public static ArrowTextConfigurationInternal fromXml(XmlReader xmlReader) throws XMLStreamException { return fromXml(xmlReader, null); } /** - * Reads an instance of ArrowConfiguration from the XmlReader. + * Reads an instance of ArrowTextConfigurationInternal 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 XMLStreamException If an error occurs while reading the ArrowConfiguration. + * @return An instance of ArrowTextConfigurationInternal 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 ArrowTextConfigurationInternal. */ @Generated - public static ArrowConfiguration fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + public static ArrowTextConfigurationInternal fromXml(XmlReader xmlReader, String rootElementName) + throws XMLStreamException { String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "ArrowConfiguration" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - ArrowConfiguration deserializedArrowConfiguration = new ArrowConfiguration(); + List schema = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); @@ -115,10 +110,10 @@ public static ArrowConfiguration fromXml(XmlReader xmlReader, String rootElement while (reader.nextElement() != XmlToken.END_ELEMENT) { elementName = reader.getElementName(); if ("Field".equals(elementName.getLocalPart())) { - if (deserializedArrowConfiguration.schema == null) { - deserializedArrowConfiguration.schema = new ArrayList<>(); + if (schema == null) { + schema = new ArrayList<>(); } - deserializedArrowConfiguration.schema.add(ArrowField.fromXml(reader, "Field")); + schema.add(ArrowFieldInternal.fromXml(reader, "Field")); } else { reader.skipElement(); } @@ -127,8 +122,7 @@ public static ArrowConfiguration fromXml(XmlReader xmlReader, String rootElement reader.skipElement(); } } - - return deserializedArrowConfiguration; + return new ArrowTextConfigurationInternal(schema); }); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AuthenticationType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AuthenticationType.java index 76a92bba45e33..67a0999c91eac 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AuthenticationType.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/AuthenticationType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; @@ -13,7 +13,7 @@ */ public final class AuthenticationType extends ExpandableStringEnum { /** - * Static value HMAC for AuthenticationType. + * HMAC authentication. */ @Generated public static final AuthenticationType HMAC = fromString("HMAC"); 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 6726b7ad76fd9..8e1d41bd05d9f 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 @@ -1,71 +1,78 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.storage.blob.models.BlobContainerItem; 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.Collections; import java.util.List; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; /** - * An enumeration of containers. + * The result of the List Containers API. */ -@Fluent +@Immutable public final class BlobContainersSegment implements XmlSerializable { /* - * The ServiceEndpoint property. + * The service endpoint. */ @Generated - private String serviceEndpoint; + private final String serviceEndpoint; /* - * The Prefix property. + * The prefix of the containers. */ @Generated private String prefix; /* - * The Marker property. + * An opaque string value that identifies the portion of the result set returned with this operation. */ @Generated private String marker; /* - * The MaxResults property. + * The maximum number of containers to be returned with this operation. */ @Generated private Integer maxResults; /* - * The NextMarker property. + * The list of containers. */ @Generated - private String nextMarker; + private final List containerItems; /* - * The BlobContainerItems property. + * An opaque string value that identifies the portion of the result set to be returned with the next operation. Use + * this value in the next request to continue the listing operation. */ @Generated - private List blobContainerItems; + private String nextMarker; /** * Creates an instance of BlobContainersSegment class. + * + * @param serviceEndpoint the serviceEndpoint value to set. + * @param containerItems the containerItems value to set. */ @Generated - public BlobContainersSegment() { + private BlobContainersSegment(String serviceEndpoint, List containerItems) { + this.serviceEndpoint = serviceEndpoint; + this.containerItems = containerItems; } /** - * Get the serviceEndpoint property: The ServiceEndpoint property. + * Get the serviceEndpoint property: The service endpoint. * * @return the serviceEndpoint value. */ @@ -75,19 +82,7 @@ public String getServiceEndpoint() { } /** - * Set the serviceEndpoint property: The ServiceEndpoint property. - * - * @param serviceEndpoint the serviceEndpoint value to set. - * @return the BlobContainersSegment object itself. - */ - @Generated - public BlobContainersSegment setServiceEndpoint(String serviceEndpoint) { - this.serviceEndpoint = serviceEndpoint; - return this; - } - - /** - * Get the prefix property: The Prefix property. + * Get the prefix property: The prefix of the containers. * * @return the prefix value. */ @@ -97,19 +92,8 @@ public String getPrefix() { } /** - * Set the prefix property: The Prefix property. - * - * @param prefix the prefix value to set. - * @return the BlobContainersSegment object itself. - */ - @Generated - public BlobContainersSegment setPrefix(String prefix) { - this.prefix = prefix; - return this; - } - - /** - * Get the marker property: The Marker property. + * Get the marker property: An opaque string value that identifies the portion of the result set returned with this + * operation. * * @return the marker value. */ @@ -119,19 +103,7 @@ public String getMarker() { } /** - * Set the marker property: The Marker property. - * - * @param marker the marker value to set. - * @return the BlobContainersSegment object itself. - */ - @Generated - public BlobContainersSegment setMarker(String marker) { - this.marker = marker; - return this; - } - - /** - * Get the maxResults property: The MaxResults property. + * Get the maxResults property: The maximum number of containers to be returned with this operation. * * @return the maxResults value. */ @@ -141,19 +113,21 @@ public Integer getMaxResults() { } /** - * Set the maxResults property: The MaxResults property. + * Get the containerItems property: The list of containers. * - * @param maxResults the maxResults value to set. - * @return the BlobContainersSegment object itself. + * @return the containerItems value. */ @Generated - public BlobContainersSegment setMaxResults(Integer maxResults) { - this.maxResults = maxResults; - return this; + public List getContainerItems() { + if (this.containerItems == null) { + return Collections.emptyList(); + } + return this.containerItems; } /** - * Get the nextMarker property: The NextMarker property. + * Get the nextMarker property: An opaque string value that identifies the portion of the result set to be returned + * with the next operation. Use this value in the next request to continue the listing operation. * * @return the nextMarker value. */ @@ -162,43 +136,6 @@ public String getNextMarker() { return this.nextMarker; } - /** - * Set the nextMarker property: The NextMarker property. - * - * @param nextMarker the nextMarker value to set. - * @return the BlobContainersSegment object itself. - */ - @Generated - public BlobContainersSegment setNextMarker(String nextMarker) { - this.nextMarker = nextMarker; - return this; - } - - /** - * Get the blobContainerItems property: The BlobContainerItems property. - * - * @return the blobContainerItems value. - */ - @Generated - public List getBlobContainerItems() { - if (this.blobContainerItems == null) { - this.blobContainerItems = new ArrayList<>(); - } - return this.blobContainerItems; - } - - /** - * Set the blobContainerItems property: The BlobContainerItems property. - * - * @param blobContainerItems the blobContainerItems value to set. - * @return the BlobContainersSegment object itself. - */ - @Generated - public BlobContainersSegment setBlobContainerItems(List blobContainerItems) { - this.blobContainerItems = blobContainerItems; - return this; - } - @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @@ -214,14 +151,14 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt xmlWriter.writeStringElement("Prefix", this.prefix); xmlWriter.writeStringElement("Marker", this.marker); xmlWriter.writeNumberElement("MaxResults", this.maxResults); - xmlWriter.writeStringElement("NextMarker", this.nextMarker); - if (this.blobContainerItems != null) { + if (this.containerItems != null) { xmlWriter.writeStartElement("Containers"); - for (BlobContainerItem element : this.blobContainerItems) { + for (BlobContainerItem element : this.containerItems) { xmlWriter.writeXml(element, "Container"); } xmlWriter.writeEndElement(); } + xmlWriter.writeStringElement("NextMarker", this.nextMarker); return xmlWriter.writeEndElement(); } @@ -231,6 +168,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt * @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. */ @Generated @@ -246,6 +184,7 @@ public static BlobContainersSegment fromXml(XmlReader xmlReader) throws XMLStrea * 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. */ @Generated @@ -253,36 +192,45 @@ public static BlobContainersSegment fromXml(XmlReader xmlReader, String rootElem String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "EnumerationResults" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - BlobContainersSegment deserializedBlobContainersSegment = new BlobContainersSegment(); - deserializedBlobContainersSegment.serviceEndpoint = reader.getStringAttribute(null, "ServiceEndpoint"); + String prefix = null; + String marker = null; + Integer maxResults = null; + List containerItems = null; + String nextMarker = null; + String serviceEndpoint = reader.getStringAttribute(null, "ServiceEndpoint"); while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); if ("Prefix".equals(elementName.getLocalPart())) { - deserializedBlobContainersSegment.prefix = reader.getStringElement(); + prefix = reader.getStringElement(); } else if ("Marker".equals(elementName.getLocalPart())) { - deserializedBlobContainersSegment.marker = reader.getStringElement(); + 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(); + maxResults = reader.getNullableElement(Integer::parseInt); } 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<>(); + if (containerItems == null) { + containerItems = new ArrayList<>(); } - deserializedBlobContainersSegment.blobContainerItems - .add(BlobContainerItem.fromXml(reader, "Container")); + containerItems.add(BlobContainerItem.fromXml(reader, "Container")); } else { reader.skipElement(); } } + } else if ("NextMarker".equals(elementName.getLocalPart())) { + nextMarker = reader.getStringElement(); } else { reader.skipElement(); } } + BlobContainersSegment deserializedBlobContainersSegment + = new BlobContainersSegment(serviceEndpoint, containerItems); + deserializedBlobContainersSegment.prefix = prefix; + deserializedBlobContainersSegment.marker = marker; + deserializedBlobContainersSegment.maxResults = maxResults; + deserializedBlobContainersSegment.nextMarker = nextMarker; return deserializedBlobContainersSegment; }); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobCopySourceTags.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobCopySourceTags.java index 381e08ff2dff8..e6542968d72b9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobCopySourceTags.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobCopySourceTags.java @@ -1,18 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -/** Defines values for BlobCopySourceTags. */ +/** + * The blob copy source tags types. + */ public enum BlobCopySourceTags { - /** Enum value REPLACE. */ + /** + * The blob tags will be replaced. + */ REPLACE("REPLACE"), - /** Enum value COPY. */ + /** + * The blob tags will be copied from the source. + */ COPY("COPY"); - /** The actual serialized value for a BlobCopySourceTags instance. */ + /** + * The actual serialized value for a BlobCopySourceTags instance. + */ private final String value; BlobCopySourceTags(String value) { @@ -21,11 +29,14 @@ public enum BlobCopySourceTags { /** * Parses a serialized value to a BlobCopySourceTags instance. - * + * * @param value the serialized value to parse. * @return the parsed BlobCopySourceTags object, or null if unable to parse. */ public static BlobCopySourceTags fromString(String value) { + if (value == null) { + return null; + } BlobCopySourceTags[] items = BlobCopySourceTags.values(); for (BlobCopySourceTags item : items) { if (item.toString().equalsIgnoreCase(value)) { @@ -35,6 +46,9 @@ public static BlobCopySourceTags fromString(String value) { return null; } + /** + * {@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/BlobDeleteType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobDeleteType.java index 7b864140c7806..1e38977321aa6 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 @@ -1,51 +1,51 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Generated; -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - /** - * Defines values for BlobDeleteType. + * The type of blob deletions. */ -public final class BlobDeleteType extends ExpandableStringEnum { +public enum BlobDeleteType { /** - * Static value Permanent for BlobDeleteType. + * Permanently delete the blob. */ - @Generated - public static final BlobDeleteType PERMANENT = fromString("Permanent"); + PERMANENT("Permanent"); /** - * Creates a new instance of BlobDeleteType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. + * The actual serialized value for a BlobDeleteType instance. */ - @Generated - @Deprecated - public BlobDeleteType() { + private final String value; + + BlobDeleteType(String value) { + this.value = value; } /** - * Creates or finds a BlobDeleteType from its string representation. + * Parses a serialized value to a BlobDeleteType instance. * - * @param name a name to look for. - * @return the corresponding BlobDeleteType. + * @param value the serialized value to parse. + * @return the parsed BlobDeleteType object, or null if unable to parse. */ - @Generated - public static BlobDeleteType fromString(String name) { - return fromString(name, BlobDeleteType.class); + public static BlobDeleteType fromString(String value) { + if (value == null) { + return null; + } + BlobDeleteType[] items = BlobDeleteType.values(); + for (BlobDeleteType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; } /** - * Gets known BlobDeleteType values. - * - * @return known BlobDeleteType values. + * {@inheritDoc} */ - @Generated - public static Collection values() { - return values(BlobDeleteType.class); + @Override + public String toString() { + return this.value; } } 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 c57feaae4d755..7f32c076aac84 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; @@ -9,29 +9,29 @@ import java.util.Collection; /** - * Defines values for BlobExpiryOptions. + * The blob expiry options. */ public final class BlobExpiryOptions extends ExpandableStringEnum { /** - * Static value NeverExpire for BlobExpiryOptions. + * Never expire. */ @Generated public static final BlobExpiryOptions NEVER_EXPIRE = fromString("NeverExpire"); /** - * Static value RelativeToCreation for BlobExpiryOptions. + * Relative to creation time. */ @Generated public static final BlobExpiryOptions RELATIVE_TO_CREATION = fromString("RelativeToCreation"); /** - * Static value RelativeToNow for BlobExpiryOptions. + * Relative to now. */ @Generated public static final BlobExpiryOptions RELATIVE_TO_NOW = fromString("RelativeToNow"); /** - * Static value Absolute for BlobExpiryOptions. + * Absolute time. */ @Generated public static final BlobExpiryOptions ABSOLUTE = fromString("Absolute"); 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 deleted file mode 100644 index 14eaa958b4fd4..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobFlatListSegment.java +++ /dev/null @@ -1,118 +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.azure.core.annotation.Generated; -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. - */ -@Fluent -public final class BlobFlatListSegment implements XmlSerializable { - /* - * The BlobItems property. - */ - @Generated - private List blobItems = new ArrayList<>(); - - /** - * Creates an instance of BlobFlatListSegment class. - */ - @Generated - public BlobFlatListSegment() { - } - - /** - * Get the blobItems property: The BlobItems property. - * - * @return the blobItems value. - */ - @Generated - public List getBlobItems() { - return this.blobItems; - } - - /** - * Set the blobItems property: The BlobItems property. - * - * @param blobItems the blobItems value to set. - * @return the BlobFlatListSegment object itself. - */ - @Generated - public BlobFlatListSegment setBlobItems(List blobItems) { - this.blobItems = blobItems; - return this; - } - - @Generated - @Override - public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { - return toXml(xmlWriter, null); - } - - @Generated - @Override - public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = rootElementName == null || rootElementName.isEmpty() ? "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 XMLStreamException If an error occurs while reading the BlobFlatListSegment. - */ - @Generated - 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 XMLStreamException If an error occurs while reading the BlobFlatListSegment. - */ - @Generated - public static BlobFlatListSegment fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "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())) { - 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 83cdbb70d02c9..2dbac2c8d627d 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,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -18,51 +18,29 @@ /** * The BlobHierarchyListSegment model. */ -@Fluent +@Immutable public final class BlobHierarchyListSegment implements XmlSerializable { /* - * The BlobPrefixes property. + * The blob items. */ @Generated - private List blobPrefixes = new ArrayList<>(); + private List blobItems = new ArrayList<>(); /* - * The BlobItems property. + * The blob prefixes. */ @Generated - private List blobItems = new ArrayList<>(); + private List blobPrefixes = new ArrayList<>(); /** * Creates an instance of BlobHierarchyListSegment class. */ @Generated - public BlobHierarchyListSegment() { - } - - /** - * Get the blobPrefixes property: The BlobPrefixes property. - * - * @return the blobPrefixes value. - */ - @Generated - public List getBlobPrefixes() { - return this.blobPrefixes; - } - - /** - * Set the blobPrefixes property: The BlobPrefixes property. - * - * @param blobPrefixes the blobPrefixes value to set. - * @return the BlobHierarchyListSegment object itself. - */ - @Generated - public BlobHierarchyListSegment setBlobPrefixes(List blobPrefixes) { - this.blobPrefixes = blobPrefixes; - return this; + private BlobHierarchyListSegment() { } /** - * Get the blobItems property: The BlobItems property. + * Get the blobItems property: The blob items. * * @return the blobItems value. */ @@ -72,15 +50,13 @@ public List getBlobItems() { } /** - * Set the blobItems property: The BlobItems property. + * Get the blobPrefixes property: The blob prefixes. * - * @param blobItems the blobItems value to set. - * @return the BlobHierarchyListSegment object itself. + * @return the blobPrefixes value. */ @Generated - public BlobHierarchyListSegment setBlobItems(List blobItems) { - this.blobItems = blobItems; - return this; + public List getBlobPrefixes() { + return this.blobPrefixes; } @Generated @@ -94,16 +70,16 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { rootElementName = rootElementName == null || rootElementName.isEmpty() ? "Blobs" : rootElementName; xmlWriter.writeStartElement(rootElementName); - if (this.blobPrefixes != null) { - for (BlobPrefixInternal element : this.blobPrefixes) { - xmlWriter.writeXml(element, "BlobPrefix"); - } - } if (this.blobItems != null) { for (BlobItemInternal element : this.blobItems) { xmlWriter.writeXml(element, "Blob"); } } + if (this.blobPrefixes != null) { + for (BlobPrefixInternal element : this.blobPrefixes) { + xmlWriter.writeXml(element, "BlobPrefix"); + } + } return xmlWriter.writeEndElement(); } @@ -139,11 +115,11 @@ public static BlobHierarchyListSegment fromXml(XmlReader xmlReader, String rootE while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); - if ("BlobPrefix".equals(elementName.getLocalPart())) { + if ("Blob".equals(elementName.getLocalPart())) { + deserializedBlobHierarchyListSegment.blobItems.add(BlobItemInternal.fromXml(reader, "Blob")); + } else if ("BlobPrefix".equals(elementName.getLocalPart())) { deserializedBlobHierarchyListSegment.blobPrefixes .add(BlobPrefixInternal.fromXml(reader, "BlobPrefix")); - } else if ("Blob".equals(elementName.getLocalPart())) { - deserializedBlobHierarchyListSegment.blobItems.add(BlobItemInternal.fromXml(reader, "Blob")); } else { reader.skipElement(); } 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 ff98bcc2dbc55..ed2d83eb0c8c6 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 @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; @@ -16,86 +15,97 @@ import javax.xml.stream.XMLStreamException; /** - * An Azure Storage blob. + * Represents a blob. */ @Fluent public final class BlobItemInternal implements XmlSerializable { + /* - * The Name property. + * The name of the blob. */ @Generated private BlobName name; /* - * The Deleted property. + * Whether the blob is deleted. */ @Generated private boolean deleted; /* - * The Snapshot property. + * The snapshot of the blob. */ @Generated private String snapshot; /* - * The VersionId property. + * The version ID of the blob. */ @Generated private String versionId; /* - * The IsCurrentVersion property. + * Whether the blob is the current version. */ @Generated private Boolean isCurrentVersion; /* - * Properties of a blob + * The properties of the blob. */ @Generated private BlobItemPropertiesInternal properties; /* - * Dictionary of + * The metadata of the blob. */ @Generated private Map metadata; /* - * Blob tags + * The tags of the blob. */ @Generated private BlobTags blobTags; /* - * Dictionary of + * The object replication metadata of the blob. */ @Generated private Map objectReplicationMetadata; /* - * The HasVersionsOnly property. + * Whether the blob has versions only. */ @Generated private Boolean hasVersionsOnly; - /* - * The IsPrefix property. + /** + * Creates an instance of BlobItemInternal class. */ @Generated - private Boolean isPrefix; + public BlobItemInternal() { + } /** * Creates an instance of BlobItemInternal class. + * + * @param name the name value to set. + * @param deleted the deleted value to set. + * @param snapshot the snapshot value to set. + * @param properties the properties value to set. */ @Generated - public BlobItemInternal() { + private BlobItemInternal(BlobName name, boolean deleted, String snapshot, BlobItemPropertiesInternal properties) { + this.name = name; + this.deleted = deleted; + this.snapshot = snapshot; + this.properties = properties; } /** - * Get the name property: The Name property. - * + * Get the name property: The name of the blob. + * * @return the name value. */ @Generated @@ -104,8 +114,8 @@ public BlobName getName() { } /** - * Set the name property: The Name property. - * + * Set the name property. + * * @param name the name value to set. * @return the BlobItemInternal object itself. */ @@ -116,8 +126,8 @@ public BlobItemInternal setName(BlobName name) { } /** - * Get the deleted property: The Deleted property. - * + * Get the deleted property: Whether the blob is deleted. + * * @return the deleted value. */ @Generated @@ -126,8 +136,8 @@ public boolean isDeleted() { } /** - * Set the deleted property: The Deleted property. - * + * Set the deleted property. + * * @param deleted the deleted value to set. * @return the BlobItemInternal object itself. */ @@ -138,8 +148,8 @@ public BlobItemInternal setDeleted(boolean deleted) { } /** - * Get the snapshot property: The Snapshot property. - * + * Get the snapshot property: The snapshot of the blob. + * * @return the snapshot value. */ @Generated @@ -148,8 +158,8 @@ public String getSnapshot() { } /** - * Set the snapshot property: The Snapshot property. - * + * Set the snapshot property. + * * @param snapshot the snapshot value to set. * @return the BlobItemInternal object itself. */ @@ -160,8 +170,8 @@ public BlobItemInternal setSnapshot(String snapshot) { } /** - * Get the versionId property: The VersionId property. - * + * Get the versionId property: The version ID of the blob. + * * @return the versionId value. */ @Generated @@ -170,8 +180,8 @@ public String getVersionId() { } /** - * Set the versionId property: The VersionId property. - * + * Set the versionId property. + * * @param versionId the versionId value to set. * @return the BlobItemInternal object itself. */ @@ -182,8 +192,8 @@ public BlobItemInternal setVersionId(String versionId) { } /** - * Get the isCurrentVersion property: The IsCurrentVersion property. - * + * Get the isCurrentVersion property: Whether the blob is the current version. + * * @return the isCurrentVersion value. */ @Generated @@ -192,20 +202,20 @@ public Boolean isCurrentVersion() { } /** - * Set the isCurrentVersion property: The IsCurrentVersion property. - * + * Set the isCurrentVersion property. + * * @param isCurrentVersion the isCurrentVersion value to set. * @return the BlobItemInternal object itself. */ @Generated - public BlobItemInternal setIsCurrentVersion(Boolean isCurrentVersion) { + public BlobItemInternal setCurrentVersion(Boolean isCurrentVersion) { this.isCurrentVersion = isCurrentVersion; return this; } /** - * Get the properties property: Properties of a blob. - * + * Get the properties property: The properties of the blob. + * * @return the properties value. */ @Generated @@ -214,8 +224,8 @@ public BlobItemPropertiesInternal getProperties() { } /** - * Set the properties property: Properties of a blob. - * + * Set the properties property. + * * @param properties the properties value to set. * @return the BlobItemInternal object itself. */ @@ -226,8 +236,8 @@ public BlobItemInternal setProperties(BlobItemPropertiesInternal properties) { } /** - * Get the metadata property: Dictionary of <string>. - * + * Get the metadata property: The metadata of the blob. + * * @return the metadata value. */ @Generated @@ -236,8 +246,8 @@ public Map getMetadata() { } /** - * Set the metadata property: Dictionary of <string>. - * + * Set the metadata property. + * * @param metadata the metadata value to set. * @return the BlobItemInternal object itself. */ @@ -248,8 +258,8 @@ public BlobItemInternal setMetadata(Map metadata) { } /** - * Get the blobTags property: Blob tags. - * + * Get the blobTags property: The tags of the blob. + * * @return the blobTags value. */ @Generated @@ -258,8 +268,8 @@ public BlobTags getBlobTags() { } /** - * Set the blobTags property: Blob tags. - * + * Set the blobTags property. + * * @param blobTags the blobTags value to set. * @return the BlobItemInternal object itself. */ @@ -270,8 +280,8 @@ public BlobItemInternal setBlobTags(BlobTags blobTags) { } /** - * Get the objectReplicationMetadata property: Dictionary of <string>. - * + * Get the objectReplicationMetadata property: The object replication metadata of the blob. + * * @return the objectReplicationMetadata value. */ @Generated @@ -280,8 +290,8 @@ public Map getObjectReplicationMetadata() { } /** - * Set the objectReplicationMetadata property: Dictionary of <string>. - * + * Set the objectReplicationMetadata property. + * * @param objectReplicationMetadata the objectReplicationMetadata value to set. * @return the BlobItemInternal object itself. */ @@ -292,8 +302,8 @@ public BlobItemInternal setObjectReplicationMetadata(Map objectR } /** - * Get the hasVersionsOnly property: The HasVersionsOnly property. - * + * Get the hasVersionsOnly property: Whether the blob has versions only. + * * @return the hasVersionsOnly value. */ @Generated @@ -302,8 +312,8 @@ public Boolean isHasVersionsOnly() { } /** - * Set the hasVersionsOnly property: The HasVersionsOnly property. - * + * Set the hasVersionsOnly property. + * * @param hasVersionsOnly the hasVersionsOnly value to set. * @return the BlobItemInternal object itself. */ @@ -313,28 +323,6 @@ public BlobItemInternal setHasVersionsOnly(Boolean hasVersionsOnly) { return this; } - /** - * Get the isPrefix property: The IsPrefix property. - * - * @return the isPrefix value. - */ - @Generated - public Boolean isPrefix() { - return this.isPrefix; - } - - /** - * Set the isPrefix property: The IsPrefix property. - * - * @param isPrefix the isPrefix value to set. - * @return the BlobItemInternal object itself. - */ - @Generated - public BlobItemInternal setIsPrefix(Boolean isPrefix) { - this.isPrefix = isPrefix; - return this; - } - @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @@ -368,16 +356,16 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt 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. */ @Generated @@ -387,61 +375,73 @@ public static BlobItemInternal fromXml(XmlReader xmlReader) throws XMLStreamExce /** * 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. */ @Generated public static BlobItemInternal fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "Blob" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - BlobItemInternal deserializedBlobItemInternal = new BlobItemInternal(); + BlobName name = null; + boolean deleted = false; + String snapshot = null; + String versionId = null; + Boolean isCurrentVersion = null; + BlobItemPropertiesInternal properties = null; + Map metadata = null; + BlobTags blobTags = null; + Map objectReplicationMetadata = null; + Boolean hasVersionsOnly = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); - if ("Name".equals(elementName.getLocalPart())) { - deserializedBlobItemInternal.name = BlobName.fromXml(reader, "Name"); + name = BlobName.fromXml(reader, "Name"); } else if ("Deleted".equals(elementName.getLocalPart())) { - deserializedBlobItemInternal.deleted = reader.getBooleanElement(); + deleted = reader.getBooleanElement(); } else if ("Snapshot".equals(elementName.getLocalPart())) { - deserializedBlobItemInternal.snapshot = reader.getStringElement(); + snapshot = reader.getStringElement(); } else if ("VersionId".equals(elementName.getLocalPart())) { - deserializedBlobItemInternal.versionId = reader.getStringElement(); + versionId = reader.getStringElement(); } else if ("IsCurrentVersion".equals(elementName.getLocalPart())) { - deserializedBlobItemInternal.isCurrentVersion = reader.getNullableElement(Boolean::parseBoolean); + isCurrentVersion = reader.getNullableElement(Boolean::parseBoolean); } else if ("Properties".equals(elementName.getLocalPart())) { - deserializedBlobItemInternal.properties = BlobItemPropertiesInternal.fromXml(reader, "Properties"); + 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<>(); + if (metadata == null) { + metadata = new LinkedHashMap<>(); } - deserializedBlobItemInternal.metadata.put(reader.getElementName().getLocalPart(), - reader.getStringElement()); + metadata.put(reader.getElementName().getLocalPart(), reader.getStringElement()); } } else if ("Tags".equals(elementName.getLocalPart())) { - deserializedBlobItemInternal.blobTags = BlobTags.fromXml(reader, "Tags"); + 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<>(); + if (objectReplicationMetadata == null) { + objectReplicationMetadata = new LinkedHashMap<>(); } - deserializedBlobItemInternal.objectReplicationMetadata - .put(reader.getElementName().getLocalPart(), reader.getStringElement()); + 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); + hasVersionsOnly = reader.getNullableElement(Boolean::parseBoolean); } else { reader.skipElement(); } } - + BlobItemInternal deserializedBlobItemInternal = new BlobItemInternal(name, deleted, snapshot, properties); + deserializedBlobItemInternal.versionId = versionId; + deserializedBlobItemInternal.isCurrentVersion = isCurrentVersion; + deserializedBlobItemInternal.metadata = metadata; + deserializedBlobItemInternal.blobTags = blobTags; + deserializedBlobItemInternal.objectReplicationMetadata = objectReplicationMetadata; + deserializedBlobItemInternal.hasVersionsOnly = hasVersionsOnly; 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 909005607d596..e64c76ed4afe4 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 @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; @@ -27,253 +26,253 @@ import javax.xml.stream.XMLStreamException; /** - * Properties of a blob. + * The properties of a blob. */ @Fluent public final class BlobItemPropertiesInternal implements XmlSerializable { + /* - * The Creation-Time property. + * The date-time the blob was created. */ @Generated private DateTimeRfc1123 creationTime; /* - * The Last-Modified property. + * The date-time the blob was last modified. */ @Generated private DateTimeRfc1123 lastModified; /* - * The Etag property. + * The blob ETag. */ @Generated private String eTag; /* - * Size in bytes + * The content length of the blob. */ @Generated private Long contentLength; /* - * The Content-Type property. + * The content type of the blob. */ @Generated private String contentType; /* - * The Content-Encoding property. + * The content encoding of the blob. */ @Generated private String contentEncoding; /* - * The Content-Language property. + * The content language of the blob. */ @Generated private String contentLanguage; /* - * The Content-MD5 property. + * The content MD5 of the blob. */ @Generated private byte[] contentMd5; /* - * The Content-Disposition property. + * The content disposition of the blob. */ @Generated private String contentDisposition; /* - * The Cache-Control property. + * The cache control of the blob. */ @Generated private String cacheControl; /* - * The x-ms-blob-sequence-number property. + * The sequence number of the blob. */ @Generated private Long blobSequenceNumber; /* - * The BlobType property. + * The blob type. */ @Generated private BlobType blobType; /* - * The LeaseStatus property. + * The lease status of the blob. */ @Generated private LeaseStatusType leaseStatus; /* - * The LeaseState property. + * The lease state of the blob. */ @Generated private LeaseStateType leaseState; /* - * The LeaseDuration property. + * The lease duration of the blob. */ @Generated private LeaseDurationType leaseDuration; /* - * The CopyId property. + * The copy ID of the blob. */ @Generated private String copyId; /* - * The CopyStatus property. + * The copy status of the blob. */ @Generated private CopyStatusType copyStatus; /* - * The CopySource property. + * The copy source of the blob. */ @Generated private String copySource; /* - * The CopyProgress property. + * The copy progress of the blob. */ @Generated private String copyProgress; /* - * The CopyCompletionTime property. + * The copy completion date-time of the blob. */ @Generated private DateTimeRfc1123 copyCompletionTime; /* - * The CopyStatusDescription property. + * The copy status description of the blob. */ @Generated private String copyStatusDescription; /* - * The ServerEncrypted property. + * Whether the blob is encrypted on the server. */ @Generated private Boolean serverEncrypted; /* - * The IncrementalCopy property. + * Whether the blob is an incremental copy. */ @Generated private Boolean incrementalCopy; /* - * The DestinationSnapshot property. + * The name of the destination snapshot. */ @Generated private String destinationSnapshot; /* - * The DeletedTime property. + * The date-time the blob was deleted. */ @Generated private DateTimeRfc1123 deletedTime; /* - * The RemainingRetentionDays property. + * The remaining retention days of the blob. */ @Generated private Integer remainingRetentionDays; /* - * The AccessTier property. + * The access tier of the blob. */ @Generated private AccessTier accessTier; /* - * The AccessTierInferred property. + * Whether the access tier is inferred. */ @Generated private Boolean accessTierInferred; /* - * The ArchiveStatus property. + * The archive status of the blob. */ @Generated private ArchiveStatus archiveStatus; /* - * The SmartAccessTier property. + * The smart access tier of the blob. */ @Generated private AccessTier smartAccessTier; /* - * The CustomerProvidedKeySha256 property. + * The SHA-256 hash of the blob's encryption key, if provided. */ @Generated private String customerProvidedKeySha256; /* - * The name of the encryption scope under which the blob is encrypted. + * The encryption scope of the blob. */ @Generated private String encryptionScope; /* - * The AccessTierChangeTime property. + * The date-time that the access tier of the blob changed. */ @Generated private DateTimeRfc1123 accessTierChangeTime; /* - * The TagCount property. + * The number of tags for the blob. */ @Generated private Integer tagCount; /* - * The Expiry-Time property. + * The expiry time of the blob. */ @Generated private DateTimeRfc1123 expiresOn; /* - * The Sealed property. + * Whether the blob is sealed. */ @Generated 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. + * The rehydrate priority of the blob. */ @Generated private RehydratePriority rehydratePriority; /* - * The LastAccessTime property. + * The date-time the blob was last accessed. */ @Generated private DateTimeRfc1123 lastAccessedOn; /* - * The ImmutabilityPolicyUntilDate property. + * The date-time the immutability policy of the blob expires. */ @Generated private DateTimeRfc1123 immutabilityPolicyExpiresOn; /* - * The ImmutabilityPolicyMode property. + * The immutability policy mode of the blob. */ @Generated private BlobImmutabilityPolicyMode immutabilityPolicyMode; /* - * The LegalHold property. + * Whether the blob is under legal hold. */ @Generated private Boolean legalHold; @@ -286,8 +285,24 @@ public BlobItemPropertiesInternal() { } /** - * Get the creationTime property: The Creation-Time property. - * + * Creates an instance of BlobItemPropertiesInternal class. + * + * @param lastModified the lastModified value to set. + * @param eTag the eTag value to set. + */ + @Generated + private BlobItemPropertiesInternal(OffsetDateTime lastModified, String eTag) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.eTag = eTag; + } + + /** + * Get the creationTime property: The date-time the blob was created. + * * @return the creationTime value. */ @Generated @@ -299,24 +314,20 @@ public OffsetDateTime getCreationTime() { } /** - * Set the creationTime property: The Creation-Time property. - * + * Set the creationTime property. + * * @param creationTime the creationTime value to set. * @return the BlobItemPropertiesInternal object itself. */ @Generated public BlobItemPropertiesInternal setCreationTime(OffsetDateTime creationTime) { - if (creationTime == null) { - this.creationTime = null; - } else { - this.creationTime = new DateTimeRfc1123(creationTime); - } + this.creationTime = creationTime == null ? null : new DateTimeRfc1123(creationTime); return this; } /** - * Get the lastModified property: The Last-Modified property. - * + * Get the lastModified property: The date-time the blob was last modified. + * * @return the lastModified value. */ @Generated @@ -328,24 +339,20 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. - * + * Set the lastModified property. + * * @param lastModified the lastModified value to set. * @return the BlobItemPropertiesInternal object itself. */ @Generated public BlobItemPropertiesInternal setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } + this.lastModified = lastModified == null ? null : new DateTimeRfc1123(lastModified); return this; } /** - * Get the eTag property: The Etag property. - * + * Get the eTag property: The blob ETag. + * * @return the eTag value. */ @Generated @@ -354,8 +361,8 @@ public String getETag() { } /** - * Set the eTag property: The Etag property. - * + * Set the eTag property. + * * @param eTag the eTag value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -366,8 +373,8 @@ public BlobItemPropertiesInternal setETag(String eTag) { } /** - * Get the contentLength property: Size in bytes. - * + * Get the contentLength property: The content length of the blob. + * * @return the contentLength value. */ @Generated @@ -376,8 +383,8 @@ public Long getContentLength() { } /** - * Set the contentLength property: Size in bytes. - * + * Set the contentLength property. + * * @param contentLength the contentLength value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -388,8 +395,8 @@ public BlobItemPropertiesInternal setContentLength(Long contentLength) { } /** - * Get the contentType property: The Content-Type property. - * + * Get the contentType property: The content type of the blob. + * * @return the contentType value. */ @Generated @@ -398,8 +405,8 @@ public String getContentType() { } /** - * Set the contentType property: The Content-Type property. - * + * Set the contentType property. + * * @param contentType the contentType value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -410,8 +417,8 @@ public BlobItemPropertiesInternal setContentType(String contentType) { } /** - * Get the contentEncoding property: The Content-Encoding property. - * + * Get the contentEncoding property: The content encoding of the blob. + * * @return the contentEncoding value. */ @Generated @@ -420,8 +427,8 @@ public String getContentEncoding() { } /** - * Set the contentEncoding property: The Content-Encoding property. - * + * Set the contentEncoding property. + * * @param contentEncoding the contentEncoding value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -432,8 +439,8 @@ public BlobItemPropertiesInternal setContentEncoding(String contentEncoding) { } /** - * Get the contentLanguage property: The Content-Language property. - * + * Get the contentLanguage property: The content language of the blob. + * * @return the contentLanguage value. */ @Generated @@ -442,8 +449,8 @@ public String getContentLanguage() { } /** - * Set the contentLanguage property: The Content-Language property. - * + * Set the contentLanguage property. + * * @param contentLanguage the contentLanguage value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -454,8 +461,8 @@ public BlobItemPropertiesInternal setContentLanguage(String contentLanguage) { } /** - * Get the contentMd5 property: The Content-MD5 property. - * + * Get the contentMd5 property: The content MD5 of the blob. + * * @return the contentMd5 value. */ @Generated @@ -464,20 +471,20 @@ public byte[] getContentMd5() { } /** - * Set the contentMd5 property: The Content-MD5 property. - * + * Set the contentMd5 property. + * * @param contentMd5 the contentMd5 value to set. * @return the BlobItemPropertiesInternal object itself. */ @Generated public BlobItemPropertiesInternal setContentMd5(byte[] contentMd5) { - this.contentMd5 = CoreUtils.clone(contentMd5); + this.contentMd5 = contentMd5; return this; } /** - * Get the contentDisposition property: The Content-Disposition property. - * + * Get the contentDisposition property: The content disposition of the blob. + * * @return the contentDisposition value. */ @Generated @@ -486,8 +493,8 @@ public String getContentDisposition() { } /** - * Set the contentDisposition property: The Content-Disposition property. - * + * Set the contentDisposition property. + * * @param contentDisposition the contentDisposition value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -498,8 +505,8 @@ public BlobItemPropertiesInternal setContentDisposition(String contentDispositio } /** - * Get the cacheControl property: The Cache-Control property. - * + * Get the cacheControl property: The cache control of the blob. + * * @return the cacheControl value. */ @Generated @@ -508,8 +515,8 @@ public String getCacheControl() { } /** - * Set the cacheControl property: The Cache-Control property. - * + * Set the cacheControl property. + * * @param cacheControl the cacheControl value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -520,8 +527,8 @@ public BlobItemPropertiesInternal setCacheControl(String cacheControl) { } /** - * Get the blobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * Get the blobSequenceNumber property: The sequence number of the blob. + * * @return the blobSequenceNumber value. */ @Generated @@ -530,8 +537,8 @@ public Long getBlobSequenceNumber() { } /** - * Set the blobSequenceNumber property: The x-ms-blob-sequence-number property. - * + * Set the blobSequenceNumber property. + * * @param blobSequenceNumber the blobSequenceNumber value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -542,8 +549,8 @@ public BlobItemPropertiesInternal setBlobSequenceNumber(Long blobSequenceNumber) } /** - * Get the blobType property: The BlobType property. - * + * Get the blobType property: The blob type. + * * @return the blobType value. */ @Generated @@ -552,8 +559,8 @@ public BlobType getBlobType() { } /** - * Set the blobType property: The BlobType property. - * + * Set the blobType property. + * * @param blobType the blobType value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -564,8 +571,8 @@ public BlobItemPropertiesInternal setBlobType(BlobType blobType) { } /** - * Get the leaseStatus property: The LeaseStatus property. - * + * Get the leaseStatus property: The lease status of the blob. + * * @return the leaseStatus value. */ @Generated @@ -574,8 +581,8 @@ public LeaseStatusType getLeaseStatus() { } /** - * Set the leaseStatus property: The LeaseStatus property. - * + * Set the leaseStatus property. + * * @param leaseStatus the leaseStatus value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -586,8 +593,8 @@ public BlobItemPropertiesInternal setLeaseStatus(LeaseStatusType leaseStatus) { } /** - * Get the leaseState property: The LeaseState property. - * + * Get the leaseState property: The lease state of the blob. + * * @return the leaseState value. */ @Generated @@ -596,8 +603,8 @@ public LeaseStateType getLeaseState() { } /** - * Set the leaseState property: The LeaseState property. - * + * Set the leaseState property. + * * @param leaseState the leaseState value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -608,8 +615,8 @@ public BlobItemPropertiesInternal setLeaseState(LeaseStateType leaseState) { } /** - * Get the leaseDuration property: The LeaseDuration property. - * + * Get the leaseDuration property: The lease duration of the blob. + * * @return the leaseDuration value. */ @Generated @@ -618,8 +625,8 @@ public LeaseDurationType getLeaseDuration() { } /** - * Set the leaseDuration property: The LeaseDuration property. - * + * Set the leaseDuration property. + * * @param leaseDuration the leaseDuration value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -630,8 +637,8 @@ public BlobItemPropertiesInternal setLeaseDuration(LeaseDurationType leaseDurati } /** - * Get the copyId property: The CopyId property. - * + * Get the copyId property: The copy ID of the blob. + * * @return the copyId value. */ @Generated @@ -640,8 +647,8 @@ public String getCopyId() { } /** - * Set the copyId property: The CopyId property. - * + * Set the copyId property. + * * @param copyId the copyId value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -652,8 +659,8 @@ public BlobItemPropertiesInternal setCopyId(String copyId) { } /** - * Get the copyStatus property: The CopyStatus property. - * + * Get the copyStatus property: The copy status of the blob. + * * @return the copyStatus value. */ @Generated @@ -662,8 +669,8 @@ public CopyStatusType getCopyStatus() { } /** - * Set the copyStatus property: The CopyStatus property. - * + * Set the copyStatus property. + * * @param copyStatus the copyStatus value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -674,8 +681,8 @@ public BlobItemPropertiesInternal setCopyStatus(CopyStatusType copyStatus) { } /** - * Get the copySource property: The CopySource property. - * + * Get the copySource property: The copy source of the blob. + * * @return the copySource value. */ @Generated @@ -684,8 +691,8 @@ public String getCopySource() { } /** - * Set the copySource property: The CopySource property. - * + * Set the copySource property. + * * @param copySource the copySource value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -696,8 +703,8 @@ public BlobItemPropertiesInternal setCopySource(String copySource) { } /** - * Get the copyProgress property: The CopyProgress property. - * + * Get the copyProgress property: The copy progress of the blob. + * * @return the copyProgress value. */ @Generated @@ -706,8 +713,8 @@ public String getCopyProgress() { } /** - * Set the copyProgress property: The CopyProgress property. - * + * Set the copyProgress property. + * * @param copyProgress the copyProgress value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -718,8 +725,8 @@ public BlobItemPropertiesInternal setCopyProgress(String copyProgress) { } /** - * Get the copyCompletionTime property: The CopyCompletionTime property. - * + * Get the copyCompletionTime property: The copy completion date-time of the blob. + * * @return the copyCompletionTime value. */ @Generated @@ -731,24 +738,20 @@ public OffsetDateTime getCopyCompletionTime() { } /** - * Set the copyCompletionTime property: The CopyCompletionTime property. - * + * Set the copyCompletionTime property. + * * @param copyCompletionTime the copyCompletionTime value to set. * @return the BlobItemPropertiesInternal object itself. */ @Generated public BlobItemPropertiesInternal setCopyCompletionTime(OffsetDateTime copyCompletionTime) { - if (copyCompletionTime == null) { - this.copyCompletionTime = null; - } else { - this.copyCompletionTime = new DateTimeRfc1123(copyCompletionTime); - } + this.copyCompletionTime = copyCompletionTime == null ? null : new DateTimeRfc1123(copyCompletionTime); return this; } /** - * Get the copyStatusDescription property: The CopyStatusDescription property. - * + * Get the copyStatusDescription property: The copy status description of the blob. + * * @return the copyStatusDescription value. */ @Generated @@ -757,8 +760,8 @@ public String getCopyStatusDescription() { } /** - * Set the copyStatusDescription property: The CopyStatusDescription property. - * + * Set the copyStatusDescription property. + * * @param copyStatusDescription the copyStatusDescription value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -769,8 +772,8 @@ public BlobItemPropertiesInternal setCopyStatusDescription(String copyStatusDesc } /** - * Get the serverEncrypted property: The ServerEncrypted property. - * + * Get the serverEncrypted property: Whether the blob is encrypted on the server. + * * @return the serverEncrypted value. */ @Generated @@ -779,8 +782,8 @@ public Boolean isServerEncrypted() { } /** - * Set the serverEncrypted property: The ServerEncrypted property. - * + * Set the serverEncrypted property. + * * @param serverEncrypted the serverEncrypted value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -791,8 +794,8 @@ public BlobItemPropertiesInternal setServerEncrypted(Boolean serverEncrypted) { } /** - * Get the incrementalCopy property: The IncrementalCopy property. - * + * Get the incrementalCopy property: Whether the blob is an incremental copy. + * * @return the incrementalCopy value. */ @Generated @@ -801,8 +804,8 @@ public Boolean isIncrementalCopy() { } /** - * Set the incrementalCopy property: The IncrementalCopy property. - * + * Set the incrementalCopy property. + * * @param incrementalCopy the incrementalCopy value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -813,8 +816,8 @@ public BlobItemPropertiesInternal setIncrementalCopy(Boolean incrementalCopy) { } /** - * Get the destinationSnapshot property: The DestinationSnapshot property. - * + * Get the destinationSnapshot property: The name of the destination snapshot. + * * @return the destinationSnapshot value. */ @Generated @@ -823,8 +826,8 @@ public String getDestinationSnapshot() { } /** - * Set the destinationSnapshot property: The DestinationSnapshot property. - * + * Set the destinationSnapshot property. + * * @param destinationSnapshot the destinationSnapshot value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -835,8 +838,8 @@ public BlobItemPropertiesInternal setDestinationSnapshot(String destinationSnaps } /** - * Get the deletedTime property: The DeletedTime property. - * + * Get the deletedTime property: The date-time the blob was deleted. + * * @return the deletedTime value. */ @Generated @@ -848,24 +851,20 @@ public OffsetDateTime getDeletedTime() { } /** - * Set the deletedTime property: The DeletedTime property. - * + * Set the deletedTime property. + * * @param deletedTime the deletedTime value to set. * @return the BlobItemPropertiesInternal object itself. */ @Generated public BlobItemPropertiesInternal setDeletedTime(OffsetDateTime deletedTime) { - if (deletedTime == null) { - this.deletedTime = null; - } else { - this.deletedTime = new DateTimeRfc1123(deletedTime); - } + this.deletedTime = deletedTime == null ? null : new DateTimeRfc1123(deletedTime); return this; } /** - * Get the remainingRetentionDays property: The RemainingRetentionDays property. - * + * Get the remainingRetentionDays property: The remaining retention days of the blob. + * * @return the remainingRetentionDays value. */ @Generated @@ -874,8 +873,8 @@ public Integer getRemainingRetentionDays() { } /** - * Set the remainingRetentionDays property: The RemainingRetentionDays property. - * + * Set the remainingRetentionDays property. + * * @param remainingRetentionDays the remainingRetentionDays value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -886,8 +885,8 @@ public BlobItemPropertiesInternal setRemainingRetentionDays(Integer remainingRet } /** - * Get the accessTier property: The AccessTier property. - * + * Get the accessTier property: The access tier of the blob. + * * @return the accessTier value. */ @Generated @@ -896,8 +895,8 @@ public AccessTier getAccessTier() { } /** - * Set the accessTier property: The AccessTier property. - * + * Set the accessTier property. + * * @param accessTier the accessTier value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -908,8 +907,8 @@ public BlobItemPropertiesInternal setAccessTier(AccessTier accessTier) { } /** - * Get the accessTierInferred property: The AccessTierInferred property. - * + * Get the accessTierInferred property: Whether the access tier is inferred. + * * @return the accessTierInferred value. */ @Generated @@ -918,8 +917,8 @@ public Boolean isAccessTierInferred() { } /** - * Set the accessTierInferred property: The AccessTierInferred property. - * + * Set the accessTierInferred property. + * * @param accessTierInferred the accessTierInferred value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -930,8 +929,8 @@ public BlobItemPropertiesInternal setAccessTierInferred(Boolean accessTierInferr } /** - * Get the archiveStatus property: The ArchiveStatus property. - * + * Get the archiveStatus property: The archive status of the blob. + * * @return the archiveStatus value. */ @Generated @@ -940,8 +939,8 @@ public ArchiveStatus getArchiveStatus() { } /** - * Set the archiveStatus property: The ArchiveStatus property. - * + * Set the archiveStatus property. + * * @param archiveStatus the archiveStatus value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -952,8 +951,8 @@ public BlobItemPropertiesInternal setArchiveStatus(ArchiveStatus archiveStatus) } /** - * Get the smartAccessTier property: The SmartAccessTier property. - * + * Get the smartAccessTier property: The smart access tier of the blob. + * * @return the smartAccessTier value. */ @Generated @@ -962,8 +961,8 @@ public AccessTier getSmartAccessTier() { } /** - * Set the smartAccessTier property: The SmartAccessTier property. - * + * Set the smartAccessTier property. + * * @param smartAccessTier the smartAccessTier value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -974,8 +973,8 @@ public BlobItemPropertiesInternal setSmartAccessTier(AccessTier smartAccessTier) } /** - * Get the customerProvidedKeySha256 property: The CustomerProvidedKeySha256 property. - * + * Get the customerProvidedKeySha256 property: The SHA-256 hash of the blob's encryption key, if provided. + * * @return the customerProvidedKeySha256 value. */ @Generated @@ -984,8 +983,8 @@ public String getCustomerProvidedKeySha256() { } /** - * Set the customerProvidedKeySha256 property: The CustomerProvidedKeySha256 property. - * + * Set the customerProvidedKeySha256 property. + * * @param customerProvidedKeySha256 the customerProvidedKeySha256 value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -996,8 +995,8 @@ public BlobItemPropertiesInternal setCustomerProvidedKeySha256(String customerPr } /** - * Get the encryptionScope property: The name of the encryption scope under which the blob is encrypted. - * + * Get the encryptionScope property: The encryption scope of the blob. + * * @return the encryptionScope value. */ @Generated @@ -1006,8 +1005,8 @@ public String getEncryptionScope() { } /** - * Set the encryptionScope property: The name of the encryption scope under which the blob is encrypted. - * + * Set the encryptionScope property. + * * @param encryptionScope the encryptionScope value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -1018,8 +1017,8 @@ public BlobItemPropertiesInternal setEncryptionScope(String encryptionScope) { } /** - * Get the accessTierChangeTime property: The AccessTierChangeTime property. - * + * Get the accessTierChangeTime property: The date-time that the access tier of the blob changed. + * * @return the accessTierChangeTime value. */ @Generated @@ -1031,24 +1030,20 @@ public OffsetDateTime getAccessTierChangeTime() { } /** - * Set the accessTierChangeTime property: The AccessTierChangeTime property. - * + * Set the accessTierChangeTime property. + * * @param accessTierChangeTime the accessTierChangeTime value to set. * @return the BlobItemPropertiesInternal object itself. */ @Generated public BlobItemPropertiesInternal setAccessTierChangeTime(OffsetDateTime accessTierChangeTime) { - if (accessTierChangeTime == null) { - this.accessTierChangeTime = null; - } else { - this.accessTierChangeTime = new DateTimeRfc1123(accessTierChangeTime); - } + this.accessTierChangeTime = accessTierChangeTime == null ? null : new DateTimeRfc1123(accessTierChangeTime); return this; } /** - * Get the tagCount property: The TagCount property. - * + * Get the tagCount property: The number of tags for the blob. + * * @return the tagCount value. */ @Generated @@ -1057,8 +1052,8 @@ public Integer getTagCount() { } /** - * Set the tagCount property: The TagCount property. - * + * Set the tagCount property. + * * @param tagCount the tagCount value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -1069,8 +1064,8 @@ public BlobItemPropertiesInternal setTagCount(Integer tagCount) { } /** - * Get the expiresOn property: The Expiry-Time property. - * + * Get the expiresOn property: The expiry time of the blob. + * * @return the expiresOn value. */ @Generated @@ -1082,24 +1077,20 @@ public OffsetDateTime getExpiresOn() { } /** - * Set the expiresOn property: The Expiry-Time property. - * + * Set the expiresOn property. + * * @param expiresOn the expiresOn value to set. * @return the BlobItemPropertiesInternal object itself. */ @Generated public BlobItemPropertiesInternal setExpiresOn(OffsetDateTime expiresOn) { - if (expiresOn == null) { - this.expiresOn = null; - } else { - this.expiresOn = new DateTimeRfc1123(expiresOn); - } + this.expiresOn = expiresOn == null ? null : new DateTimeRfc1123(expiresOn); return this; } /** - * Get the isSealed property: The Sealed property. - * + * Get the isSealed property: Whether the blob is sealed. + * * @return the isSealed value. */ @Generated @@ -1108,21 +1099,20 @@ public Boolean isSealed() { } /** - * Set the isSealed property: The Sealed property. - * + * Set the isSealed property. + * * @param isSealed the isSealed value to set. * @return the BlobItemPropertiesInternal object itself. */ @Generated - public BlobItemPropertiesInternal setIsSealed(Boolean isSealed) { + public BlobItemPropertiesInternal setSealed(Boolean isSealed) { this.isSealed = isSealed; return this; } /** - * 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. - * + * Get the rehydratePriority property: The rehydrate priority of the blob. + * * @return the rehydratePriority value. */ @Generated @@ -1131,9 +1121,8 @@ 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. - * + * Set the rehydratePriority property. + * * @param rehydratePriority the rehydratePriority value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -1144,8 +1133,8 @@ public BlobItemPropertiesInternal setRehydratePriority(RehydratePriority rehydra } /** - * Get the lastAccessedOn property: The LastAccessTime property. - * + * Get the lastAccessedOn property: The date-time the blob was last accessed. + * * @return the lastAccessedOn value. */ @Generated @@ -1157,24 +1146,20 @@ public OffsetDateTime getLastAccessedOn() { } /** - * Set the lastAccessedOn property: The LastAccessTime property. - * + * Set the lastAccessedOn property. + * * @param lastAccessedOn the lastAccessedOn value to set. * @return the BlobItemPropertiesInternal object itself. */ @Generated public BlobItemPropertiesInternal setLastAccessedOn(OffsetDateTime lastAccessedOn) { - if (lastAccessedOn == null) { - this.lastAccessedOn = null; - } else { - this.lastAccessedOn = new DateTimeRfc1123(lastAccessedOn); - } + this.lastAccessedOn = lastAccessedOn == null ? null : new DateTimeRfc1123(lastAccessedOn); return this; } /** - * Get the immutabilityPolicyExpiresOn property: The ImmutabilityPolicyUntilDate property. - * + * Get the immutabilityPolicyExpiresOn property: The date-time the immutability policy of the blob expires. + * * @return the immutabilityPolicyExpiresOn value. */ @Generated @@ -1186,24 +1171,21 @@ public OffsetDateTime getImmutabilityPolicyExpiresOn() { } /** - * Set the immutabilityPolicyExpiresOn property: The ImmutabilityPolicyUntilDate property. - * + * Set the immutabilityPolicyExpiresOn property. + * * @param immutabilityPolicyExpiresOn the immutabilityPolicyExpiresOn value to set. * @return the BlobItemPropertiesInternal object itself. */ @Generated public BlobItemPropertiesInternal setImmutabilityPolicyExpiresOn(OffsetDateTime immutabilityPolicyExpiresOn) { - if (immutabilityPolicyExpiresOn == null) { - this.immutabilityPolicyExpiresOn = null; - } else { - this.immutabilityPolicyExpiresOn = new DateTimeRfc1123(immutabilityPolicyExpiresOn); - } + this.immutabilityPolicyExpiresOn + = immutabilityPolicyExpiresOn == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiresOn); return this; } /** - * Get the immutabilityPolicyMode property: The ImmutabilityPolicyMode property. - * + * Get the immutabilityPolicyMode property: The immutability policy mode of the blob. + * * @return the immutabilityPolicyMode value. */ @Generated @@ -1212,8 +1194,8 @@ public BlobImmutabilityPolicyMode getImmutabilityPolicyMode() { } /** - * Set the immutabilityPolicyMode property: The ImmutabilityPolicyMode property. - * + * Set the immutabilityPolicyMode property. + * * @param immutabilityPolicyMode the immutabilityPolicyMode value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -1224,8 +1206,8 @@ public BlobItemPropertiesInternal setImmutabilityPolicyMode(BlobImmutabilityPoli } /** - * Get the legalHold property: The LegalHold property. - * + * Get the legalHold property: Whether the blob is under legal hold. + * * @return the legalHold value. */ @Generated @@ -1234,8 +1216,8 @@ public Boolean isLegalHold() { } /** - * Set the legalHold property: The LegalHold property. - * + * Set the legalHold property. + * * @param legalHold the legalHold value to set. * @return the BlobItemPropertiesInternal object itself. */ @@ -1308,10 +1290,11 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. */ @Generated @@ -1321,12 +1304,13 @@ public static BlobItemPropertiesInternal fromXml(XmlReader xmlReader) throws XML /** * 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. */ @Generated @@ -1335,118 +1319,179 @@ public static BlobItemPropertiesInternal fromXml(XmlReader xmlReader, String roo String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "Properties" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - BlobItemPropertiesInternal deserializedBlobItemPropertiesInternal = new BlobItemPropertiesInternal(); + DateTimeRfc1123 creationTime = null; + OffsetDateTime lastModified = null; + String eTag = null; + Long contentLength = null; + String contentType = null; + String contentEncoding = null; + String contentLanguage = null; + byte[] contentMd5 = null; + String contentDisposition = null; + String cacheControl = null; + Long blobSequenceNumber = null; + BlobType blobType = null; + LeaseStatusType leaseStatus = null; + LeaseStateType leaseState = null; + LeaseDurationType leaseDuration = null; + String copyId = null; + CopyStatusType copyStatus = null; + String copySource = null; + String copyProgress = null; + DateTimeRfc1123 copyCompletionTime = null; + String copyStatusDescription = null; + Boolean serverEncrypted = null; + Boolean incrementalCopy = null; + String destinationSnapshot = null; + DateTimeRfc1123 deletedTime = null; + Integer remainingRetentionDays = null; + AccessTier accessTier = null; + Boolean accessTierInferred = null; + ArchiveStatus archiveStatus = null; + AccessTier smartAccessTier = null; + String customerProvidedKeySha256 = null; + String encryptionScope = null; + DateTimeRfc1123 accessTierChangeTime = null; + Integer tagCount = null; + DateTimeRfc1123 expiresOn = null; + Boolean isSealed = null; + RehydratePriority rehydratePriority = null; + DateTimeRfc1123 lastAccessedOn = null; + DateTimeRfc1123 immutabilityPolicyExpiresOn = null; + BlobImmutabilityPolicyMode immutabilityPolicyMode = null; + Boolean legalHold = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); - if ("Creation-Time".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.creationTime - = reader.getNullableElement(DateTimeRfc1123::new); + creationTime = reader.getNullableElement(DateTimeRfc1123::new); } else if ("Last-Modified".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.lastModified - = reader.getNullableElement(DateTimeRfc1123::new); + DateTimeRfc1123 lastModifiedHolder = reader.getNullableElement(DateTimeRfc1123::new); + if (lastModifiedHolder != null) { + lastModified = lastModifiedHolder.getDateTime(); + } } else if ("Etag".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.eTag = reader.getStringElement(); + eTag = reader.getStringElement(); } else if ("Content-Length".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.contentLength = reader.getNullableElement(Long::parseLong); + contentLength = reader.getNullableElement(Long::parseLong); } else if ("Content-Type".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.contentType = reader.getStringElement(); + contentType = reader.getStringElement(); } else if ("Content-Encoding".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.contentEncoding = reader.getStringElement(); + contentEncoding = reader.getStringElement(); } else if ("Content-Language".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.contentLanguage = reader.getStringElement(); + contentLanguage = reader.getStringElement(); } else if ("Content-MD5".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.contentMd5 = reader.getBinaryElement(); + contentMd5 = reader.getBinaryElement(); } else if ("Content-Disposition".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.contentDisposition = reader.getStringElement(); + contentDisposition = reader.getStringElement(); } else if ("Cache-Control".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.cacheControl = reader.getStringElement(); + cacheControl = reader.getStringElement(); } else if ("x-ms-blob-sequence-number".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.blobSequenceNumber - = reader.getNullableElement(Long::parseLong); + blobSequenceNumber = reader.getNullableElement(Long::parseLong); } else if ("BlobType".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.blobType = BlobType.fromString(reader.getStringElement()); + blobType = BlobType.fromString(reader.getStringElement()); } else if ("LeaseStatus".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.leaseStatus - = LeaseStatusType.fromString(reader.getStringElement()); + leaseStatus = LeaseStatusType.fromString(reader.getStringElement()); } else if ("LeaseState".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.leaseState - = LeaseStateType.fromString(reader.getStringElement()); + leaseState = LeaseStateType.fromString(reader.getStringElement()); } else if ("LeaseDuration".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.leaseDuration - = LeaseDurationType.fromString(reader.getStringElement()); + leaseDuration = LeaseDurationType.fromString(reader.getStringElement()); } else if ("CopyId".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.copyId = reader.getStringElement(); + copyId = reader.getStringElement(); } else if ("CopyStatus".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.copyStatus - = CopyStatusType.fromString(reader.getStringElement()); + copyStatus = CopyStatusType.fromString(reader.getStringElement()); } else if ("CopySource".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.copySource = reader.getStringElement(); + copySource = reader.getStringElement(); } else if ("CopyProgress".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.copyProgress = reader.getStringElement(); + copyProgress = reader.getStringElement(); } else if ("CopyCompletionTime".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.copyCompletionTime - = reader.getNullableElement(DateTimeRfc1123::new); + copyCompletionTime = reader.getNullableElement(DateTimeRfc1123::new); } else if ("CopyStatusDescription".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.copyStatusDescription = reader.getStringElement(); + copyStatusDescription = reader.getStringElement(); } else if ("ServerEncrypted".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.serverEncrypted - = reader.getNullableElement(Boolean::parseBoolean); + serverEncrypted = reader.getNullableElement(Boolean::parseBoolean); } else if ("IncrementalCopy".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.incrementalCopy - = reader.getNullableElement(Boolean::parseBoolean); + incrementalCopy = reader.getNullableElement(Boolean::parseBoolean); } else if ("DestinationSnapshot".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.destinationSnapshot = reader.getStringElement(); + destinationSnapshot = reader.getStringElement(); } else if ("DeletedTime".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.deletedTime - = reader.getNullableElement(DateTimeRfc1123::new); + deletedTime = reader.getNullableElement(DateTimeRfc1123::new); } else if ("RemainingRetentionDays".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.remainingRetentionDays - = reader.getNullableElement(Integer::parseInt); + remainingRetentionDays = reader.getNullableElement(Integer::parseInt); } else if ("AccessTier".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.accessTier - = AccessTier.fromString(reader.getStringElement()); + accessTier = AccessTier.fromString(reader.getStringElement()); } else if ("AccessTierInferred".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.accessTierInferred - = reader.getNullableElement(Boolean::parseBoolean); + accessTierInferred = reader.getNullableElement(Boolean::parseBoolean); } else if ("ArchiveStatus".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.archiveStatus - = ArchiveStatus.fromString(reader.getStringElement()); + archiveStatus = ArchiveStatus.fromString(reader.getStringElement()); } else if ("SmartAccessTier".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.smartAccessTier - = AccessTier.fromString(reader.getStringElement()); + smartAccessTier = AccessTier.fromString(reader.getStringElement()); } else if ("CustomerProvidedKeySha256".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.customerProvidedKeySha256 = reader.getStringElement(); + customerProvidedKeySha256 = reader.getStringElement(); } else if ("EncryptionScope".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.encryptionScope = reader.getStringElement(); + encryptionScope = reader.getStringElement(); } else if ("AccessTierChangeTime".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.accessTierChangeTime - = reader.getNullableElement(DateTimeRfc1123::new); + accessTierChangeTime = reader.getNullableElement(DateTimeRfc1123::new); } else if ("TagCount".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.tagCount = reader.getNullableElement(Integer::parseInt); + tagCount = reader.getNullableElement(Integer::parseInt); } else if ("Expiry-Time".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.expiresOn = reader.getNullableElement(DateTimeRfc1123::new); + expiresOn = reader.getNullableElement(DateTimeRfc1123::new); } else if ("Sealed".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.isSealed = reader.getNullableElement(Boolean::parseBoolean); + isSealed = reader.getNullableElement(Boolean::parseBoolean); } else if ("RehydratePriority".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.rehydratePriority - = RehydratePriority.fromString(reader.getStringElement()); + rehydratePriority = RehydratePriority.fromString(reader.getStringElement()); } else if ("LastAccessTime".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.lastAccessedOn - = reader.getNullableElement(DateTimeRfc1123::new); + lastAccessedOn = reader.getNullableElement(DateTimeRfc1123::new); } else if ("ImmutabilityPolicyUntilDate".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.immutabilityPolicyExpiresOn - = reader.getNullableElement(DateTimeRfc1123::new); + immutabilityPolicyExpiresOn = reader.getNullableElement(DateTimeRfc1123::new); } else if ("ImmutabilityPolicyMode".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.immutabilityPolicyMode - = BlobImmutabilityPolicyMode.fromString(reader.getStringElement()); + immutabilityPolicyMode = BlobImmutabilityPolicyMode.fromString(reader.getStringElement()); } else if ("LegalHold".equals(elementName.getLocalPart())) { - deserializedBlobItemPropertiesInternal.legalHold = reader.getNullableElement(Boolean::parseBoolean); + legalHold = reader.getNullableElement(Boolean::parseBoolean); } else { reader.skipElement(); } } - + BlobItemPropertiesInternal deserializedBlobItemPropertiesInternal + = new BlobItemPropertiesInternal(lastModified, eTag); + deserializedBlobItemPropertiesInternal.creationTime = creationTime; + deserializedBlobItemPropertiesInternal.contentLength = contentLength; + deserializedBlobItemPropertiesInternal.contentType = contentType; + deserializedBlobItemPropertiesInternal.contentEncoding = contentEncoding; + deserializedBlobItemPropertiesInternal.contentLanguage = contentLanguage; + deserializedBlobItemPropertiesInternal.contentMd5 = contentMd5; + deserializedBlobItemPropertiesInternal.contentDisposition = contentDisposition; + deserializedBlobItemPropertiesInternal.cacheControl = cacheControl; + deserializedBlobItemPropertiesInternal.blobSequenceNumber = blobSequenceNumber; + deserializedBlobItemPropertiesInternal.blobType = blobType; + deserializedBlobItemPropertiesInternal.leaseStatus = leaseStatus; + deserializedBlobItemPropertiesInternal.leaseState = leaseState; + deserializedBlobItemPropertiesInternal.leaseDuration = leaseDuration; + deserializedBlobItemPropertiesInternal.copyId = copyId; + deserializedBlobItemPropertiesInternal.copyStatus = copyStatus; + deserializedBlobItemPropertiesInternal.copySource = copySource; + deserializedBlobItemPropertiesInternal.copyProgress = copyProgress; + deserializedBlobItemPropertiesInternal.copyCompletionTime = copyCompletionTime; + deserializedBlobItemPropertiesInternal.copyStatusDescription = copyStatusDescription; + deserializedBlobItemPropertiesInternal.serverEncrypted = serverEncrypted; + deserializedBlobItemPropertiesInternal.incrementalCopy = incrementalCopy; + deserializedBlobItemPropertiesInternal.destinationSnapshot = destinationSnapshot; + deserializedBlobItemPropertiesInternal.deletedTime = deletedTime; + deserializedBlobItemPropertiesInternal.remainingRetentionDays = remainingRetentionDays; + deserializedBlobItemPropertiesInternal.accessTier = accessTier; + deserializedBlobItemPropertiesInternal.accessTierInferred = accessTierInferred; + deserializedBlobItemPropertiesInternal.archiveStatus = archiveStatus; + deserializedBlobItemPropertiesInternal.smartAccessTier = smartAccessTier; + deserializedBlobItemPropertiesInternal.customerProvidedKeySha256 = customerProvidedKeySha256; + deserializedBlobItemPropertiesInternal.encryptionScope = encryptionScope; + deserializedBlobItemPropertiesInternal.accessTierChangeTime = accessTierChangeTime; + deserializedBlobItemPropertiesInternal.tagCount = tagCount; + deserializedBlobItemPropertiesInternal.expiresOn = expiresOn; + deserializedBlobItemPropertiesInternal.isSealed = isSealed; + deserializedBlobItemPropertiesInternal.rehydratePriority = rehydratePriority; + deserializedBlobItemPropertiesInternal.lastAccessedOn = lastAccessedOn; + deserializedBlobItemPropertiesInternal.immutabilityPolicyExpiresOn = immutabilityPolicyExpiresOn; + deserializedBlobItemPropertiesInternal.immutabilityPolicyMode = immutabilityPolicyMode; + deserializedBlobItemPropertiesInternal.legalHold = legalHold; return deserializedBlobItemPropertiesInternal; }); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutEndpoints.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutEndpoints.java index d36c576717b7a..a6f97e1988afc 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutEndpoints.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutEndpoints.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -16,12 +16,12 @@ import javax.xml.stream.XMLStreamException; /** - * The BlobLayoutEndpoints model. + * The endpoints that serve the ranges of a blob. */ -@Fluent +@Immutable public final class BlobLayoutEndpoints implements XmlSerializable { /* - * The Endpoint property. + * The list of endpoints. */ @Generated private List endpoint = new ArrayList<>(); @@ -30,11 +30,11 @@ public final class BlobLayoutEndpoints implements XmlSerializable getEndpoint() { return this.endpoint; } - /** - * Set the endpoint property: The Endpoint property. - * - * @param endpoint the endpoint value to set. - * @return the BlobLayoutEndpoints object itself. - */ - @Generated - public BlobLayoutEndpoints setEndpoint(List endpoint) { - this.endpoint = endpoint; - return this; - } - @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutEndpointsEndpointItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutEndpointsEndpointItem.java index da6bf06cc26f5..7617b2ecb9114 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutEndpointsEndpointItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutEndpointsEndpointItem.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -13,27 +13,32 @@ import javax.xml.stream.XMLStreamException; /** - * The BlobLayoutEndpointsEndpointItem model. + * An endpoint that serves ranges of a blob. */ -@Fluent +@Immutable public final class BlobLayoutEndpointsEndpointItem implements XmlSerializable { /* * The index of the endpoint, referenced by Range elements. */ @Generated - private int index; + private final int index; /* * The host:port of the endpoint. */ @Generated - private String value; + private final String value; /** * Creates an instance of BlobLayoutEndpointsEndpointItem class. + * + * @param index the index value to set. + * @param value the value value to set. */ @Generated - public BlobLayoutEndpointsEndpointItem() { + private BlobLayoutEndpointsEndpointItem(int index, String value) { + this.index = index; + this.value = value; } /** @@ -46,18 +51,6 @@ public int getIndex() { return this.index; } - /** - * Set the index property: The index of the endpoint, referenced by Range elements. - * - * @param index the index value to set. - * @return the BlobLayoutEndpointsEndpointItem object itself. - */ - @Generated - public BlobLayoutEndpointsEndpointItem setIndex(int index) { - this.index = index; - return this; - } - /** * Get the value property: The host:port of the endpoint. * @@ -68,18 +61,6 @@ public String getValue() { return this.value; } - /** - * Set the value property: The host:port of the endpoint. - * - * @param value the value value to set. - * @return the BlobLayoutEndpointsEndpointItem object itself. - */ - @Generated - public BlobLayoutEndpointsEndpointItem setValue(String value) { - this.value = value; - return this; - } - @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @@ -102,6 +83,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt * @param xmlReader The XmlReader being read. * @return An instance of BlobLayoutEndpointsEndpointItem 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 BlobLayoutEndpointsEndpointItem. */ @Generated @@ -117,6 +99,7 @@ public static BlobLayoutEndpointsEndpointItem fromXml(XmlReader xmlReader) throw * cases where the model can deserialize from different root element names. * @return An instance of BlobLayoutEndpointsEndpointItem 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 BlobLayoutEndpointsEndpointItem. */ @Generated @@ -125,15 +108,12 @@ public static BlobLayoutEndpointsEndpointItem fromXml(XmlReader xmlReader, Strin String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "Endpoint" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - BlobLayoutEndpointsEndpointItem deserializedBlobLayoutEndpointsEndpointItem - = new BlobLayoutEndpointsEndpointItem(); - deserializedBlobLayoutEndpointsEndpointItem.index = reader.getIntAttribute(null, "Index"); - deserializedBlobLayoutEndpointsEndpointItem.value = reader.getStringAttribute(null, "Value"); + int index = reader.getIntAttribute(null, "Index"); + String value = reader.getStringAttribute(null, "Value"); while (reader.nextElement() != XmlToken.END_ELEMENT) { reader.skipElement(); } - - return deserializedBlobLayoutEndpointsEndpointItem; + return new BlobLayoutEndpointsEndpointItem(index, value); }); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutInternal.java index 931d0491791c9..acdadc954e5ac 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutInternal.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -14,18 +14,18 @@ import javax.xml.stream.XMLStreamException; /** - * The BlobLayoutInternal model. + * The result of the Get Blob Layout API. */ -@Fluent +@Immutable public final class BlobLayoutInternal implements XmlSerializable { /* - * The Ranges property. + * The ranges that make up the blob. */ @Generated private BlobLayoutRanges ranges; /* - * The Endpoints property. + * The endpoints that serve the ranges of the blob. */ @Generated private BlobLayoutEndpoints endpoints; @@ -53,11 +53,11 @@ public final class BlobLayoutInternal implements XmlSerializable { - BlobLayoutInternal deserializedBlobLayout = new BlobLayoutInternal(); + BlobLayoutInternal deserializedBlobLayoutInternal = new BlobLayoutInternal(); while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); if ("Ranges".equals(elementName.getLocalPart())) { - deserializedBlobLayout.ranges = BlobLayoutRanges.fromXml(reader, "Ranges"); + deserializedBlobLayoutInternal.ranges = BlobLayoutRanges.fromXml(reader, "Ranges"); } else if ("Endpoints".equals(elementName.getLocalPart())) { - deserializedBlobLayout.endpoints = BlobLayoutEndpoints.fromXml(reader, "Endpoints"); + deserializedBlobLayoutInternal.endpoints = BlobLayoutEndpoints.fromXml(reader, "Endpoints"); } else if ("Marker".equals(elementName.getLocalPart())) { - deserializedBlobLayout.marker = reader.getStringElement(); + deserializedBlobLayoutInternal.marker = reader.getStringElement(); } else if ("NextMarker".equals(elementName.getLocalPart())) { - deserializedBlobLayout.nextMarker = reader.getStringElement(); + deserializedBlobLayoutInternal.nextMarker = reader.getStringElement(); } else if ("MaxResults".equals(elementName.getLocalPart())) { - deserializedBlobLayout.maxResults = reader.getNullableElement(Integer::parseInt); + deserializedBlobLayoutInternal.maxResults = reader.getNullableElement(Integer::parseInt); } else { reader.skipElement(); } } - return deserializedBlobLayout; + return deserializedBlobLayoutInternal; }); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutRanges.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutRanges.java index a2fab78619cab..4b09189ae7d9e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutRanges.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutRanges.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -16,12 +16,12 @@ import javax.xml.stream.XMLStreamException; /** - * The BlobLayoutRanges model. + * The ranges that make up a blob. */ -@Fluent +@Immutable public final class BlobLayoutRanges implements XmlSerializable { /* - * The Range property. + * The list of ranges. */ @Generated private List range = new ArrayList<>(); @@ -30,11 +30,11 @@ public final class BlobLayoutRanges implements XmlSerializable * Creates an instance of BlobLayoutRanges class. */ @Generated - public BlobLayoutRanges() { + private BlobLayoutRanges() { } /** - * Get the range property: The Range property. + * Get the range property: The list of ranges. * * @return the range value. */ @@ -43,18 +43,6 @@ public List getRange() { return this.range; } - /** - * Set the range property: The Range property. - * - * @param range the range value to set. - * @return the BlobLayoutRanges object itself. - */ - @Generated - public BlobLayoutRanges setRange(List range) { - this.range = range; - return this; - } - @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutRangesRangeItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutRangesRangeItem.java index ea431c6d8aaca..60c200c0d6305 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutRangesRangeItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutRangesRangeItem.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -13,33 +13,40 @@ import javax.xml.stream.XMLStreamException; /** - * The BlobLayoutRangesRangeItem model. + * A range of a blob, and the endpoint that serves it. */ -@Fluent +@Immutable public final class BlobLayoutRangesRangeItem implements XmlSerializable { /* * The start byte offset of the range. */ @Generated - private long start; + private final long start; /* * The end byte offset of the range. */ @Generated - private long end; + private final long end; /* * Index into the Endpoints array indicating which endpoint serves this range. */ @Generated - private int endpointIndex; + private final int endpointIndex; /** * Creates an instance of BlobLayoutRangesRangeItem class. + * + * @param start the start value to set. + * @param end the end value to set. + * @param endpointIndex the endpointIndex value to set. */ @Generated - public BlobLayoutRangesRangeItem() { + private BlobLayoutRangesRangeItem(long start, long end, int endpointIndex) { + this.start = start; + this.end = end; + this.endpointIndex = endpointIndex; } /** @@ -52,18 +59,6 @@ public long getStart() { return this.start; } - /** - * Set the start property: The start byte offset of the range. - * - * @param start the start value to set. - * @return the BlobLayoutRangesRangeItem object itself. - */ - @Generated - public BlobLayoutRangesRangeItem setStart(long start) { - this.start = start; - return this; - } - /** * Get the end property: The end byte offset of the range. * @@ -74,18 +69,6 @@ public long getEnd() { return this.end; } - /** - * Set the end property: The end byte offset of the range. - * - * @param end the end value to set. - * @return the BlobLayoutRangesRangeItem object itself. - */ - @Generated - public BlobLayoutRangesRangeItem setEnd(long end) { - this.end = end; - return this; - } - /** * Get the endpointIndex property: Index into the Endpoints array indicating which endpoint serves this range. * @@ -96,18 +79,6 @@ public int getEndpointIndex() { return this.endpointIndex; } - /** - * Set the endpointIndex property: Index into the Endpoints array indicating which endpoint serves this range. - * - * @param endpointIndex the endpointIndex value to set. - * @return the BlobLayoutRangesRangeItem object itself. - */ - @Generated - public BlobLayoutRangesRangeItem setEndpointIndex(int endpointIndex) { - this.endpointIndex = endpointIndex; - return this; - } - @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @@ -131,6 +102,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt * @param xmlReader The XmlReader being read. * @return An instance of BlobLayoutRangesRangeItem 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 BlobLayoutRangesRangeItem. */ @Generated @@ -146,6 +118,7 @@ public static BlobLayoutRangesRangeItem fromXml(XmlReader xmlReader) throws XMLS * cases where the model can deserialize from different root element names. * @return An instance of BlobLayoutRangesRangeItem 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 BlobLayoutRangesRangeItem. */ @Generated @@ -153,15 +126,13 @@ public static BlobLayoutRangesRangeItem fromXml(XmlReader xmlReader, String root throws XMLStreamException { String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "Range" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - BlobLayoutRangesRangeItem deserializedBlobLayoutRangesRangeItem = new BlobLayoutRangesRangeItem(); - deserializedBlobLayoutRangesRangeItem.start = reader.getLongAttribute(null, "Start"); - deserializedBlobLayoutRangesRangeItem.end = reader.getLongAttribute(null, "End"); - deserializedBlobLayoutRangesRangeItem.endpointIndex = reader.getIntAttribute(null, "EndpointIndex"); + long start = reader.getLongAttribute(null, "Start"); + long end = reader.getLongAttribute(null, "End"); + int endpointIndex = reader.getIntAttribute(null, "EndpointIndex"); while (reader.nextElement() != XmlToken.END_ELEMENT) { reader.skipElement(); } - - return deserializedBlobLayoutRangesRangeItem; + return new BlobLayoutRangesRangeItem(start, end, endpointIndex); }); } } 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 8181d1ca941de..19c5eb628682e 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 @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; @@ -12,18 +11,19 @@ import javax.xml.stream.XMLStreamException; /** - * The BlobName model. + * Represents a blob name. */ @Fluent public final class BlobName implements XmlSerializable { + /* - * Indicates if the blob name is encoded. + * Whether the blob name is encoded. */ @Generated private Boolean encoded; /* - * The name of the blob. + * The blob name. */ @Generated private String content; @@ -36,8 +36,8 @@ public BlobName() { } /** - * Get the encoded property: Indicates if the blob name is encoded. - * + * Get the encoded property: Whether the blob name is encoded. + * * @return the encoded value. */ @Generated @@ -46,8 +46,8 @@ public Boolean isEncoded() { } /** - * Set the encoded property: Indicates if the blob name is encoded. - * + * Set the encoded property. + * * @param encoded the encoded value to set. * @return the BlobName object itself. */ @@ -58,8 +58,8 @@ public BlobName setEncoded(Boolean encoded) { } /** - * Get the content property: The name of the blob. - * + * Get the content property: The blob name. + * * @return the content value. */ @Generated @@ -68,8 +68,8 @@ public String getContent() { } /** - * Set the content property: The name of the blob. - * + * Set the content property. + * * @param content the content value to set. * @return the BlobName object itself. */ @@ -97,7 +97,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. @@ -110,7 +110,7 @@ public static BlobName fromXml(XmlReader xmlReader) throws XMLStreamException { /** * 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. @@ -126,7 +126,6 @@ public static BlobName fromXml(XmlReader xmlReader, String rootElementName) thro 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 1702c9fc99d32..8e1096bca8864 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -14,25 +14,28 @@ import javax.xml.stream.XMLStreamException; /** - * The BlobPrefixInternal model. + * Represents a blob prefix. */ -@Fluent +@Immutable public final class BlobPrefixInternal implements XmlSerializable { /* - * The Name property. + * The blob name. */ @Generated - private BlobName name; + private final BlobName name; /** * Creates an instance of BlobPrefixInternal class. + * + * @param name the name value to set. */ @Generated - public BlobPrefixInternal() { + private BlobPrefixInternal(BlobName name) { + this.name = name; } /** - * Get the name property: The Name property. + * Get the name property: The blob name. * * @return the name value. */ @@ -41,18 +44,6 @@ public BlobName getName() { return this.name; } - /** - * Set the name property: The Name property. - * - * @param name the name value to set. - * @return the BlobPrefixInternal object itself. - */ - @Generated - public BlobPrefixInternal setName(BlobName name) { - this.name = name; - return this; - } - @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @@ -74,6 +65,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt * @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. */ @Generated @@ -89,6 +81,7 @@ public static BlobPrefixInternal fromXml(XmlReader xmlReader) throws XMLStreamEx * 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. */ @Generated @@ -96,18 +89,17 @@ public static BlobPrefixInternal fromXml(XmlReader xmlReader, String rootElement String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "BlobPrefix" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - BlobPrefixInternal deserializedBlobPrefixInternal = new BlobPrefixInternal(); + BlobName name = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); if ("Name".equals(elementName.getLocalPart())) { - deserializedBlobPrefixInternal.name = BlobName.fromXml(reader, "Name"); + name = BlobName.fromXml(reader, "Name"); } else { reader.skipElement(); } } - - return deserializedBlobPrefixInternal; + return new BlobPrefixInternal(name); }); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobPropertiesInternalGetProperties.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobPropertiesInternalGetProperties.java index 593b4423ec848..dfe13f404fad0 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobPropertiesInternalGetProperties.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobPropertiesInternalGetProperties.java @@ -37,7 +37,7 @@ public BlobPropertiesInternalGetProperties(BlobsGetPropertiesHeaders headers) { @Override public OffsetDateTime getCreationTime() { - return headers.getXMsCreationTime(); + return headers.getCreationTime(); } @Override @@ -62,7 +62,7 @@ public String getContentType() { @Override public byte[] getContentMd5() { - return headers.getContentMD5(); + return headers.getContentMd5(); } @Override @@ -87,178 +87,178 @@ public String getCacheControl() { @Override public Long getBlobSequenceNumber() { - return headers.getXMsBlobSequenceNumber(); + return headers.getBlobSequenceNumber(); } @Override public BlobType getBlobType() { - return headers.getXMsBlobType(); + return headers.getBlobType(); } @Override public LeaseStatusType getLeaseStatus() { - return headers.getXMsLeaseStatus(); + return headers.getLeaseStatus(); } @Override public LeaseStateType getLeaseState() { - return headers.getXMsLeaseState(); + return headers.getLeaseState(); } @Override public LeaseDurationType getLeaseDuration() { - return headers.getXMsLeaseDuration(); + return headers.getDuration(); } @Override public String getCopyId() { - return headers.getXMsCopyId(); + return headers.getCopyId(); } @Override public CopyStatusType getCopyStatus() { - return headers.getXMsCopyStatus(); + return headers.getCopyStatus(); } @Override public String getCopySource() { - return headers.getXMsCopySource(); + return headers.getCopySource(); } @Override public String getCopyProgress() { - return headers.getXMsCopyProgress(); + return headers.getCopyProgress(); } @Override public OffsetDateTime getCopyCompletionTime() { - return headers.getXMsCopyCompletionTime(); + return headers.getCopyCompletionTime(); } @Override public String getCopyStatusDescription() { - return headers.getXMsCopyStatusDescription(); + return headers.getCopyStatusDescription(); } @Override public Boolean isServerEncrypted() { - return headers.isXMsServerEncrypted(); + return headers.isServerEncrypted(); } @Override public Boolean isIncrementalCopy() { - return headers.isXMsIncrementalCopy(); + return headers.isIncrementalCopy(); } @Override public String getCopyDestinationSnapshot() { - return headers.getXMsCopyDestinationSnapshot(); + return headers.getDestinationSnapshot(); } @Override public AccessTier getAccessTier() { - return AccessTier.fromString(headers.getXMsAccessTier()); + return AccessTier.fromString(headers.getAccessTier()); } @Override public Boolean isAccessTierInferred() { - return headers.isXMsAccessTierInferred(); + return headers.isAccessTierInferred(); } @Override public AccessTier getSmartAccessTier() { - return AccessTier.fromString(headers.getXMsSmartAccessTier()); + return AccessTier.fromString(headers.getSmartAccessTier()); } @Override public ArchiveStatus getArchiveStatus() { - return ArchiveStatus.fromString(headers.getXMsArchiveStatus()); + return headers.getArchiveStatus(); } @Override public String getEncryptionKeySha256() { - return headers.getXMsEncryptionKeySha256(); + return headers.getEncryptionKeySha256(); } @Override public String getEncryptionScope() { - return headers.getXMsEncryptionScope(); + return headers.getEncryptionScope(); } @Override public OffsetDateTime getAccessTierChangeTime() { - return headers.getXMsAccessTierChangeTime(); + return headers.getAccessTierChangeTime(); } @Override public Map getMetadata() { - return headers.getXMsMeta(); + return headers.getMetadata(); } @Override public Integer getCommittedBlockCount() { - return headers.getXMsBlobCommittedBlockCount(); + return headers.getBlobCommittedBlockCount(); } @Override public Long getTagCount() { - return headers.getXMsTagCount(); + return headers.getTagCount(); } @Override public String getVersionId() { - return headers.getXMsVersionId(); + return headers.getVersionId(); } @Override public Boolean isCurrentVersion() { - return headers.isXMsIsCurrentVersion(); + return headers.isCurrentVersion(); } @Override public List getObjectReplicationSourcePolicies() { - return ModelHelper.getObjectReplicationSourcePolicies(headers.getXMsOr()); + return ModelHelper.getObjectReplicationSourcePolicies(headers.getObjectReplicationRules()); } @Override public String getObjectReplicationDestinationPolicyId() { - return ModelHelper.getObjectReplicationDestinationPolicyId(headers.getXMsOr()); + return ModelHelper.getObjectReplicationDestinationPolicyId(headers.getObjectReplicationRules()); } @Override public RehydratePriority getRehydratePriority() { - return RehydratePriority.fromString(headers.getXMsRehydratePriority()); + return headers.getRehydratePriority(); } @Override public Boolean isSealed() { - return headers.isXMsBlobSealed(); + return headers.isSealed(); } @Override public OffsetDateTime getLastAccessedTime() { - return headers.getXMsLastAccessTime(); + return headers.getLastAccessed(); } @Override public OffsetDateTime getExpiresOn() { - return headers.getXMsExpiryTime(); + return headers.getExpiresOn(); } @Override public BlobImmutabilityPolicy getImmutabilityPolicy() { // This could be cached but the returned object is mutable. - return new BlobImmutabilityPolicy().setExpiryTime(headers.getXMsImmutabilityPolicyUntilDate()) - .setPolicyMode(headers.getXMsImmutabilityPolicyMode()); + return new BlobImmutabilityPolicy().setExpiryTime(headers.getImmutabilityPolicyExpiresOn()) + .setPolicyMode(headers.getImmutabilityPolicyMode()); } @Override public Boolean hasLegalHold() { - return headers.isXMsLegalHold(); + return headers.isLegalHold(); } @Override public String getRequestId() { - return headers.getXMsRequestId(); + return headers.getRequestId(); } } 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/BlobSignedIdentifiers.java similarity index 50% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifierWrapper.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifiers.java index b431c73b3ae36..290bb46eaf560 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/BlobSignedIdentifiers.java @@ -1,9 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.storage.blob.models.BlobSignedIdentifier; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; @@ -15,28 +17,34 @@ import javax.xml.stream.XMLStreamException; /** - * A wrapper around List<BlobSignedIdentifier> which provides top-level metadata for serialization. + * List of signed identifiers. */ -public final class BlobSignedIdentifierWrapper implements XmlSerializable { - - private final List signedIdentifiers; +@Immutable +public final class BlobSignedIdentifiers implements XmlSerializable { + /* + * The list of signed identifiers. + */ + @Generated + private final List items; /** - * Creates an instance of BlobSignedIdentifierWrapper. - * - * @param signedIdentifiers the list. + * Creates an instance of BlobSignedIdentifiers class. + * + * @param items the items value to set. */ - public BlobSignedIdentifierWrapper(List signedIdentifiers) { - this.signedIdentifiers = signedIdentifiers; + @Generated + public BlobSignedIdentifiers(List items) { + this.items = items; } /** - * Get the List<BlobSignedIdentifier> contained in this wrapper. - * - * @return the List<BlobSignedIdentifier>. + * Get the items property: The list of signed identifiers. + * + * @return the items value. */ - public List items() { - return signedIdentifiers; + @Generated + public List getItems() { + return this.items; } @Generated @@ -50,8 +58,8 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { rootElementName = rootElementName == null || rootElementName.isEmpty() ? "SignedIdentifiers" : rootElementName; xmlWriter.writeStartElement(rootElementName); - if (signedIdentifiers != null) { - for (BlobSignedIdentifier element : signedIdentifiers) { + if (this.items != null) { + for (BlobSignedIdentifier element : this.items) { xmlWriter.writeXml(element, "SignedIdentifier"); } } @@ -59,46 +67,49 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt } /** - * Reads an instance of BlobSignedIdentifierWrapper from the XmlReader. - * + * Reads an instance of BlobSignedIdentifiers 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. + * @return An instance of BlobSignedIdentifiers 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 BlobSignedIdentifiers. */ @Generated - public static BlobSignedIdentifierWrapper fromXml(XmlReader xmlReader) throws XMLStreamException { + public static BlobSignedIdentifiers fromXml(XmlReader xmlReader) throws XMLStreamException { return fromXml(xmlReader, null); } /** - * Reads an instance of BlobSignedIdentifierWrapper from the XmlReader. - * + * Reads an instance of BlobSignedIdentifiers 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. + * @return An instance of BlobSignedIdentifiers 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 BlobSignedIdentifiers. */ @Generated - public static BlobSignedIdentifierWrapper fromXml(XmlReader xmlReader, String rootElementName) - throws XMLStreamException { - rootElementName = rootElementName == null || rootElementName.isEmpty() ? "SignedIdentifiers" : rootElementName; - return xmlReader.readObject(rootElementName, reader -> { + public static BlobSignedIdentifiers fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "SignedIdentifiers" : rootElementName; + return xmlReader.readObject(finalRootElementName, 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)); + items.add(BlobSignedIdentifier.fromXml(reader, "SignedIdentifier")); } else { - reader.nextElement(); + reader.skipElement(); } } - return new BlobSignedIdentifierWrapper(items); + return new BlobSignedIdentifiers(items); }); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobStorageError.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobStorageError.java index 18b5149c78244..2444b6a731cf8 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobStorageError.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobStorageError.java @@ -1,150 +1,234 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.util.CoreUtils; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.storage.blob.models.BlobErrorCode; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; import com.azure.xml.XmlWriter; - +import java.io.IOException; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; -import java.io.IOException; /** - * Represents an error response returned by the Azure Storage Blob service. + * The BlobStorageError model. */ -public final class BlobStorageError implements JsonSerializable, XmlSerializable { - private String code; +@Immutable +public final class BlobStorageError implements XmlSerializable, JsonSerializable { + + /* + * The error code. + */ + @Generated + private BlobErrorCode code; + + /* + * The error message. + */ + @Generated private String message; + + /* + * The copy source status code. + */ + @Generated + private Integer copySourceStatusCode; + + /* + * The copy source error code. + */ + @Generated + private String copySourceErrorCode; + + /* + * The copy source error message. + */ + @Generated + private String copySourceErrorMessage; + + /* + * The name of the header that caused the error. + */ + @Generated + private String headerName; + + /* + * The value of the header that caused the error. + */ + @Generated + private String headerValue; + + /* + * The name of the query parameter that caused the error. + */ + @Generated private String queryParameterName; + + /* + * The value of the query parameter that caused the error. + */ + @Generated private String queryParameterValue; + + /* + * The reason for the error. + */ + @Generated private String reason; + + /* + * Additional error detail. + */ + @Generated private String extendedErrorDetail; - private String headerName; - private String headerValue; + /** + * Creates an instance of BlobStorageError class. + */ + @Generated private BlobStorageError() { } /** - * Gets the error code returned by the Azure Storage Blob service. + * Get the code property: The error code. * - * @return The error code. + * @return the code value. */ - public String getCode() { - return code; + @Generated + public BlobErrorCode getCode() { + return this.code; } /** - * Gets the error message returned by the Azure Storage Blob service. + * Get the message property: The error message. * - * @return The error message. + * @return the message value. */ + @Generated public String getMessage() { - return message; + return this.message; } /** - * Gets the header name returned by the Azure Storage Blob service. + * Get the copySourceStatusCode property: The copy source status code. * - * @return The name of the header parameter. + * @return the copySourceStatusCode value. */ - public String getHeaderName() { - return headerName; + @Generated + public Integer getCopySourceStatusCode() { + return this.copySourceStatusCode; } - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - return jsonWriter.writeStartObject("Error") - .writeStringField("Code", code) - .writeStringField("Message", this.message) - .writeStringField("QueryParameterName", this.queryParameterName) - .writeStringField("QueryParameterValue", this.queryParameterValue) - .writeStringField("Reason", this.reason) - .writeStringField("ExtendedErrorDetail", this.extendedErrorDetail) - .writeEndObject(); + /** + * Get the copySourceErrorCode property: The copy source error code. + * + * @return the copySourceErrorCode value. + */ + @Generated + public String getCopySourceErrorCode() { + return this.copySourceErrorCode; } /** - * Reads an instance of BlobStorageError from the JsonReader. + * Get the copySourceErrorMessage property: The copy source error message. * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobStorageError if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the BlobStorageError. + * @return the copySourceErrorMessage value. */ - public static BlobStorageError fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - // Buffer the next JSON object as BlobStorageError can take two forms: - // - // - A BlobStorageError object - // - A BlobStorageError object wrapped in an "error" node. - JsonReader bufferedReader = reader.bufferObject(); - bufferedReader.nextToken(); // Get to the START_OBJECT token. - while (bufferedReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = bufferedReader.getFieldName(); - bufferedReader.nextToken(); + @Generated + public String getCopySourceErrorMessage() { + return this.copySourceErrorMessage; + } - if ("error".equals(fieldName)) { - // If the BlobStorageError was wrapped in the "error" node begin reading it now. - return readBlobError(bufferedReader); - } else { - bufferedReader.skipChildren(); - } - } + /** + * Get the headerName property: The name of the header that caused the error. + * + * @return the headerName value. + */ + @Generated + public String getHeaderName() { + return this.headerName; + } - // Otherwise reset the JsonReader and read the whole JSON object. - return readBlobError(bufferedReader.reset()); - }); + /** + * Get the headerValue property: The value of the header that caused the error. + * + * @return the headerValue value. + */ + @Generated + public String getHeaderValue() { + return this.headerValue; } - private static BlobStorageError readBlobError(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobStorageError deserializedStorageError = new BlobStorageError(); + /** + * Get the queryParameterName property: The name of the query parameter that caused the error. + * + * @return the queryParameterName value. + */ + @Generated + public String getQueryParameterName() { + return this.queryParameterName; + } - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); + /** + * Get the queryParameterValue property: The value of the query parameter that caused the error. + * + * @return the queryParameterValue value. + */ + @Generated + public String getQueryParameterValue() { + return this.queryParameterValue; + } - if ("code".equals(fieldName)) { - deserializedStorageError.code = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedStorageError.message = reader.getString(); - } else if ("queryParameterName".equals(fieldName)) { - deserializedStorageError.queryParameterName = reader.getString(); - } else if ("queryParameterValue".equals(fieldName)) { - deserializedStorageError.queryParameterValue = reader.getString(); - } else if ("reason".equals(fieldName)) { - deserializedStorageError.reason = reader.getString(); - } else if ("extendedErrorDetail".equals(fieldName)) { - deserializedStorageError.extendedErrorDetail = reader.getString(); - } else { - reader.skipChildren(); - } - } + /** + * Get the reason property: The reason for the error. + * + * @return the reason value. + */ + @Generated + public String getReason() { + return this.reason; + } - return deserializedStorageError; - }); + /** + * Get the extendedErrorDetail property: Additional error detail. + * + * @return the extendedErrorDetail value. + */ + @Generated + public String getExtendedErrorDetail() { + return this.extendedErrorDetail; } + @Generated + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Error" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "Error" : rootElementName; xmlWriter.writeStartElement(rootElementName); - xmlWriter.writeStringElement("Code", code); + xmlWriter.writeStringElement("Code", this.code == null ? null : this.code.toString()); xmlWriter.writeStringElement("Message", this.message); + xmlWriter.writeNumberElement("CopySourceStatusCode", this.copySourceStatusCode); + xmlWriter.writeStringElement("CopySourceErrorCode", this.copySourceErrorCode); + xmlWriter.writeStringElement("CopySourceErrorMessage", this.copySourceErrorMessage); + xmlWriter.writeStringElement("HeaderName", this.headerName); + xmlWriter.writeStringElement("HeaderValue", this.headerValue); xmlWriter.writeStringElement("QueryParameterName", this.queryParameterName); xmlWriter.writeStringElement("QueryParameterValue", this.queryParameterValue); xmlWriter.writeStringElement("Reason", this.reason); xmlWriter.writeStringElement("ExtendedErrorDetail", this.extendedErrorDetail); - xmlWriter.writeStringElement("HeaderName", this.headerName); - xmlWriter.writeStringElement("HeaderValue", this.headerValue); return xmlWriter.writeEndElement(); } @@ -156,6 +240,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt * pointing to XML null. * @throws XMLStreamException If an error occurs while reading the BlobStorageError. */ + @Generated public static BlobStorageError fromXml(XmlReader xmlReader) throws XMLStreamException { return fromXml(xmlReader, null); } @@ -170,33 +255,118 @@ public static BlobStorageError fromXml(XmlReader xmlReader) throws XMLStreamExce * pointing to XML null. * @throws XMLStreamException If an error occurs while reading the BlobStorageError. */ + @Generated public static BlobStorageError fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName = CoreUtils.isNullOrEmpty(rootElementName) ? "Error" : rootElementName; + String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "Error" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - BlobStorageError deserializedStorageError = new BlobStorageError(); + BlobStorageError deserializedBlobStorageError = new BlobStorageError(); while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); - if ("Code".equals(elementName.getLocalPart())) { - deserializedStorageError.code = reader.getStringElement(); + deserializedBlobStorageError.code = BlobErrorCode.fromString(reader.getStringElement()); } else if ("Message".equals(elementName.getLocalPart())) { - deserializedStorageError.message = reader.getStringElement(); + deserializedBlobStorageError.message = reader.getStringElement(); + } else if ("CopySourceStatusCode".equals(elementName.getLocalPart())) { + deserializedBlobStorageError.copySourceStatusCode = reader.getNullableElement(Integer::parseInt); + } else if ("CopySourceErrorCode".equals(elementName.getLocalPart())) { + deserializedBlobStorageError.copySourceErrorCode = reader.getStringElement(); + } else if ("CopySourceErrorMessage".equals(elementName.getLocalPart())) { + deserializedBlobStorageError.copySourceErrorMessage = reader.getStringElement(); + } else if ("HeaderName".equals(elementName.getLocalPart())) { + deserializedBlobStorageError.headerName = reader.getStringElement(); + } else if ("HeaderValue".equals(elementName.getLocalPart())) { + deserializedBlobStorageError.headerValue = reader.getStringElement(); } else if ("QueryParameterName".equals(elementName.getLocalPart())) { - deserializedStorageError.queryParameterName = reader.getStringElement(); + deserializedBlobStorageError.queryParameterName = reader.getStringElement(); } else if ("QueryParameterValue".equals(elementName.getLocalPart())) { - deserializedStorageError.queryParameterValue = reader.getStringElement(); + deserializedBlobStorageError.queryParameterValue = reader.getStringElement(); } else if ("Reason".equals(elementName.getLocalPart())) { - deserializedStorageError.reason = reader.getStringElement(); + deserializedBlobStorageError.reason = reader.getStringElement(); } else if ("ExtendedErrorDetail".equals(elementName.getLocalPart())) { - deserializedStorageError.extendedErrorDetail = reader.getStringElement(); - } else if ("HeaderName".equals(elementName.getLocalPart())) { - deserializedStorageError.headerName = reader.getStringElement(); - } else if ("HeaderValue".equals(elementName.getLocalPart())) { - deserializedStorageError.headerValue = reader.getStringElement(); + deserializedBlobStorageError.extendedErrorDetail = reader.getStringElement(); + } else { + reader.skipElement(); + } + } + return deserializedBlobStorageError; + }); + } + + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("code", this.code == null ? null : this.code.toString()); + jsonWriter.writeStringField("message", this.message); + jsonWriter.writeNumberField("copySourceStatusCode", this.copySourceStatusCode); + jsonWriter.writeStringField("copySourceErrorCode", this.copySourceErrorCode); + jsonWriter.writeStringField("copySourceErrorMessage", this.copySourceErrorMessage); + jsonWriter.writeStringField("headerName", this.headerName); + jsonWriter.writeStringField("headerValue", this.headerValue); + jsonWriter.writeStringField("queryParameterName", this.queryParameterName); + jsonWriter.writeStringField("queryParameterValue", this.queryParameterValue); + jsonWriter.writeStringField("reason", this.reason); + jsonWriter.writeStringField("extendedErrorDetail", this.extendedErrorDetail); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BlobStorageError from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BlobStorageError if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the BlobStorageError. + */ + public static BlobStorageError fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + // The error may be the object itself or wrapped in an "error" node. + JsonReader bufferedReader = reader.bufferObject(); + bufferedReader.nextToken(); + while (bufferedReader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = bufferedReader.getFieldName(); + bufferedReader.nextToken(); + if ("error".equals(fieldName)) { + return readBlobStorageError(bufferedReader); } + bufferedReader.skipChildren(); } + return readBlobStorageError(bufferedReader.reset()); + }); + } - return deserializedStorageError; + private static BlobStorageError readBlobStorageError(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BlobStorageError deserialized = new BlobStorageError(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + if ("code".equals(fieldName)) { + deserialized.code = BlobErrorCode.fromString(reader.getString()); + } else if ("message".equals(fieldName)) { + deserialized.message = reader.getString(); + } else if ("copySourceStatusCode".equals(fieldName)) { + deserialized.copySourceStatusCode = reader.getNullable(JsonReader::getInt); + } else if ("copySourceErrorCode".equals(fieldName)) { + deserialized.copySourceErrorCode = reader.getString(); + } else if ("copySourceErrorMessage".equals(fieldName)) { + deserialized.copySourceErrorMessage = reader.getString(); + } else if ("headerName".equals(fieldName)) { + deserialized.headerName = reader.getString(); + } else if ("headerValue".equals(fieldName)) { + deserialized.headerValue = reader.getString(); + } else if ("queryParameterName".equals(fieldName)) { + deserialized.queryParameterName = reader.getString(); + } else if ("queryParameterValue".equals(fieldName)) { + deserialized.queryParameterValue = reader.getString(); + } else if ("reason".equals(fieldName)) { + deserialized.reason = reader.getString(); + } else if ("extendedErrorDetail".equals(fieldName)) { + deserialized.extendedErrorDetail = reader.getString(); + } else { + reader.skipChildren(); + } + } + return deserialized; }); } } 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/BlobStorageErrorException.java similarity index 55% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/StorageErrorException.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobStorageErrorException.java index 2171fe339ef0f..b4c56200d7d37 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/BlobStorageErrorException.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; @@ -8,27 +8,27 @@ import com.azure.core.http.HttpResponse; /** - * Exception thrown for an invalid response with StorageError information. + * Exception thrown for an invalid response with BlobStorageError information. */ -public final class StorageErrorException extends HttpResponseException { +public final class BlobStorageErrorException extends HttpResponseException { /** - * Initializes a new instance of the StorageErrorException class. + * Initializes a new instance of the BlobStorageErrorException class. * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. */ - public StorageErrorException(String message, HttpResponse response) { + public BlobStorageErrorException(String message, HttpResponse response) { super(message, response); } /** - * Initializes a new instance of the StorageErrorException class. + * Initializes a new instance of the BlobStorageErrorException 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 StorageErrorException(String message, HttpResponse response, StorageError value) { + public BlobStorageErrorException(String message, HttpResponse response, BlobStorageError value) { super(message, response, value); } @@ -36,7 +36,7 @@ public StorageErrorException(String message, HttpResponse response, StorageError * {@inheritDoc} */ @Override - public StorageError getValue() { - return (StorageError) super.getValue(); + public BlobStorageError getValue() { + return (BlobStorageError) super.getValue(); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobStorageExceptionInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobStorageExceptionInternal.java deleted file mode 100644 index 7f8ccb32b6f85..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobStorageExceptionInternal.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.storage.blob.implementation.models; - -import com.azure.core.exception.HttpResponseException; -import com.azure.core.http.HttpResponse; - -/** - * A {@code BlobStorageException} is thrown whenever Azure Storage successfully returns an error code that is not - * 200-level. Users can inspect the status code and error code to determine the cause of the error response. The - * exception message may also contain more detailed information depending on the type of error. The user may also - * inspect the raw HTTP response or call toString to get the full payload of the error response if present. Note that - * even some expected "errors" will be thrown as a {@code BlobStorageException}. For example, some users may perform a - * getProperties request on an entity to determine whether it exists or not. If it does not exists, an exception will be - * thrown even though this may be considered an expected indication of absence in this case. - * - *

Sample Code

- *

For more samples, please see the sample - * file

- */ -public final class BlobStorageExceptionInternal extends HttpResponseException { - /** - * Constructs a {@code BlobStorageException}. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - * @param value the deserialized error response. - */ - public BlobStorageExceptionInternal(String message, HttpResponse response, BlobStorageError value) { - super(message, response, value); - } - - @Override - public BlobStorageError getValue() { - return (BlobStorageError) super.getValue(); - } -} 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 e9ed39842eee4..761a65bb54b75 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -14,31 +14,36 @@ import javax.xml.stream.XMLStreamException; /** - * The BlobTag model. + * A key-value pair associated with a blob. */ -@Fluent +@Immutable public final class BlobTag implements XmlSerializable { /* - * The Key property. + * The key of the tag. */ @Generated - private String key; + private final String key; /* - * The Value property. + * The value of the tag. */ @Generated - private String value; + private final String value; /** * Creates an instance of BlobTag class. + * + * @param key the key value to set. + * @param value the value value to set. */ @Generated - public BlobTag() { + public BlobTag(String key, String value) { + this.key = key; + this.value = value; } /** - * Get the key property: The Key property. + * Get the key property: The key of the tag. * * @return the key value. */ @@ -48,19 +53,7 @@ public String getKey() { } /** - * Set the key property: The Key property. - * - * @param key the key value to set. - * @return the BlobTag object itself. - */ - @Generated - public BlobTag setKey(String key) { - this.key = key; - return this; - } - - /** - * Get the value property: The Value property. + * Get the value property: The value of the tag. * * @return the value value. */ @@ -69,18 +62,6 @@ public String getValue() { return this.value; } - /** - * Set the value property: The Value property. - * - * @param value the value value to set. - * @return the BlobTag object itself. - */ - @Generated - public BlobTag setValue(String value) { - this.value = value; - return this; - } - @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @@ -103,6 +84,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt * @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. */ @Generated @@ -118,26 +100,27 @@ public static BlobTag fromXml(XmlReader xmlReader) throws XMLStreamException { * 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. */ @Generated public static BlobTag fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "Tag" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - BlobTag deserializedBlobTag = new BlobTag(); + String key = null; + String value = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); if ("Key".equals(elementName.getLocalPart())) { - deserializedBlobTag.key = reader.getStringElement(); + key = reader.getStringElement(); } else if ("Value".equals(elementName.getLocalPart())) { - deserializedBlobTag.value = reader.getStringElement(); + value = reader.getStringElement(); } else { reader.skipElement(); } } - - return deserializedBlobTag; + return new BlobTag(key, value); }); } } 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 e5cfa07212d4c..0d30be739a488 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 @@ -1,63 +1,55 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; 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.Collections; import java.util.List; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; /** - * Blob tags. + * A list of blob tags. */ -@Fluent +@Immutable public final class BlobTags implements XmlSerializable { /* - * The BlobTagSet property. + * A list of blob tags. */ @Generated - private List blobTagSet; + private final List blobTagSet; /** * Creates an instance of BlobTags class. + * + * @param blobTagSet the blobTagSet value to set. */ @Generated - public BlobTags() { + public BlobTags(List blobTagSet) { + this.blobTagSet = blobTagSet; } /** - * Get the blobTagSet property: The BlobTagSet property. + * Get the blobTagSet property: A list of blob tags. * * @return the blobTagSet value. */ @Generated public List getBlobTagSet() { if (this.blobTagSet == null) { - this.blobTagSet = new ArrayList<>(); + return Collections.emptyList(); } return this.blobTagSet; } - /** - * Set the blobTagSet property: The BlobTagSet property. - * - * @param blobTagSet the blobTagSet value to set. - * @return the BlobTags object itself. - */ - @Generated - public BlobTags setBlobTagSet(List blobTagSet) { - this.blobTagSet = blobTagSet; - return this; - } - @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @@ -85,6 +77,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt * @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. */ @Generated @@ -100,13 +93,14 @@ public static BlobTags fromXml(XmlReader xmlReader) throws XMLStreamException { * 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. */ @Generated public static BlobTags fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "Tags" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - BlobTags deserializedBlobTags = new BlobTags(); + List blobTagSet = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); @@ -114,10 +108,10 @@ public static BlobTags fromXml(XmlReader xmlReader, String rootElementName) thro while (reader.nextElement() != XmlToken.END_ELEMENT) { elementName = reader.getElementName(); if ("Tag".equals(elementName.getLocalPart())) { - if (deserializedBlobTags.blobTagSet == null) { - deserializedBlobTags.blobTagSet = new ArrayList<>(); + if (blobTagSet == null) { + blobTagSet = new ArrayList<>(); } - deserializedBlobTags.blobTagSet.add(BlobTag.fromXml(reader, "Tag")); + blobTagSet.add(BlobTag.fromXml(reader, "Tag")); } else { reader.skipElement(); } @@ -126,8 +120,7 @@ public static BlobTags fromXml(XmlReader xmlReader, String rootElementName) thro reader.skipElement(); } } - - return deserializedBlobTags; + return new BlobTags(blobTagSet); }); } } 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 deleted file mode 100644 index ca151910ca120..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsAbortCopyFromURLHeaders.java +++ /dev/null @@ -1,157 +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.azure.core.annotation.Generated; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.util.DateTimeRfc1123; -import java.time.OffsetDateTime; - -/** - * The BlobsAbortCopyFromURLHeaders model. - */ -@Fluent -public final class BlobsAbortCopyFromURLHeaders { - /* - * The x-ms-client-request-id property. - */ - @Generated - private String xMsClientRequestId; - - /* - * The x-ms-request-id property. - */ - @Generated - private String xMsRequestId; - - /* - * The x-ms-version property. - */ - @Generated - private String xMsVersion; - - /* - * The Date property. - */ - @Generated - private DateTimeRfc1123 date; - - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - - // 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.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - String date = rawHeaders.getValue(HttpHeaderName.DATE); - if (date != null) { - this.date = new DateTimeRfc1123(date); - } else { - this.date = null; - } - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsAbortCopyFromURLHeaders object itself. - */ - @Generated - public BlobsAbortCopyFromURLHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsAbortCopyFromURLHeaders object itself. - */ - @Generated - public BlobsAbortCopyFromURLHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsAbortCopyFromURLHeaders object itself. - */ - @Generated - public BlobsAbortCopyFromURLHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the date property: The Date property. - * - * @return the date value. - */ - @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); - } - - /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the BlobsAbortCopyFromURLHeaders object itself. - */ - @Generated - public BlobsAbortCopyFromURLHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } -} 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 new file mode 100644 index 0000000000000..5347d1b7f0b93 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsAbortCopyFromUrlHeaders.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.util.DateTimeRfc1123; +import java.time.OffsetDateTime; + +/** + * The BlobsAbortCopyFromUrlHeaders model. + */ +@Immutable +public final class BlobsAbortCopyFromUrlHeaders { + /* + * The Date property. + */ + @Generated + private final DateTimeRfc1123 date; + + /* + * The x-ms-version property. + */ + @Generated + private final String version; + + /* + * The x-ms-request-id property. + */ + @Generated + private final String requestId; + + /* + * The x-ms-client-request-id property. + */ + @Generated + private final String clientRequestId; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + // 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) { + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } else { + this.date = null; + } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + @Generated + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); + } + + /** + * Get the version property: The x-ms-version property. + * + * @return the version value. + */ + @Generated + public String getVersion() { + return this.version; + } + + /** + * Get the requestId property: The x-ms-request-id property. + * + * @return the requestId value. + */ + @Generated + public String getRequestId() { + return this.requestId; + } + + /** + * Get the clientRequestId property: The x-ms-client-request-id property. + * + * @return the clientRequestId value. + */ + @Generated + public String getClientRequestId() { + return this.clientRequestId; + } +} 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 96e68a9401255..10c00e60a9715 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,49 +14,49 @@ /** * The BlobsAcquireLeaseHeaders model. */ -@Fluent +@Immutable public final class BlobsAcquireLeaseHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* * The x-ms-lease-id property. */ @Generated - private String xMsLeaseId; + private final String leaseId; /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); @@ -76,16 +76,16 @@ public BlobsAcquireLeaseHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - this.xMsLeaseId = rawHeaders.getValue(X_MS_LEASE_ID); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.leaseId = rawHeaders.getValue(X_MS_LEASE_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -98,18 +98,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the BlobsAcquireLeaseHeaders object itself. - */ - @Generated - public BlobsAcquireLeaseHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -124,135 +112,55 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the BlobsAcquireLeaseHeaders object itself. - */ - @Generated - public BlobsAcquireLeaseHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsLeaseId property: The x-ms-lease-id property. - * - * @return the xMsLeaseId value. - */ - @Generated - public String getXMsLeaseId() { - return this.xMsLeaseId; - } - - /** - * Set the xMsLeaseId property: The x-ms-lease-id property. - * - * @param xMsLeaseId the xMsLeaseId value to set. - * @return the BlobsAcquireLeaseHeaders object itself. - */ - @Generated - public BlobsAcquireLeaseHeaders setXMsLeaseId(String xMsLeaseId) { - this.xMsLeaseId = xMsLeaseId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * Get the leaseId property: The x-ms-lease-id property. * - * @return the xMsClientRequestId value. + * @return the leaseId value. */ @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; + public String getLeaseId() { + return this.leaseId; } /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsAcquireLeaseHeaders object itself. - */ - @Generated - public BlobsAcquireLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsAcquireLeaseHeaders object itself. - */ - @Generated - public BlobsAcquireLeaseHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsAcquireLeaseHeaders object itself. + * @return the version value. */ @Generated - public BlobsAcquireLeaseHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the BlobsAcquireLeaseHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlobsAcquireLeaseHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 686aa4c72ac4f..206ae4af0b444 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,49 +14,49 @@ /** * The BlobsBreakLeaseHeaders model. */ -@Fluent +@Immutable public final class BlobsBreakLeaseHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* * The x-ms-lease-time property. */ @Generated - private Integer xMsLeaseTime; + private final Integer leaseTime; /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_LEASE_TIME = HttpHeaderName.fromString("x-ms-lease-time"); @@ -76,21 +76,21 @@ public BlobsBreakLeaseHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - String xMsLeaseTime = rawHeaders.getValue(X_MS_LEASE_TIME); - if (xMsLeaseTime != null) { - this.xMsLeaseTime = Integer.parseInt(xMsLeaseTime); + String leaseTime = rawHeaders.getValue(X_MS_LEASE_TIME); + if (leaseTime != null) { + this.leaseTime = Integer.parseInt(leaseTime); } else { - this.xMsLeaseTime = null; + this.leaseTime = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -103,18 +103,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the BlobsBreakLeaseHeaders object itself. - */ - @Generated - public BlobsBreakLeaseHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -129,135 +117,55 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the BlobsBreakLeaseHeaders object itself. - */ - @Generated - public BlobsBreakLeaseHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsLeaseTime property: The x-ms-lease-time property. - * - * @return the xMsLeaseTime value. - */ - @Generated - public Integer getXMsLeaseTime() { - return this.xMsLeaseTime; - } - - /** - * Set the xMsLeaseTime property: The x-ms-lease-time property. - * - * @param xMsLeaseTime the xMsLeaseTime value to set. - * @return the BlobsBreakLeaseHeaders object itself. - */ - @Generated - public BlobsBreakLeaseHeaders setXMsLeaseTime(Integer xMsLeaseTime) { - this.xMsLeaseTime = xMsLeaseTime; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * Get the leaseTime property: The x-ms-lease-time property. * - * @return the xMsClientRequestId value. + * @return the leaseTime value. */ @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; + public Integer getLeaseTime() { + return this.leaseTime; } /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsBreakLeaseHeaders object itself. - */ - @Generated - public BlobsBreakLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsBreakLeaseHeaders object itself. - */ - @Generated - public BlobsBreakLeaseHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsBreakLeaseHeaders object itself. + * @return the version value. */ @Generated - public BlobsBreakLeaseHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the BlobsBreakLeaseHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlobsBreakLeaseHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 2f0cd3c8127ce..039aa9c850137 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,49 +14,49 @@ /** * The BlobsChangeLeaseHeaders model. */ -@Fluent +@Immutable public final class BlobsChangeLeaseHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* - * The x-ms-client-request-id property. + * The x-ms-lease-id property. */ @Generated - private String xMsClientRequestId; + private final String leaseId; /* - * The x-ms-request-id property. + * The Date property. */ @Generated - private String xMsRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-lease-id property. + * The x-ms-version property. */ @Generated - private String xMsLeaseId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); @@ -76,16 +76,16 @@ public BlobsChangeLeaseHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsLeaseId = rawHeaders.getValue(X_MS_LEASE_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.leaseId = rawHeaders.getValue(X_MS_LEASE_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -98,18 +98,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the BlobsChangeLeaseHeaders object itself. - */ - @Generated - public BlobsChangeLeaseHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -124,135 +112,55 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the BlobsChangeLeaseHeaders object itself. - */ - @Generated - public BlobsChangeLeaseHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsChangeLeaseHeaders object itself. - */ - @Generated - public BlobsChangeLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsChangeLeaseHeaders object itself. - */ - @Generated - public BlobsChangeLeaseHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsLeaseId property: The x-ms-lease-id property. - * - * @return the xMsLeaseId value. - */ - @Generated - public String getXMsLeaseId() { - return this.xMsLeaseId; - } - - /** - * Set the xMsLeaseId property: The x-ms-lease-id property. + * Get the leaseId property: The x-ms-lease-id property. * - * @param xMsLeaseId the xMsLeaseId value to set. - * @return the BlobsChangeLeaseHeaders object itself. + * @return the leaseId value. */ @Generated - public BlobsChangeLeaseHeaders setXMsLeaseId(String xMsLeaseId) { - this.xMsLeaseId = xMsLeaseId; - return this; + public String getLeaseId() { + return this.leaseId; } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsChangeLeaseHeaders object itself. + * @return the version value. */ @Generated - public BlobsChangeLeaseHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the BlobsChangeLeaseHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlobsChangeLeaseHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 deleted file mode 100644 index e35d7856786a4..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsCopyFromURLHeaders.java +++ /dev/null @@ -1,423 +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.azure.core.annotation.Generated; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.DateTimeRfc1123; -import java.time.OffsetDateTime; -import java.util.Base64; - -/** - * The BlobsCopyFromURLHeaders model. - */ -@Fluent -public final class BlobsCopyFromURLHeaders { - /* - * The ETag property. - */ - @Generated - private String eTag; - - /* - * The Last-Modified property. - */ - @Generated - private DateTimeRfc1123 lastModified; - - /* - * The x-ms-client-request-id property. - */ - @Generated - private String xMsClientRequestId; - - /* - * The x-ms-request-id property. - */ - @Generated - private String xMsRequestId; - - /* - * The x-ms-version property. - */ - @Generated - private String xMsVersion; - - /* - * The x-ms-version-id property. - */ - @Generated - private String xMsVersionId; - - /* - * The Date property. - */ - @Generated - private DateTimeRfc1123 date; - - /* - * The x-ms-copy-id property. - */ - @Generated - private String xMsCopyId; - - /* - * The x-ms-copy-status property. - */ - @Generated - private String xMsCopyStatus = "success"; - - /* - * The Content-MD5 property. - */ - @Generated - private byte[] contentMD5; - - /* - * The x-ms-content-crc64 property. - */ - @Generated - private byte[] xMsContentCrc64; - - /* - * The x-ms-encryption-scope property. - */ - @Generated - 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_COPY_ID = HttpHeaderName.fromString("x-ms-copy-id"); - - private static final HttpHeaderName X_MS_COPY_STATUS = HttpHeaderName.fromString("x-ms-copy-status"); - - private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); - - 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) { - this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); - String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); - if (lastModified != null) { - this.lastModified = new DateTimeRfc1123(lastModified); - } else { - this.lastModified = null; - } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); - String date = rawHeaders.getValue(HttpHeaderName.DATE); - if (date != null) { - this.date = new DateTimeRfc1123(date); - } else { - this.date = null; - } - this.xMsCopyId = rawHeaders.getValue(X_MS_COPY_ID); - this.xMsCopyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); - String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); - if (contentMD5 != null) { - this.contentMD5 = Base64.getDecoder().decode(contentMD5); - } else { - this.contentMD5 = null; - } - String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); - if (xMsContentCrc64 != null) { - this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); - } else { - this.xMsContentCrc64 = null; - } - this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); - } - - /** - * Get the eTag property: The ETag property. - * - * @return the eTag value. - */ - @Generated - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the BlobsCopyFromURLHeaders object itself. - */ - @Generated - public BlobsCopyFromURLHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the lastModified property: The Last-Modified property. - * - * @return the lastModified value. - */ - @Generated - public OffsetDateTime getLastModified() { - if (this.lastModified == null) { - return null; - } - return this.lastModified.getDateTime(); - } - - /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the BlobsCopyFromURLHeaders object itself. - */ - @Generated - public BlobsCopyFromURLHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsCopyFromURLHeaders object itself. - */ - @Generated - public BlobsCopyFromURLHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsCopyFromURLHeaders object itself. - */ - @Generated - public BlobsCopyFromURLHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsCopyFromURLHeaders object itself. - */ - @Generated - public BlobsCopyFromURLHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the xMsVersionId property: The x-ms-version-id property. - * - * @return the xMsVersionId value. - */ - @Generated - public String getXMsVersionId() { - return this.xMsVersionId; - } - - /** - * Set the xMsVersionId property: The x-ms-version-id property. - * - * @param xMsVersionId the xMsVersionId value to set. - * @return the BlobsCopyFromURLHeaders object itself. - */ - @Generated - public BlobsCopyFromURLHeaders setXMsVersionId(String xMsVersionId) { - this.xMsVersionId = xMsVersionId; - return this; - } - - /** - * Get the date property: The Date property. - * - * @return the date value. - */ - @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); - } - - /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the BlobsCopyFromURLHeaders object itself. - */ - @Generated - public BlobsCopyFromURLHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsCopyId property: The x-ms-copy-id property. - * - * @return the xMsCopyId value. - */ - @Generated - public String getXMsCopyId() { - return this.xMsCopyId; - } - - /** - * Set the xMsCopyId property: The x-ms-copy-id property. - * - * @param xMsCopyId the xMsCopyId value to set. - * @return the BlobsCopyFromURLHeaders object itself. - */ - @Generated - public BlobsCopyFromURLHeaders setXMsCopyId(String xMsCopyId) { - this.xMsCopyId = xMsCopyId; - return this; - } - - /** - * Get the xMsCopyStatus property: The x-ms-copy-status property. - * - * @return the xMsCopyStatus value. - */ - @Generated - public String getXMsCopyStatus() { - return this.xMsCopyStatus; - } - - /** - * Set the xMsCopyStatus property: The x-ms-copy-status property. - * - * @param xMsCopyStatus the xMsCopyStatus value to set. - * @return the BlobsCopyFromURLHeaders object itself. - */ - @Generated - public BlobsCopyFromURLHeaders setXMsCopyStatus(String xMsCopyStatus) { - this.xMsCopyStatus = xMsCopyStatus; - return this; - } - - /** - * Get the contentMD5 property: The Content-MD5 property. - * - * @return the contentMD5 value. - */ - @Generated - public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); - } - - /** - * Set the contentMD5 property: The Content-MD5 property. - * - * @param contentMD5 the contentMD5 value to set. - * @return the BlobsCopyFromURLHeaders object itself. - */ - @Generated - public BlobsCopyFromURLHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); - return this; - } - - /** - * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @return the xMsContentCrc64 value. - */ - @Generated - public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); - } - - /** - * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @param xMsContentCrc64 the xMsContentCrc64 value to set. - * @return the BlobsCopyFromURLHeaders object itself. - */ - @Generated - public BlobsCopyFromURLHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); - return this; - } - - /** - * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * - * @return the xMsEncryptionScope value. - */ - @Generated - public String getXMsEncryptionScope() { - return this.xMsEncryptionScope; - } - - /** - * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * - * @param xMsEncryptionScope the xMsEncryptionScope value to set. - * @return the BlobsCopyFromURLHeaders object itself. - */ - @Generated - public BlobsCopyFromURLHeaders setXMsEncryptionScope(String xMsEncryptionScope) { - this.xMsEncryptionScope = xMsEncryptionScope; - return this; - } -} 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 new file mode 100644 index 0000000000000..1a25b71334abd --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsCopyFromUrlHeaders.java @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.DateTimeRfc1123; +import java.time.OffsetDateTime; +import java.util.Base64; + +/** + * The BlobsCopyFromUrlHeaders model. + */ +@Immutable +public final class BlobsCopyFromUrlHeaders { + /* + * The ETag property. + */ + @Generated + private final String eTag; + + /* + * The Last-Modified property. + */ + @Generated + private final DateTimeRfc1123 lastModified; + + /* + * The x-ms-version-id property. + */ + @Generated + private final String versionId; + + /* + * The x-ms-copy-id property. + */ + @Generated + private final String copyId; + + /* + * The Content-MD5 property. + */ + @Generated + private final byte[] contentMd5; + + /* + * The x-ms-content-crc64 property. + */ + @Generated + private final byte[] contentCrc64; + + /* + * The x-ms-encryption-scope property. + */ + @Generated + private final String encryptionScope; + + /* + * The Date property. + */ + @Generated + private final DateTimeRfc1123 date; + + /* + * The x-ms-version property. + */ + @Generated + private final String version; + + /* + * The x-ms-request-id property. + */ + @Generated + private final String requestId; + + /* + * The x-ms-client-request-id property. + */ + @Generated + private final String clientRequestId; + + private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); + + private static final HttpHeaderName X_MS_COPY_ID = HttpHeaderName.fromString("x-ms-copy-id"); + + private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); + + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + // 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) { + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } else { + this.lastModified = null; + } + this.versionId = rawHeaders.getValue(X_MS_VERSION_ID); + this.copyId = rawHeaders.getValue(X_MS_COPY_ID); + String contentMd5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMd5 != null) { + this.contentMd5 = Base64.getDecoder().decode(contentMd5); + } else { + this.contentMd5 = null; + } + String contentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (contentCrc64 != null) { + this.contentCrc64 = Base64.getDecoder().decode(contentCrc64); + } else { + this.contentCrc64 = null; + } + this.encryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } else { + this.date = null; + } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); + } + + /** + * Get the eTag property: The ETag property. + * + * @return the eTag value. + */ + @Generated + public String getETag() { + return this.eTag; + } + + /** + * Get the lastModified property: The Last-Modified property. + * + * @return the lastModified value. + */ + @Generated + public OffsetDateTime getLastModified() { + if (this.lastModified == null) { + return null; + } + return this.lastModified.getDateTime(); + } + + /** + * Get the versionId property: The x-ms-version-id property. + * + * @return the versionId value. + */ + @Generated + public String getVersionId() { + return this.versionId; + } + + /** + * Get the copyId property: The x-ms-copy-id property. + * + * @return the copyId value. + */ + @Generated + public String getCopyId() { + return this.copyId; + } + + /** + * Get the contentMd5 property: The Content-MD5 property. + * + * @return the contentMd5 value. + */ + @Generated + public byte[] getContentMd5() { + return CoreUtils.clone(this.contentMd5); + } + + /** + * Get the contentCrc64 property: The x-ms-content-crc64 property. + * + * @return the contentCrc64 value. + */ + @Generated + public byte[] getContentCrc64() { + return CoreUtils.clone(this.contentCrc64); + } + + /** + * Get the encryptionScope property: The x-ms-encryption-scope property. + * + * @return the encryptionScope value. + */ + @Generated + public String getEncryptionScope() { + return this.encryptionScope; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + @Generated + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); + } + + /** + * Get the version property: The x-ms-version property. + * + * @return the version value. + */ + @Generated + public String getVersion() { + return this.version; + } + + /** + * Get the requestId property: The x-ms-request-id property. + * + * @return the requestId value. + */ + @Generated + public String getRequestId() { + return this.requestId; + } + + /** + * Get the clientRequestId property: The x-ms-client-request-id property. + * + * @return the clientRequestId value. + */ + @Generated + public String getClientRequestId() { + return this.clientRequestId; + } +} 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 ab878a9805730..d61c7cda1db56 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,71 +14,71 @@ /** * The BlobsCreateSnapshotHeaders model. */ -@Fluent +@Immutable public final class BlobsCreateSnapshotHeaders { /* * The x-ms-snapshot property. */ @Generated - private String xMsSnapshot; + private final String snapshot; /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* - * The x-ms-client-request-id property. + * The x-ms-version-id property. */ @Generated - private String xMsClientRequestId; + private final String versionId; /* - * The x-ms-request-id property. + * The x-ms-request-server-encrypted property. */ @Generated - private String xMsRequestId; + private final Boolean isServerEncrypted; /* - * The x-ms-version property. + * The Date property. */ @Generated - private String xMsVersion; + private final DateTimeRfc1123 date; /* - * The x-ms-version-id property. + * The x-ms-version property. */ @Generated - private String xMsVersionId; + private final String version; /* - * The Date property. + * The x-ms-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String requestId; /* - * The x-ms-request-server-encrypted property. + * The x-ms-client-request-id property. */ @Generated - private Boolean xMsRequestServerEncrypted; + private final String clientRequestId; private static final HttpHeaderName X_MS_SNAPSHOT = HttpHeaderName.fromString("x-ms-snapshot"); - 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_REQUEST_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsCreateSnapshotHeaders class. @@ -86,7 +86,7 @@ public final class BlobsCreateSnapshotHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsCreateSnapshotHeaders(HttpHeaders rawHeaders) { - this.xMsSnapshot = rawHeaders.getValue(X_MS_SNAPSHOT); + this.snapshot = rawHeaders.getValue(X_MS_SNAPSHOT); this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); if (lastModified != null) { @@ -94,44 +94,32 @@ public BlobsCreateSnapshotHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); + this.versionId = rawHeaders.getValue(X_MS_VERSION_ID); + String isServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (isServerEncrypted != null) { + this.isServerEncrypted = Boolean.parseBoolean(isServerEncrypted); + } else { + this.isServerEncrypted = null; + } String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } - String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); - if (xMsRequestServerEncrypted != null) { - this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); - } else { - this.xMsRequestServerEncrypted = null; - } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsSnapshot property: The x-ms-snapshot property. + * Get the snapshot property: The x-ms-snapshot property. * - * @return the xMsSnapshot value. + * @return the snapshot value. */ @Generated - public String getXMsSnapshot() { - return this.xMsSnapshot; - } - - /** - * Set the xMsSnapshot property: The x-ms-snapshot property. - * - * @param xMsSnapshot the xMsSnapshot value to set. - * @return the BlobsCreateSnapshotHeaders object itself. - */ - @Generated - public BlobsCreateSnapshotHeaders setXMsSnapshot(String xMsSnapshot) { - this.xMsSnapshot = xMsSnapshot; - return this; + public String getSnapshot() { + return this.snapshot; } /** @@ -144,18 +132,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the BlobsCreateSnapshotHeaders object itself. - */ - @Generated - public BlobsCreateSnapshotHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -170,107 +146,23 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the BlobsCreateSnapshotHeaders object itself. - */ - @Generated - public BlobsCreateSnapshotHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * Get the versionId property: The x-ms-version-id property. * - * @return the xMsClientRequestId value. + * @return the versionId value. */ @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; + public String getVersionId() { + return this.versionId; } /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * Get the isServerEncrypted property: The x-ms-request-server-encrypted property. * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsCreateSnapshotHeaders object itself. + * @return the isServerEncrypted value. */ @Generated - public BlobsCreateSnapshotHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsCreateSnapshotHeaders object itself. - */ - @Generated - public BlobsCreateSnapshotHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsCreateSnapshotHeaders object itself. - */ - @Generated - public BlobsCreateSnapshotHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the xMsVersionId property: The x-ms-version-id property. - * - * @return the xMsVersionId value. - */ - @Generated - public String getXMsVersionId() { - return this.xMsVersionId; - } - - /** - * Set the xMsVersionId property: The x-ms-version-id property. - * - * @param xMsVersionId the xMsVersionId value to set. - * @return the BlobsCreateSnapshotHeaders object itself. - */ - @Generated - public BlobsCreateSnapshotHeaders setXMsVersionId(String xMsVersionId) { - this.xMsVersionId = xMsVersionId; - return this; + public Boolean isServerEncrypted() { + return this.isServerEncrypted; } /** @@ -287,40 +179,32 @@ public OffsetDateTime getDate() { } /** - * Set the date property: The Date property. + * Get the version property: The x-ms-version property. * - * @param date the date value to set. - * @return the BlobsCreateSnapshotHeaders object itself. + * @return the version value. */ @Generated - public BlobsCreateSnapshotHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsRequestServerEncrypted value. + * @return the requestId value. */ @Generated - public Boolean isXMsRequestServerEncrypted() { - return this.xMsRequestServerEncrypted; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. - * @return the BlobsCreateSnapshotHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlobsCreateSnapshotHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { - this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 4f7ceb3cf22ff..333466518f163 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,31 +14,31 @@ /** * The BlobsDeleteHeaders model. */ -@Fluent +@Immutable public final class BlobsDeleteHeaders { /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -49,109 +49,57 @@ public final class BlobsDeleteHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsDeleteHeaders(HttpHeaders rawHeaders) { - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsDeleteHeaders object itself. - */ - @Generated - public BlobsDeleteHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsDeleteHeaders object itself. - */ - @Generated - public BlobsDeleteHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsDeleteHeaders object itself. + * @return the version value. */ @Generated - public BlobsDeleteHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the BlobsDeleteHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlobsDeleteHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 b8159e6179e77..b8dad7f3c1c02 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,31 +14,31 @@ /** * The BlobsDeleteImmutabilityPolicyHeaders model. */ -@Fluent +@Immutable public final class BlobsDeleteImmutabilityPolicyHeaders { /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -49,109 +49,57 @@ public final class BlobsDeleteImmutabilityPolicyHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsDeleteImmutabilityPolicyHeaders(HttpHeaders rawHeaders) { - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsDeleteImmutabilityPolicyHeaders object itself. - */ - @Generated - public BlobsDeleteImmutabilityPolicyHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsDeleteImmutabilityPolicyHeaders object itself. - */ - @Generated - public BlobsDeleteImmutabilityPolicyHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsDeleteImmutabilityPolicyHeaders object itself. + * @return the version value. */ @Generated - public BlobsDeleteImmutabilityPolicyHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the BlobsDeleteImmutabilityPolicyHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlobsDeleteImmutabilityPolicyHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 ff477bb5602a5..321407fb555fa 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 @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; @@ -10,6 +9,7 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; +import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; import com.azure.storage.blob.models.BlobType; import com.azure.storage.blob.models.CopyStatusType; import com.azure.storage.blob.models.LeaseDurationType; @@ -18,6 +18,7 @@ import java.time.OffsetDateTime; import java.util.Base64; import java.util.LinkedHashMap; +import java.util.Locale; import java.util.Map; /** @@ -25,47 +26,54 @@ */ @Fluent public final class BlobsDownloadHeaders { + /* - * The Last-Modified property. + * The x-ms-request-id property. */ @Generated - private DateTimeRfc1123 lastModified; + private String requestId; /* - * The x-ms-creation-time property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 xMsCreationTime; + private String clientRequestId; /* * The x-ms-meta- property. */ @Generated - private Map xMsMeta; + private Map metadata; /* - * The x-ms-or-policy-id property. + * The x-ms-or- property. */ @Generated - private String xMsOrPolicyId; + private Map objectReplicationRules; /* - * The x-ms-or- property. + * The Last-Modified property. */ @Generated - private Map xMsOr; + private DateTimeRfc1123 lastModified; /* - * The Content-Length property. + * The x-ms-creation-time property. */ @Generated - private Long contentLength; + private DateTimeRfc1123 creationTime; /* - * The Content-Type property. + * The x-ms-or-policy-id property. */ @Generated - private String contentType; + private String objectReplicationPolicyId; + + /* + * The Content-Length property. + */ + @Generated + private Long contentLength; /* * The Content-Range property. @@ -83,7 +91,7 @@ public final class BlobsDownloadHeaders { * The Content-MD5 property. */ @Generated - private byte[] contentMD5; + private byte[] contentMd5; /* * The Content-Encoding property. @@ -113,97 +121,85 @@ public final class BlobsDownloadHeaders { * The x-ms-blob-sequence-number property. */ @Generated - private Long xMsBlobSequenceNumber; + private Long blobSequenceNumber; /* * The x-ms-blob-type property. */ @Generated - private BlobType xMsBlobType; + private BlobType blobType; + + /* + * The x-ms-content-crc64 property. + */ + @Generated + private byte[] contentCrc64; /* * The x-ms-copy-completion-time property. */ @Generated - private DateTimeRfc1123 xMsCopyCompletionTime; + private DateTimeRfc1123 copyCompletionTime; /* * The x-ms-copy-status-description property. */ @Generated - private String xMsCopyStatusDescription; + private String copyStatusDescription; /* * The x-ms-copy-id property. */ @Generated - private String xMsCopyId; + private String copyId; /* * The x-ms-copy-progress property. */ @Generated - private String xMsCopyProgress; + private String copyProgress; /* - * The x-ms-copy-source property. + * The x-ms-copy-status property. */ @Generated - private String xMsCopySource; + private CopyStatusType copyStatus; /* - * The x-ms-copy-status property. + * The x-ms-copy-source property. */ @Generated - private CopyStatusType xMsCopyStatus; + private String copySource; /* * The x-ms-lease-duration property. */ @Generated - private LeaseDurationType xMsLeaseDuration; + private LeaseDurationType duration; /* * The x-ms-lease-state property. */ @Generated - private LeaseStateType xMsLeaseState; + private LeaseStateType leaseState; /* * The x-ms-lease-status property. */ @Generated - private LeaseStatusType xMsLeaseStatus; - - /* - * The x-ms-client-request-id property. - */ - @Generated - private String xMsClientRequestId; - - /* - * The x-ms-request-id property. - */ - @Generated - private String xMsRequestId; - - /* - * The x-ms-version property. - */ - @Generated - private String xMsVersion; + private LeaseStatusType leaseStatus; /* * The x-ms-version-id property. */ @Generated - private String xMsVersionId; + private String versionId; /* * The x-ms-is-current-version property. */ @Generated - private Boolean xMsIsCurrentVersion; + private Boolean isCurrentVersion; /* * The Accept-Ranges property. @@ -221,115 +217,115 @@ public final class BlobsDownloadHeaders { * The x-ms-blob-committed-block-count property. */ @Generated - private Integer xMsBlobCommittedBlockCount; + private Integer blobCommittedBlockCount; /* * The x-ms-server-encrypted property. */ @Generated - private Boolean xMsServerEncrypted; + private Boolean isServerEncrypted; /* * The x-ms-encryption-key-sha256 property. */ @Generated - private String xMsEncryptionKeySha256; + private String encryptionKeySha256; /* * The x-ms-encryption-scope property. */ @Generated - private String xMsEncryptionScope; + private String encryptionScope; /* * The x-ms-blob-content-md5 property. */ @Generated - private byte[] xMsBlobContentMd5; + private byte[] blobContentMd5; /* * The x-ms-tag-count property. */ @Generated - private Long xMsTagCount; + private Long tagCount; /* * The x-ms-blob-sealed property. */ @Generated - private Boolean xMsBlobSealed; + private Boolean isSealed; /* * The x-ms-last-access-time property. */ @Generated - private DateTimeRfc1123 xMsLastAccessTime; + private DateTimeRfc1123 lastAccessed; /* * The x-ms-immutability-policy-until-date property. */ @Generated - private DateTimeRfc1123 xMsImmutabilityPolicyUntilDate; + private DateTimeRfc1123 immutabilityPolicyExpiresOn; /* * The x-ms-immutability-policy-mode property. */ @Generated - private String xMsImmutabilityPolicyMode; + private BlobImmutabilityPolicyMode immutabilityPolicyMode; /* * The x-ms-legal-hold property. */ @Generated - private Boolean xMsLegalHold; + private Boolean legalHold; /* * The x-ms-structured-body property. */ @Generated - private String xMsStructuredBody; + private String structuredBodyType; /* * The x-ms-structured-content-length property. */ @Generated - private Long xMsStructuredContentLength; + private Long structuredContentLength; /* * The x-ms-access-tier property. */ @Generated - private String xMsAccessTier; + private String accessTier; /* * The x-ms-access-tier-inferred property. */ @Generated - private Boolean xMsAccessTierInferred; + private Boolean accessTierInferred; /* * The x-ms-access-tier-change-time property. */ @Generated - private DateTimeRfc1123 xMsAccessTierChangeTime; + private DateTimeRfc1123 accessTierChangeTime; /* * The x-ms-smart-access-tier property. */ @Generated - private String xMsSmartAccessTier; + private String smartAccessTier; /* * The x-ms-download-hint property. */ @Generated - private DownloadHint xMsDownloadHint; + private DownloadHint downloadHint; /* - * The x-ms-content-crc64 property. + * The x-ms-version property. */ @Generated - private byte[] xMsContentCrc64; + private String version; private static final HttpHeaderName X_MS_CREATION_TIME = HttpHeaderName.fromString("x-ms-creation-time"); @@ -340,6 +336,8 @@ public final class BlobsDownloadHeaders { private static final HttpHeaderName X_MS_BLOB_TYPE = HttpHeaderName.fromString("x-ms-blob-type"); + private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); + private static final HttpHeaderName X_MS_COPY_COMPLETION_TIME = HttpHeaderName.fromString("x-ms-copy-completion-time"); @@ -350,18 +348,16 @@ public final class BlobsDownloadHeaders { private static final HttpHeaderName X_MS_COPY_PROGRESS = HttpHeaderName.fromString("x-ms-copy-progress"); - private static final HttpHeaderName X_MS_COPY_SOURCE = HttpHeaderName.fromString("x-ms-copy-source"); - private static final HttpHeaderName X_MS_COPY_STATUS = HttpHeaderName.fromString("x-ms-copy-status"); + private static final HttpHeaderName X_MS_COPY_SOURCE = HttpHeaderName.fromString("x-ms-copy-source"); + private static final HttpHeaderName X_MS_LEASE_DURATION = HttpHeaderName.fromString("x-ms-lease-duration"); private static final HttpHeaderName X_MS_LEASE_STATE = HttpHeaderName.fromString("x-ms-lease-state"); 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_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); private static final HttpHeaderName X_MS_IS_CURRENT_VERSION = HttpHeaderName.fromString("x-ms-is-current-version"); @@ -409,102 +405,106 @@ public final class BlobsDownloadHeaders { private static final HttpHeaderName X_MS_DOWNLOAD_HINT = HttpHeaderName.fromString("x-ms-download-hint"); - private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); // 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) { + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } else { this.lastModified = null; } - String xMsCreationTime = rawHeaders.getValue(X_MS_CREATION_TIME); - if (xMsCreationTime != null) { - this.xMsCreationTime = new DateTimeRfc1123(xMsCreationTime); + String creationTime = rawHeaders.getValue(X_MS_CREATION_TIME); + if (creationTime != null) { + this.creationTime = new DateTimeRfc1123(creationTime); } else { - this.xMsCreationTime = null; + this.creationTime = null; } - this.xMsOrPolicyId = rawHeaders.getValue(X_MS_OR_POLICY_ID); + this.objectReplicationPolicyId = rawHeaders.getValue(X_MS_OR_POLICY_ID); String contentLength = rawHeaders.getValue(HttpHeaderName.CONTENT_LENGTH); if (contentLength != null) { this.contentLength = Long.parseLong(contentLength); } else { this.contentLength = null; } - this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); this.contentRange = rawHeaders.getValue(HttpHeaderName.CONTENT_RANGE); this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); - String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); - if (contentMD5 != null) { - this.contentMD5 = Base64.getDecoder().decode(contentMD5); + String contentMd5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMd5 != null) { + this.contentMd5 = Base64.getDecoder().decode(contentMd5); } else { - this.contentMD5 = null; + this.contentMd5 = null; } this.contentEncoding = rawHeaders.getValue(HttpHeaderName.CONTENT_ENCODING); this.cacheControl = rawHeaders.getValue(HttpHeaderName.CACHE_CONTROL); this.contentDisposition = rawHeaders.getValue(HttpHeaderName.CONTENT_DISPOSITION); this.contentLanguage = rawHeaders.getValue(HttpHeaderName.CONTENT_LANGUAGE); - String xMsBlobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); - if (xMsBlobSequenceNumber != null) { - this.xMsBlobSequenceNumber = Long.parseLong(xMsBlobSequenceNumber); + String blobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); + if (blobSequenceNumber != null) { + this.blobSequenceNumber = Long.parseLong(blobSequenceNumber); } else { - this.xMsBlobSequenceNumber = null; + this.blobSequenceNumber = null; } - String xMsBlobType = rawHeaders.getValue(X_MS_BLOB_TYPE); - if (xMsBlobType != null) { - this.xMsBlobType = BlobType.fromString(xMsBlobType); + String blobType = rawHeaders.getValue(X_MS_BLOB_TYPE); + if (blobType != null) { + this.blobType = BlobType.fromString(blobType); } else { - this.xMsBlobType = null; + this.blobType = null; } - String xMsCopyCompletionTime = rawHeaders.getValue(X_MS_COPY_COMPLETION_TIME); - if (xMsCopyCompletionTime != null) { - this.xMsCopyCompletionTime = new DateTimeRfc1123(xMsCopyCompletionTime); + String contentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (contentCrc64 != null) { + this.contentCrc64 = Base64.getDecoder().decode(contentCrc64); } else { - this.xMsCopyCompletionTime = null; + this.contentCrc64 = null; } - this.xMsCopyStatusDescription = rawHeaders.getValue(X_MS_COPY_STATUS_DESCRIPTION); - this.xMsCopyId = rawHeaders.getValue(X_MS_COPY_ID); - this.xMsCopyProgress = rawHeaders.getValue(X_MS_COPY_PROGRESS); - this.xMsCopySource = rawHeaders.getValue(X_MS_COPY_SOURCE); - String xMsCopyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); - if (xMsCopyStatus != null) { - this.xMsCopyStatus = CopyStatusType.fromString(xMsCopyStatus); + String copyCompletionTime = rawHeaders.getValue(X_MS_COPY_COMPLETION_TIME); + if (copyCompletionTime != null) { + this.copyCompletionTime = new DateTimeRfc1123(copyCompletionTime); } else { - this.xMsCopyStatus = null; + this.copyCompletionTime = null; } - String xMsLeaseDuration = rawHeaders.getValue(X_MS_LEASE_DURATION); - if (xMsLeaseDuration != null) { - this.xMsLeaseDuration = LeaseDurationType.fromString(xMsLeaseDuration); + this.copyStatusDescription = rawHeaders.getValue(X_MS_COPY_STATUS_DESCRIPTION); + this.copyId = rawHeaders.getValue(X_MS_COPY_ID); + this.copyProgress = rawHeaders.getValue(X_MS_COPY_PROGRESS); + String copyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); + if (copyStatus != null) { + this.copyStatus = CopyStatusType.fromString(copyStatus); } else { - this.xMsLeaseDuration = null; + this.copyStatus = null; } - String xMsLeaseState = rawHeaders.getValue(X_MS_LEASE_STATE); - if (xMsLeaseState != null) { - this.xMsLeaseState = LeaseStateType.fromString(xMsLeaseState); + this.copySource = rawHeaders.getValue(X_MS_COPY_SOURCE); + String duration = rawHeaders.getValue(X_MS_LEASE_DURATION); + if (duration != null) { + this.duration = LeaseDurationType.fromString(duration); } else { - this.xMsLeaseState = null; + this.duration = null; } - String xMsLeaseStatus = rawHeaders.getValue(X_MS_LEASE_STATUS); - if (xMsLeaseStatus != null) { - this.xMsLeaseStatus = LeaseStatusType.fromString(xMsLeaseStatus); + String leaseState = rawHeaders.getValue(X_MS_LEASE_STATE); + if (leaseState != null) { + this.leaseState = LeaseStateType.fromString(leaseState); } else { - this.xMsLeaseStatus = null; + this.leaseState = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); - String xMsIsCurrentVersion = rawHeaders.getValue(X_MS_IS_CURRENT_VERSION); - if (xMsIsCurrentVersion != null) { - this.xMsIsCurrentVersion = Boolean.parseBoolean(xMsIsCurrentVersion); + String leaseStatus = rawHeaders.getValue(X_MS_LEASE_STATUS); + if (leaseStatus != null) { + this.leaseStatus = LeaseStatusType.fromString(leaseStatus); } else { - this.xMsIsCurrentVersion = null; + this.leaseStatus = null; + } + this.versionId = rawHeaders.getValue(X_MS_VERSION_ID); + String isCurrentVersion = rawHeaders.getValue(X_MS_IS_CURRENT_VERSION); + if (isCurrentVersion != null) { + this.isCurrentVersion = Boolean.parseBoolean(isCurrentVersion); + } else { + this.isCurrentVersion = null; } this.acceptRanges = rawHeaders.getValue(HttpHeaderName.ACCEPT_RANGES); String date = rawHeaders.getValue(HttpHeaderName.DATE); @@ -513,278 +513,292 @@ public BlobsDownloadHeaders(HttpHeaders rawHeaders) { } else { this.date = null; } - String xMsBlobCommittedBlockCount = rawHeaders.getValue(X_MS_BLOB_COMMITTED_BLOCK_COUNT); - if (xMsBlobCommittedBlockCount != null) { - this.xMsBlobCommittedBlockCount = Integer.parseInt(xMsBlobCommittedBlockCount); + String blobCommittedBlockCount = rawHeaders.getValue(X_MS_BLOB_COMMITTED_BLOCK_COUNT); + if (blobCommittedBlockCount != null) { + this.blobCommittedBlockCount = Integer.parseInt(blobCommittedBlockCount); } else { - this.xMsBlobCommittedBlockCount = null; + this.blobCommittedBlockCount = null; } - String xMsServerEncrypted = rawHeaders.getValue(X_MS_SERVER_ENCRYPTED); - if (xMsServerEncrypted != null) { - this.xMsServerEncrypted = Boolean.parseBoolean(xMsServerEncrypted); + String isServerEncrypted = rawHeaders.getValue(X_MS_SERVER_ENCRYPTED); + if (isServerEncrypted != null) { + this.isServerEncrypted = Boolean.parseBoolean(isServerEncrypted); } else { - this.xMsServerEncrypted = null; + this.isServerEncrypted = null; } - this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); - String xMsBlobContentMd5 = rawHeaders.getValue(X_MS_BLOB_CONTENT_MD5); - if (xMsBlobContentMd5 != null) { - this.xMsBlobContentMd5 = Base64.getDecoder().decode(xMsBlobContentMd5); + this.encryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.encryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + String blobContentMd5 = rawHeaders.getValue(X_MS_BLOB_CONTENT_MD5); + if (blobContentMd5 != null) { + this.blobContentMd5 = Base64.getDecoder().decode(blobContentMd5); } else { - this.xMsBlobContentMd5 = null; + this.blobContentMd5 = null; } - String xMsTagCount = rawHeaders.getValue(X_MS_TAG_COUNT); - if (xMsTagCount != null) { - this.xMsTagCount = Long.parseLong(xMsTagCount); + String tagCount = rawHeaders.getValue(X_MS_TAG_COUNT); + if (tagCount != null) { + this.tagCount = Long.parseLong(tagCount); } else { - this.xMsTagCount = null; + this.tagCount = null; } - String xMsBlobSealed = rawHeaders.getValue(X_MS_BLOB_SEALED); - if (xMsBlobSealed != null) { - this.xMsBlobSealed = Boolean.parseBoolean(xMsBlobSealed); + String isSealed = rawHeaders.getValue(X_MS_BLOB_SEALED); + if (isSealed != null) { + this.isSealed = Boolean.parseBoolean(isSealed); } else { - this.xMsBlobSealed = null; + this.isSealed = null; } - String xMsLastAccessTime = rawHeaders.getValue(X_MS_LAST_ACCESS_TIME); - if (xMsLastAccessTime != null) { - this.xMsLastAccessTime = new DateTimeRfc1123(xMsLastAccessTime); + String lastAccessed = rawHeaders.getValue(X_MS_LAST_ACCESS_TIME); + if (lastAccessed != null) { + this.lastAccessed = new DateTimeRfc1123(lastAccessed); } else { - this.xMsLastAccessTime = null; + this.lastAccessed = null; } - String xMsImmutabilityPolicyUntilDate = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_UNTIL_DATE); - if (xMsImmutabilityPolicyUntilDate != null) { - this.xMsImmutabilityPolicyUntilDate = new DateTimeRfc1123(xMsImmutabilityPolicyUntilDate); + String immutabilityPolicyExpiresOn = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_UNTIL_DATE); + if (immutabilityPolicyExpiresOn != null) { + this.immutabilityPolicyExpiresOn = new DateTimeRfc1123(immutabilityPolicyExpiresOn); } else { - this.xMsImmutabilityPolicyUntilDate = null; + this.immutabilityPolicyExpiresOn = null; } - this.xMsImmutabilityPolicyMode = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_MODE); - String xMsLegalHold = rawHeaders.getValue(X_MS_LEGAL_HOLD); - if (xMsLegalHold != null) { - this.xMsLegalHold = Boolean.parseBoolean(xMsLegalHold); + String immutabilityPolicyMode = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_MODE); + if (immutabilityPolicyMode != null) { + this.immutabilityPolicyMode = BlobImmutabilityPolicyMode.fromString(immutabilityPolicyMode); } else { - this.xMsLegalHold = null; + this.immutabilityPolicyMode = null; } - this.xMsStructuredBody = rawHeaders.getValue(X_MS_STRUCTURED_BODY); - String xMsStructuredContentLength = rawHeaders.getValue(X_MS_STRUCTURED_CONTENT_LENGTH); - if (xMsStructuredContentLength != null) { - this.xMsStructuredContentLength = Long.parseLong(xMsStructuredContentLength); + String legalHold = rawHeaders.getValue(X_MS_LEGAL_HOLD); + if (legalHold != null) { + this.legalHold = Boolean.parseBoolean(legalHold); } else { - this.xMsStructuredContentLength = null; + this.legalHold = null; } - this.xMsAccessTier = rawHeaders.getValue(X_MS_ACCESS_TIER); - String xMsAccessTierInferred = rawHeaders.getValue(X_MS_ACCESS_TIER_INFERRED); - if (xMsAccessTierInferred != null) { - this.xMsAccessTierInferred = Boolean.parseBoolean(xMsAccessTierInferred); + this.structuredBodyType = rawHeaders.getValue(X_MS_STRUCTURED_BODY); + String structuredContentLength = rawHeaders.getValue(X_MS_STRUCTURED_CONTENT_LENGTH); + if (structuredContentLength != null) { + this.structuredContentLength = Long.parseLong(structuredContentLength); } else { - this.xMsAccessTierInferred = null; + this.structuredContentLength = null; } - String xMsAccessTierChangeTime = rawHeaders.getValue(X_MS_ACCESS_TIER_CHANGE_TIME); - if (xMsAccessTierChangeTime != null) { - this.xMsAccessTierChangeTime = new DateTimeRfc1123(xMsAccessTierChangeTime); + this.accessTier = rawHeaders.getValue(X_MS_ACCESS_TIER); + String accessTierInferred = rawHeaders.getValue(X_MS_ACCESS_TIER_INFERRED); + if (accessTierInferred != null) { + this.accessTierInferred = Boolean.parseBoolean(accessTierInferred); } else { - this.xMsAccessTierChangeTime = null; + this.accessTierInferred = null; } - this.xMsSmartAccessTier = rawHeaders.getValue(X_MS_SMART_ACCESS_TIER); - String xMsDownloadHint = rawHeaders.getValue(X_MS_DOWNLOAD_HINT); - if (xMsDownloadHint != null) { - this.xMsDownloadHint = DownloadHint.fromString(xMsDownloadHint); + String accessTierChangeTime = rawHeaders.getValue(X_MS_ACCESS_TIER_CHANGE_TIME); + if (accessTierChangeTime != null) { + this.accessTierChangeTime = new DateTimeRfc1123(accessTierChangeTime); } else { - this.xMsDownloadHint = null; + this.accessTierChangeTime = null; } - String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); - if (xMsContentCrc64 != null) { - this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); + this.smartAccessTier = rawHeaders.getValue(X_MS_SMART_ACCESS_TIER); + String downloadHint = rawHeaders.getValue(X_MS_DOWNLOAD_HINT); + if (downloadHint != null) { + this.downloadHint = DownloadHint.fromString(downloadHint); } else { - this.xMsContentCrc64 = null; + this.downloadHint = null; } - Map xMsMetaHeaderCollection = new LinkedHashMap<>(); - Map xMsOrHeaderCollection = new LinkedHashMap<>(); - + this.version = rawHeaders.getValue(X_MS_VERSION); + Map metadataHeaderCollection = new LinkedHashMap<>(); + Map objectReplicationRulesHeaderCollection = new LinkedHashMap<>(); rawHeaders.stream().forEach(header -> { String headerName = header.getName(); - if (headerName.startsWith("x-ms-meta-")) { - xMsMetaHeaderCollection.put(headerName.substring(10), header.getValue()); + String headerNameLowerCase = headerName.toLowerCase(Locale.ROOT); + if (headerNameLowerCase.startsWith("x-ms-meta-")) { + metadataHeaderCollection.put(headerName.substring(10), header.getValue()); return; } - if (headerName.startsWith("x-ms-or-")) { - xMsOrHeaderCollection.put(headerName.substring(8), header.getValue()); + if (headerNameLowerCase.startsWith("x-ms-or-")) { + objectReplicationRulesHeaderCollection.put(headerName.substring(8), header.getValue()); } }); - this.xMsMeta = xMsMetaHeaderCollection; - this.xMsOr = xMsOrHeaderCollection; + this.metadata = metadataHeaderCollection; + this.objectReplicationRules = objectReplicationRulesHeaderCollection; } /** - * Get the lastModified property: The Last-Modified property. - * - * @return the lastModified value. + * Get the requestId property: The x-ms-request-id property. + * + * @return the requestId value. */ @Generated - public OffsetDateTime getLastModified() { - if (this.lastModified == null) { - return null; - } - return this.lastModified.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. + * Set the requestId property. + * + * @param requestId the requestId value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } + public BlobsDownloadHeaders setRequestId(String requestId) { + this.requestId = requestId; return this; } /** - * Get the xMsCreationTime property: The x-ms-creation-time property. - * - * @return the xMsCreationTime value. + * Get the clientRequestId property: The x-ms-client-request-id property. + * + * @return the clientRequestId value. */ @Generated - public OffsetDateTime getXMsCreationTime() { - if (this.xMsCreationTime == null) { - return null; - } - return this.xMsCreationTime.getDateTime(); + public String getClientRequestId() { + return this.clientRequestId; } /** - * Set the xMsCreationTime property: The x-ms-creation-time property. - * - * @param xMsCreationTime the xMsCreationTime value to set. + * Set the clientRequestId property. + * + * @param clientRequestId the clientRequestId value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsCreationTime(OffsetDateTime xMsCreationTime) { - if (xMsCreationTime == null) { - this.xMsCreationTime = null; - } else { - this.xMsCreationTime = new DateTimeRfc1123(xMsCreationTime); - } + public BlobsDownloadHeaders setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; return this; } /** - * Get the xMsMeta property: The x-ms-meta- property. - * - * @return the xMsMeta value. + * Get the metadata property: The x-ms-meta- property. + * + * @return the metadata value. */ @Generated - public Map getXMsMeta() { - return this.xMsMeta; + public Map getMetadata() { + return this.metadata; } /** - * Set the xMsMeta property: The x-ms-meta- property. - * - * @param xMsMeta the xMsMeta value to set. + * Set the metadata property. + * + * @param metadata the metadata value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsMeta(Map xMsMeta) { - this.xMsMeta = xMsMeta; + public BlobsDownloadHeaders setMetadata(Map metadata) { + this.metadata = metadata; return this; } /** - * Get the xMsOrPolicyId property: The x-ms-or-policy-id property. - * - * @return the xMsOrPolicyId value. + * Get the objectReplicationRules property: The x-ms-or- property. + * + * @return the objectReplicationRules value. */ @Generated - public String getXMsOrPolicyId() { - return this.xMsOrPolicyId; + public Map getObjectReplicationRules() { + return this.objectReplicationRules; } /** - * Set the xMsOrPolicyId property: The x-ms-or-policy-id property. - * - * @param xMsOrPolicyId the xMsOrPolicyId value to set. + * Set the objectReplicationRules property. + * + * @param objectReplicationRules the objectReplicationRules value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsOrPolicyId(String xMsOrPolicyId) { - this.xMsOrPolicyId = xMsOrPolicyId; + public BlobsDownloadHeaders setObjectReplicationRules(Map objectReplicationRules) { + this.objectReplicationRules = objectReplicationRules; return this; } /** - * Get the xMsOr property: The x-ms-or- property. - * - * @return the xMsOr value. + * Get the lastModified property: The Last-Modified property. + * + * @return the lastModified value. */ @Generated - public Map getXMsOr() { - return this.xMsOr; + public OffsetDateTime getLastModified() { + if (this.lastModified == null) { + return null; + } + return this.lastModified.getDateTime(); } /** - * Set the xMsOr property: The x-ms-or- property. - * - * @param xMsOr the xMsOr value to set. + * Set the lastModified property. + * + * @param lastModified the lastModified value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsOr(Map xMsOr) { - this.xMsOr = xMsOr; + public BlobsDownloadHeaders setLastModified(OffsetDateTime lastModified) { + this.lastModified = lastModified == null ? null : new DateTimeRfc1123(lastModified); return this; } /** - * Get the contentLength property: The Content-Length property. - * - * @return the contentLength value. + * Get the creationTime property: The x-ms-creation-time property. + * + * @return the creationTime value. */ @Generated - public Long getContentLength() { - return this.contentLength; + public OffsetDateTime getCreationTime() { + if (this.creationTime == null) { + return null; + } + return this.creationTime.getDateTime(); } /** - * Set the contentLength property: The Content-Length property. - * - * @param contentLength the contentLength value to set. + * Set the creationTime property. + * + * @param creationTime the creationTime value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setContentLength(Long contentLength) { - this.contentLength = contentLength; + public BlobsDownloadHeaders setCreationTime(OffsetDateTime creationTime) { + this.creationTime = creationTime == null ? null : new DateTimeRfc1123(creationTime); return this; } /** - * Get the contentType property: The Content-Type property. - * - * @return the contentType value. + * Get the objectReplicationPolicyId property: The x-ms-or-policy-id property. + * + * @return the objectReplicationPolicyId value. */ @Generated - public String getContentType() { - return this.contentType; + public String getObjectReplicationPolicyId() { + return this.objectReplicationPolicyId; } /** - * Set the contentType property: The Content-Type property. - * - * @param contentType the contentType value to set. + * Set the objectReplicationPolicyId property. + * + * @param objectReplicationPolicyId the objectReplicationPolicyId value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setContentType(String contentType) { - this.contentType = contentType; + public BlobsDownloadHeaders setObjectReplicationPolicyId(String objectReplicationPolicyId) { + this.objectReplicationPolicyId = objectReplicationPolicyId; + return this; + } + + /** + * Get the contentLength property: The Content-Length property. + * + * @return the contentLength value. + */ + @Generated + public Long getContentLength() { + return this.contentLength; + } + + /** + * Set the contentLength property. + * + * @param contentLength the contentLength value to set. + * @return the BlobsDownloadHeaders object itself. + */ + @Generated + public BlobsDownloadHeaders setContentLength(Long contentLength) { + this.contentLength = contentLength; return this; } /** * Get the contentRange property: The Content-Range property. - * + * * @return the contentRange value. */ @Generated @@ -793,8 +807,8 @@ public String getContentRange() { } /** - * Set the contentRange property: The Content-Range property. - * + * Set the contentRange property. + * * @param contentRange the contentRange value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -806,7 +820,7 @@ public BlobsDownloadHeaders setContentRange(String contentRange) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ @Generated @@ -815,8 +829,8 @@ public String getETag() { } /** - * Set the eTag property: The ETag property. - * + * Set the eTag property. + * * @param eTag the eTag value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -827,30 +841,30 @@ public BlobsDownloadHeaders setETag(String eTag) { } /** - * Get the contentMD5 property: The Content-MD5 property. - * - * @return the contentMD5 value. + * Get the contentMd5 property: The Content-MD5 property. + * + * @return the contentMd5 value. */ @Generated - public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + public byte[] getContentMd5() { + return CoreUtils.clone(this.contentMd5); } /** - * Set the contentMD5 property: The Content-MD5 property. - * - * @param contentMD5 the contentMD5 value to set. + * Set the contentMd5 property. + * + * @param contentMd5 the contentMd5 value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); + public BlobsDownloadHeaders setContentMd5(byte[] contentMd5) { + this.contentMd5 = contentMd5; return this; } /** * Get the contentEncoding property: The Content-Encoding property. - * + * * @return the contentEncoding value. */ @Generated @@ -859,8 +873,8 @@ public String getContentEncoding() { } /** - * Set the contentEncoding property: The Content-Encoding property. - * + * Set the contentEncoding property. + * * @param contentEncoding the contentEncoding value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -872,7 +886,7 @@ public BlobsDownloadHeaders setContentEncoding(String contentEncoding) { /** * Get the cacheControl property: The Cache-Control property. - * + * * @return the cacheControl value. */ @Generated @@ -881,8 +895,8 @@ public String getCacheControl() { } /** - * Set the cacheControl property: The Cache-Control property. - * + * Set the cacheControl property. + * * @param cacheControl the cacheControl value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -894,7 +908,7 @@ public BlobsDownloadHeaders setCacheControl(String cacheControl) { /** * Get the contentDisposition property: The Content-Disposition property. - * + * * @return the contentDisposition value. */ @Generated @@ -903,8 +917,8 @@ public String getContentDisposition() { } /** - * Set the contentDisposition property: The Content-Disposition property. - * + * Set the contentDisposition property. + * * @param contentDisposition the contentDisposition value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -916,7 +930,7 @@ public BlobsDownloadHeaders setContentDisposition(String contentDisposition) { /** * Get the contentLanguage property: The Content-Language property. - * + * * @return the contentLanguage value. */ @Generated @@ -925,8 +939,8 @@ public String getContentLanguage() { } /** - * Set the contentLanguage property: The Content-Language property. - * + * Set the contentLanguage property. + * * @param contentLanguage the contentLanguage value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -937,367 +951,319 @@ public BlobsDownloadHeaders setContentLanguage(String contentLanguage) { } /** - * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * - * @return the xMsBlobSequenceNumber value. + * Get the blobSequenceNumber property: The x-ms-blob-sequence-number property. + * + * @return the blobSequenceNumber value. */ @Generated - public Long getXMsBlobSequenceNumber() { - return this.xMsBlobSequenceNumber; + public Long getBlobSequenceNumber() { + return this.blobSequenceNumber; } /** - * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * - * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. + * Set the blobSequenceNumber property. + * + * @param blobSequenceNumber the blobSequenceNumber value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { - this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; + public BlobsDownloadHeaders setBlobSequenceNumber(Long blobSequenceNumber) { + this.blobSequenceNumber = blobSequenceNumber; return this; } /** - * Get the xMsBlobType property: The x-ms-blob-type property. - * - * @return the xMsBlobType value. + * Get the blobType property: The x-ms-blob-type property. + * + * @return the blobType value. */ @Generated - public BlobType getXMsBlobType() { - return this.xMsBlobType; + public BlobType getBlobType() { + return this.blobType; } /** - * Set the xMsBlobType property: The x-ms-blob-type property. - * - * @param xMsBlobType the xMsBlobType value to set. + * Set the blobType property. + * + * @param blobType the blobType value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsBlobType(BlobType xMsBlobType) { - this.xMsBlobType = xMsBlobType; + public BlobsDownloadHeaders setBlobType(BlobType blobType) { + this.blobType = blobType; return this; } /** - * Get the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * - * @return the xMsCopyCompletionTime value. + * Get the contentCrc64 property: The x-ms-content-crc64 property. + * + * @return the contentCrc64 value. */ @Generated - public OffsetDateTime getXMsCopyCompletionTime() { - if (this.xMsCopyCompletionTime == null) { - return null; - } - return this.xMsCopyCompletionTime.getDateTime(); + public byte[] getContentCrc64() { + return CoreUtils.clone(this.contentCrc64); } /** - * Set the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * - * @param xMsCopyCompletionTime the xMsCopyCompletionTime value to set. + * Set the contentCrc64 property. + * + * @param contentCrc64 the contentCrc64 value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsCopyCompletionTime(OffsetDateTime xMsCopyCompletionTime) { - if (xMsCopyCompletionTime == null) { - this.xMsCopyCompletionTime = null; - } else { - this.xMsCopyCompletionTime = new DateTimeRfc1123(xMsCopyCompletionTime); - } - return this; - } - - /** - * Get the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * - * @return the xMsCopyStatusDescription value. - */ - @Generated - public String getXMsCopyStatusDescription() { - return this.xMsCopyStatusDescription; - } - - /** - * Set the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * - * @param xMsCopyStatusDescription the xMsCopyStatusDescription value to set. - * @return the BlobsDownloadHeaders object itself. - */ - @Generated - public BlobsDownloadHeaders setXMsCopyStatusDescription(String xMsCopyStatusDescription) { - this.xMsCopyStatusDescription = xMsCopyStatusDescription; - return this; - } - - /** - * Get the xMsCopyId property: The x-ms-copy-id property. - * - * @return the xMsCopyId value. - */ - @Generated - public String getXMsCopyId() { - return this.xMsCopyId; - } - - /** - * Set the xMsCopyId property: The x-ms-copy-id property. - * - * @param xMsCopyId the xMsCopyId value to set. - * @return the BlobsDownloadHeaders object itself. - */ - @Generated - public BlobsDownloadHeaders setXMsCopyId(String xMsCopyId) { - this.xMsCopyId = xMsCopyId; + public BlobsDownloadHeaders setContentCrc64(byte[] contentCrc64) { + this.contentCrc64 = contentCrc64; return this; } /** - * Get the xMsCopyProgress property: The x-ms-copy-progress property. - * - * @return the xMsCopyProgress value. + * Get the copyCompletionTime property: The x-ms-copy-completion-time property. + * + * @return the copyCompletionTime value. */ @Generated - public String getXMsCopyProgress() { - return this.xMsCopyProgress; + public OffsetDateTime getCopyCompletionTime() { + if (this.copyCompletionTime == null) { + return null; + } + return this.copyCompletionTime.getDateTime(); } /** - * Set the xMsCopyProgress property: The x-ms-copy-progress property. - * - * @param xMsCopyProgress the xMsCopyProgress value to set. + * Set the copyCompletionTime property. + * + * @param copyCompletionTime the copyCompletionTime value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsCopyProgress(String xMsCopyProgress) { - this.xMsCopyProgress = xMsCopyProgress; + public BlobsDownloadHeaders setCopyCompletionTime(OffsetDateTime copyCompletionTime) { + this.copyCompletionTime = copyCompletionTime == null ? null : new DateTimeRfc1123(copyCompletionTime); return this; } /** - * Get the xMsCopySource property: The x-ms-copy-source property. - * - * @return the xMsCopySource value. + * Get the copyStatusDescription property: The x-ms-copy-status-description property. + * + * @return the copyStatusDescription value. */ @Generated - public String getXMsCopySource() { - return this.xMsCopySource; + public String getCopyStatusDescription() { + return this.copyStatusDescription; } /** - * Set the xMsCopySource property: The x-ms-copy-source property. - * - * @param xMsCopySource the xMsCopySource value to set. + * Set the copyStatusDescription property. + * + * @param copyStatusDescription the copyStatusDescription value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsCopySource(String xMsCopySource) { - this.xMsCopySource = xMsCopySource; + public BlobsDownloadHeaders setCopyStatusDescription(String copyStatusDescription) { + this.copyStatusDescription = copyStatusDescription; return this; } /** - * Get the xMsCopyStatus property: The x-ms-copy-status property. - * - * @return the xMsCopyStatus value. + * Get the copyId property: The x-ms-copy-id property. + * + * @return the copyId value. */ @Generated - public CopyStatusType getXMsCopyStatus() { - return this.xMsCopyStatus; + public String getCopyId() { + return this.copyId; } /** - * Set the xMsCopyStatus property: The x-ms-copy-status property. - * - * @param xMsCopyStatus the xMsCopyStatus value to set. + * Set the copyId property. + * + * @param copyId the copyId value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) { - this.xMsCopyStatus = xMsCopyStatus; + public BlobsDownloadHeaders setCopyId(String copyId) { + this.copyId = copyId; return this; } /** - * Get the xMsLeaseDuration property: The x-ms-lease-duration property. - * - * @return the xMsLeaseDuration value. + * Get the copyProgress property: The x-ms-copy-progress property. + * + * @return the copyProgress value. */ @Generated - public LeaseDurationType getXMsLeaseDuration() { - return this.xMsLeaseDuration; + public String getCopyProgress() { + return this.copyProgress; } /** - * Set the xMsLeaseDuration property: The x-ms-lease-duration property. - * - * @param xMsLeaseDuration the xMsLeaseDuration value to set. + * Set the copyProgress property. + * + * @param copyProgress the copyProgress value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsLeaseDuration(LeaseDurationType xMsLeaseDuration) { - this.xMsLeaseDuration = xMsLeaseDuration; + public BlobsDownloadHeaders setCopyProgress(String copyProgress) { + this.copyProgress = copyProgress; return this; } /** - * Get the xMsLeaseState property: The x-ms-lease-state property. - * - * @return the xMsLeaseState value. + * Get the copyStatus property: The x-ms-copy-status property. + * + * @return the copyStatus value. */ @Generated - public LeaseStateType getXMsLeaseState() { - return this.xMsLeaseState; + public CopyStatusType getCopyStatus() { + return this.copyStatus; } /** - * Set the xMsLeaseState property: The x-ms-lease-state property. - * - * @param xMsLeaseState the xMsLeaseState value to set. + * Set the copyStatus property. + * + * @param copyStatus the copyStatus value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsLeaseState(LeaseStateType xMsLeaseState) { - this.xMsLeaseState = xMsLeaseState; + public BlobsDownloadHeaders setCopyStatus(CopyStatusType copyStatus) { + this.copyStatus = copyStatus; return this; } /** - * Get the xMsLeaseStatus property: The x-ms-lease-status property. - * - * @return the xMsLeaseStatus value. + * Get the copySource property: The x-ms-copy-source property. + * + * @return the copySource value. */ @Generated - public LeaseStatusType getXMsLeaseStatus() { - return this.xMsLeaseStatus; + public String getCopySource() { + return this.copySource; } /** - * Set the xMsLeaseStatus property: The x-ms-lease-status property. - * - * @param xMsLeaseStatus the xMsLeaseStatus value to set. + * Set the copySource property. + * + * @param copySource the copySource value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsLeaseStatus(LeaseStatusType xMsLeaseStatus) { - this.xMsLeaseStatus = xMsLeaseStatus; + public BlobsDownloadHeaders setCopySource(String copySource) { + this.copySource = copySource; return this; } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. + * Get the duration property: The x-ms-lease-duration property. + * + * @return the duration value. */ @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; + public LeaseDurationType getDuration() { + return this.duration; } /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. + * Set the duration property. + * + * @param duration the duration value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; + public BlobsDownloadHeaders setDuration(LeaseDurationType duration) { + this.duration = duration; return this; } /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. + * Get the leaseState property: The x-ms-lease-state property. + * + * @return the leaseState value. */ @Generated - public String getXMsRequestId() { - return this.xMsRequestId; + public LeaseStateType getLeaseState() { + return this.leaseState; } /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. + * Set the leaseState property. + * + * @param leaseState the leaseState value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; + public BlobsDownloadHeaders setLeaseState(LeaseStateType leaseState) { + this.leaseState = leaseState; return this; } /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. + * Get the leaseStatus property: The x-ms-lease-status property. + * + * @return the leaseStatus value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public LeaseStatusType getLeaseStatus() { + return this.leaseStatus; } /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. + * Set the leaseStatus property. + * + * @param leaseStatus the leaseStatus value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; + public BlobsDownloadHeaders setLeaseStatus(LeaseStatusType leaseStatus) { + this.leaseStatus = leaseStatus; return this; } /** - * Get the xMsVersionId property: The x-ms-version-id property. - * - * @return the xMsVersionId value. + * Get the versionId property: The x-ms-version-id property. + * + * @return the versionId value. */ @Generated - public String getXMsVersionId() { - return this.xMsVersionId; + public String getVersionId() { + return this.versionId; } /** - * Set the xMsVersionId property: The x-ms-version-id property. - * - * @param xMsVersionId the xMsVersionId value to set. + * Set the versionId property. + * + * @param versionId the versionId value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsVersionId(String xMsVersionId) { - this.xMsVersionId = xMsVersionId; + public BlobsDownloadHeaders setVersionId(String versionId) { + this.versionId = versionId; return this; } /** - * Get the xMsIsCurrentVersion property: The x-ms-is-current-version property. - * - * @return the xMsIsCurrentVersion value. + * Get the isCurrentVersion property: The x-ms-is-current-version property. + * + * @return the isCurrentVersion value. */ @Generated - public Boolean isXMsIsCurrentVersion() { - return this.xMsIsCurrentVersion; + public Boolean isCurrentVersion() { + return this.isCurrentVersion; } /** - * Set the xMsIsCurrentVersion property: The x-ms-is-current-version property. - * - * @param xMsIsCurrentVersion the xMsIsCurrentVersion value to set. + * Set the isCurrentVersion property. + * + * @param isCurrentVersion the isCurrentVersion value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsIsCurrentVersion(Boolean xMsIsCurrentVersion) { - this.xMsIsCurrentVersion = xMsIsCurrentVersion; + public BlobsDownloadHeaders setCurrentVersion(Boolean isCurrentVersion) { + this.isCurrentVersion = isCurrentVersion; return this; } /** * Get the acceptRanges property: The Accept-Ranges property. - * + * * @return the acceptRanges value. */ @Generated @@ -1306,8 +1272,8 @@ public String getAcceptRanges() { } /** - * Set the acceptRanges property: The Accept-Ranges property. - * + * Set the acceptRanges property. + * * @param acceptRanges the acceptRanges value to set. * @return the BlobsDownloadHeaders object itself. */ @@ -1319,7 +1285,7 @@ public BlobsDownloadHeaders setAcceptRanges(String acceptRanges) { /** * Get the date property: The Date property. - * + * * @return the date value. */ @Generated @@ -1331,457 +1297,442 @@ public OffsetDateTime getDate() { } /** - * Set the date property: The Date property. - * + * Set the date property. + * * @param date the date value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated public BlobsDownloadHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } + this.date = date == null ? null : new DateTimeRfc1123(date); return this; } /** - * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * - * @return the xMsBlobCommittedBlockCount value. + * Get the blobCommittedBlockCount property: The x-ms-blob-committed-block-count property. + * + * @return the blobCommittedBlockCount value. */ @Generated - public Integer getXMsBlobCommittedBlockCount() { - return this.xMsBlobCommittedBlockCount; + public Integer getBlobCommittedBlockCount() { + return this.blobCommittedBlockCount; } /** - * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * - * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. + * Set the blobCommittedBlockCount property. + * + * @param blobCommittedBlockCount the blobCommittedBlockCount value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCommittedBlockCount) { - this.xMsBlobCommittedBlockCount = xMsBlobCommittedBlockCount; + public BlobsDownloadHeaders setBlobCommittedBlockCount(Integer blobCommittedBlockCount) { + this.blobCommittedBlockCount = blobCommittedBlockCount; return this; } /** - * Get the xMsServerEncrypted property: The x-ms-server-encrypted property. - * - * @return the xMsServerEncrypted value. + * Get the isServerEncrypted property: The x-ms-server-encrypted property. + * + * @return the isServerEncrypted value. */ @Generated - public Boolean isXMsServerEncrypted() { - return this.xMsServerEncrypted; + public Boolean isServerEncrypted() { + return this.isServerEncrypted; } /** - * Set the xMsServerEncrypted property: The x-ms-server-encrypted property. - * - * @param xMsServerEncrypted the xMsServerEncrypted value to set. + * Set the isServerEncrypted property. + * + * @param isServerEncrypted the isServerEncrypted value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsServerEncrypted(Boolean xMsServerEncrypted) { - this.xMsServerEncrypted = xMsServerEncrypted; + public BlobsDownloadHeaders setServerEncrypted(Boolean isServerEncrypted) { + this.isServerEncrypted = isServerEncrypted; return this; } /** - * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @return the xMsEncryptionKeySha256 value. + * Get the encryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the encryptionKeySha256 value. */ @Generated - public String getXMsEncryptionKeySha256() { - return this.xMsEncryptionKeySha256; + public String getEncryptionKeySha256() { + return this.encryptionKeySha256; } /** - * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. + * Set the encryptionKeySha256 property. + * + * @param encryptionKeySha256 the encryptionKeySha256 value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { - this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; + public BlobsDownloadHeaders setEncryptionKeySha256(String encryptionKeySha256) { + this.encryptionKeySha256 = encryptionKeySha256; return this; } /** - * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * - * @return the xMsEncryptionScope value. + * Get the encryptionScope property: The x-ms-encryption-scope property. + * + * @return the encryptionScope value. */ @Generated - public String getXMsEncryptionScope() { - return this.xMsEncryptionScope; + public String getEncryptionScope() { + return this.encryptionScope; } /** - * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * - * @param xMsEncryptionScope the xMsEncryptionScope value to set. + * Set the encryptionScope property. + * + * @param encryptionScope the encryptionScope value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsEncryptionScope(String xMsEncryptionScope) { - this.xMsEncryptionScope = xMsEncryptionScope; + public BlobsDownloadHeaders setEncryptionScope(String encryptionScope) { + this.encryptionScope = encryptionScope; return this; } /** - * Get the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. - * - * @return the xMsBlobContentMd5 value. + * Get the blobContentMd5 property: The x-ms-blob-content-md5 property. + * + * @return the blobContentMd5 value. */ @Generated - public byte[] getXMsBlobContentMd5() { - return CoreUtils.clone(this.xMsBlobContentMd5); + public byte[] getBlobContentMd5() { + return CoreUtils.clone(this.blobContentMd5); } /** - * Set the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. - * - * @param xMsBlobContentMd5 the xMsBlobContentMd5 value to set. + * Set the blobContentMd5 property. + * + * @param blobContentMd5 the blobContentMd5 value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsBlobContentMd5(byte[] xMsBlobContentMd5) { - this.xMsBlobContentMd5 = CoreUtils.clone(xMsBlobContentMd5); + public BlobsDownloadHeaders setBlobContentMd5(byte[] blobContentMd5) { + this.blobContentMd5 = blobContentMd5; return this; } /** - * Get the xMsTagCount property: The x-ms-tag-count property. - * - * @return the xMsTagCount value. + * Get the tagCount property: The x-ms-tag-count property. + * + * @return the tagCount value. */ @Generated - public Long getXMsTagCount() { - return this.xMsTagCount; + public Long getTagCount() { + return this.tagCount; } /** - * Set the xMsTagCount property: The x-ms-tag-count property. - * - * @param xMsTagCount the xMsTagCount value to set. + * Set the tagCount property. + * + * @param tagCount the tagCount value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsTagCount(Long xMsTagCount) { - this.xMsTagCount = xMsTagCount; + public BlobsDownloadHeaders setTagCount(Long tagCount) { + this.tagCount = tagCount; return this; } /** - * Get the xMsBlobSealed property: The x-ms-blob-sealed property. - * - * @return the xMsBlobSealed value. + * Get the isSealed property: The x-ms-blob-sealed property. + * + * @return the isSealed value. */ @Generated - public Boolean isXMsBlobSealed() { - return this.xMsBlobSealed; + public Boolean isSealed() { + return this.isSealed; } /** - * Set the xMsBlobSealed property: The x-ms-blob-sealed property. - * - * @param xMsBlobSealed the xMsBlobSealed value to set. + * Set the isSealed property. + * + * @param isSealed the isSealed value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsBlobSealed(Boolean xMsBlobSealed) { - this.xMsBlobSealed = xMsBlobSealed; + public BlobsDownloadHeaders setSealed(Boolean isSealed) { + this.isSealed = isSealed; return this; } /** - * Get the xMsLastAccessTime property: The x-ms-last-access-time property. - * - * @return the xMsLastAccessTime value. + * Get the lastAccessed property: The x-ms-last-access-time property. + * + * @return the lastAccessed value. */ @Generated - public OffsetDateTime getXMsLastAccessTime() { - if (this.xMsLastAccessTime == null) { + public OffsetDateTime getLastAccessed() { + if (this.lastAccessed == null) { return null; } - return this.xMsLastAccessTime.getDateTime(); + return this.lastAccessed.getDateTime(); } /** - * Set the xMsLastAccessTime property: The x-ms-last-access-time property. - * - * @param xMsLastAccessTime the xMsLastAccessTime value to set. + * Set the lastAccessed property. + * + * @param lastAccessed the lastAccessed value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsLastAccessTime(OffsetDateTime xMsLastAccessTime) { - if (xMsLastAccessTime == null) { - this.xMsLastAccessTime = null; - } else { - this.xMsLastAccessTime = new DateTimeRfc1123(xMsLastAccessTime); - } + public BlobsDownloadHeaders setLastAccessed(OffsetDateTime lastAccessed) { + this.lastAccessed = lastAccessed == null ? null : new DateTimeRfc1123(lastAccessed); return this; } /** - * Get the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * - * @return the xMsImmutabilityPolicyUntilDate value. + * Get the immutabilityPolicyExpiresOn property: The x-ms-immutability-policy-until-date property. + * + * @return the immutabilityPolicyExpiresOn value. */ @Generated - public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { - if (this.xMsImmutabilityPolicyUntilDate == null) { + public OffsetDateTime getImmutabilityPolicyExpiresOn() { + if (this.immutabilityPolicyExpiresOn == null) { return null; } - return this.xMsImmutabilityPolicyUntilDate.getDateTime(); + return this.immutabilityPolicyExpiresOn.getDateTime(); } /** - * Set the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * - * @param xMsImmutabilityPolicyUntilDate the xMsImmutabilityPolicyUntilDate value to set. + * Set the immutabilityPolicyExpiresOn property. + * + * @param immutabilityPolicyExpiresOn the immutabilityPolicyExpiresOn value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsImmutabilityPolicyUntilDate(OffsetDateTime xMsImmutabilityPolicyUntilDate) { - if (xMsImmutabilityPolicyUntilDate == null) { - this.xMsImmutabilityPolicyUntilDate = null; - } else { - this.xMsImmutabilityPolicyUntilDate = new DateTimeRfc1123(xMsImmutabilityPolicyUntilDate); - } + public BlobsDownloadHeaders setImmutabilityPolicyExpiresOn(OffsetDateTime immutabilityPolicyExpiresOn) { + this.immutabilityPolicyExpiresOn + = immutabilityPolicyExpiresOn == null ? null : new DateTimeRfc1123(immutabilityPolicyExpiresOn); return this; } /** - * Get the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. - * - * @return the xMsImmutabilityPolicyMode value. + * Get the immutabilityPolicyMode property: The x-ms-immutability-policy-mode property. + * + * @return the immutabilityPolicyMode value. */ @Generated - public String getXMsImmutabilityPolicyMode() { - return this.xMsImmutabilityPolicyMode; + public BlobImmutabilityPolicyMode getImmutabilityPolicyMode() { + return this.immutabilityPolicyMode; } /** - * Set the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. - * - * @param xMsImmutabilityPolicyMode the xMsImmutabilityPolicyMode value to set. + * Set the immutabilityPolicyMode property. + * + * @param immutabilityPolicyMode the immutabilityPolicyMode value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsImmutabilityPolicyMode(String xMsImmutabilityPolicyMode) { - this.xMsImmutabilityPolicyMode = xMsImmutabilityPolicyMode; + public BlobsDownloadHeaders setImmutabilityPolicyMode(BlobImmutabilityPolicyMode immutabilityPolicyMode) { + this.immutabilityPolicyMode = immutabilityPolicyMode; return this; } /** - * Get the xMsLegalHold property: The x-ms-legal-hold property. - * - * @return the xMsLegalHold value. + * Get the legalHold property: The x-ms-legal-hold property. + * + * @return the legalHold value. */ @Generated - public Boolean isXMsLegalHold() { - return this.xMsLegalHold; + public Boolean isLegalHold() { + return this.legalHold; } /** - * Set the xMsLegalHold property: The x-ms-legal-hold property. - * - * @param xMsLegalHold the xMsLegalHold value to set. + * Set the legalHold property. + * + * @param legalHold the legalHold value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsLegalHold(Boolean xMsLegalHold) { - this.xMsLegalHold = xMsLegalHold; + public BlobsDownloadHeaders setLegalHold(Boolean legalHold) { + this.legalHold = legalHold; return this; } /** - * Get the xMsStructuredBody property: The x-ms-structured-body property. - * - * @return the xMsStructuredBody value. + * Get the structuredBodyType property: The x-ms-structured-body property. + * + * @return the structuredBodyType value. */ @Generated - public String getXMsStructuredBody() { - return this.xMsStructuredBody; + public String getStructuredBodyType() { + return this.structuredBodyType; } /** - * Set the xMsStructuredBody property: The x-ms-structured-body property. - * - * @param xMsStructuredBody the xMsStructuredBody value to set. + * Set the structuredBodyType property. + * + * @param structuredBodyType the structuredBodyType value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsStructuredBody(String xMsStructuredBody) { - this.xMsStructuredBody = xMsStructuredBody; + public BlobsDownloadHeaders setStructuredBodyType(String structuredBodyType) { + this.structuredBodyType = structuredBodyType; return this; } /** - * Get the xMsStructuredContentLength property: The x-ms-structured-content-length property. - * - * @return the xMsStructuredContentLength value. + * Get the structuredContentLength property: The x-ms-structured-content-length property. + * + * @return the structuredContentLength value. */ @Generated - public Long getXMsStructuredContentLength() { - return this.xMsStructuredContentLength; + public Long getStructuredContentLength() { + return this.structuredContentLength; } /** - * Set the xMsStructuredContentLength property: The x-ms-structured-content-length property. - * - * @param xMsStructuredContentLength the xMsStructuredContentLength value to set. + * Set the structuredContentLength property. + * + * @param structuredContentLength the structuredContentLength value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsStructuredContentLength(Long xMsStructuredContentLength) { - this.xMsStructuredContentLength = xMsStructuredContentLength; + public BlobsDownloadHeaders setStructuredContentLength(Long structuredContentLength) { + this.structuredContentLength = structuredContentLength; return this; } /** - * Get the xMsAccessTier property: The x-ms-access-tier property. - * - * @return the xMsAccessTier value. + * Get the accessTier property: The x-ms-access-tier property. + * + * @return the accessTier value. */ @Generated - public String getXMsAccessTier() { - return this.xMsAccessTier; + public String getAccessTier() { + return this.accessTier; } /** - * Set the xMsAccessTier property: The x-ms-access-tier property. - * - * @param xMsAccessTier the xMsAccessTier value to set. + * Set the accessTier property. + * + * @param accessTier the accessTier value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsAccessTier(String xMsAccessTier) { - this.xMsAccessTier = xMsAccessTier; + public BlobsDownloadHeaders setAccessTier(String accessTier) { + this.accessTier = accessTier; return this; } /** - * Get the xMsAccessTierInferred property: The x-ms-access-tier-inferred property. - * - * @return the xMsAccessTierInferred value. + * Get the accessTierInferred property: The x-ms-access-tier-inferred property. + * + * @return the accessTierInferred value. */ @Generated - public Boolean isXMsAccessTierInferred() { - return this.xMsAccessTierInferred; + public Boolean isAccessTierInferred() { + return this.accessTierInferred; } /** - * Set the xMsAccessTierInferred property: The x-ms-access-tier-inferred property. - * - * @param xMsAccessTierInferred the xMsAccessTierInferred value to set. + * Set the accessTierInferred property. + * + * @param accessTierInferred the accessTierInferred value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsAccessTierInferred(Boolean xMsAccessTierInferred) { - this.xMsAccessTierInferred = xMsAccessTierInferred; + public BlobsDownloadHeaders setAccessTierInferred(Boolean accessTierInferred) { + this.accessTierInferred = accessTierInferred; return this; } /** - * Get the xMsAccessTierChangeTime property: The x-ms-access-tier-change-time property. - * - * @return the xMsAccessTierChangeTime value. + * Get the accessTierChangeTime property: The x-ms-access-tier-change-time property. + * + * @return the accessTierChangeTime value. */ @Generated - public OffsetDateTime getXMsAccessTierChangeTime() { - if (this.xMsAccessTierChangeTime == null) { + public OffsetDateTime getAccessTierChangeTime() { + if (this.accessTierChangeTime == null) { return null; } - return this.xMsAccessTierChangeTime.getDateTime(); + return this.accessTierChangeTime.getDateTime(); } /** - * Set the xMsAccessTierChangeTime property: The x-ms-access-tier-change-time property. - * - * @param xMsAccessTierChangeTime the xMsAccessTierChangeTime value to set. + * Set the accessTierChangeTime property. + * + * @param accessTierChangeTime the accessTierChangeTime value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsAccessTierChangeTime(OffsetDateTime xMsAccessTierChangeTime) { - if (xMsAccessTierChangeTime == null) { - this.xMsAccessTierChangeTime = null; - } else { - this.xMsAccessTierChangeTime = new DateTimeRfc1123(xMsAccessTierChangeTime); - } + public BlobsDownloadHeaders setAccessTierChangeTime(OffsetDateTime accessTierChangeTime) { + this.accessTierChangeTime = accessTierChangeTime == null ? null : new DateTimeRfc1123(accessTierChangeTime); return this; } /** - * Get the xMsSmartAccessTier property: The x-ms-smart-access-tier property. - * - * @return the xMsSmartAccessTier value. + * Get the smartAccessTier property: The x-ms-smart-access-tier property. + * + * @return the smartAccessTier value. */ @Generated - public String getXMsSmartAccessTier() { - return this.xMsSmartAccessTier; + public String getSmartAccessTier() { + return this.smartAccessTier; } /** - * Set the xMsSmartAccessTier property: The x-ms-smart-access-tier property. - * - * @param xMsSmartAccessTier the xMsSmartAccessTier value to set. + * Set the smartAccessTier property. + * + * @param smartAccessTier the smartAccessTier value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsSmartAccessTier(String xMsSmartAccessTier) { - this.xMsSmartAccessTier = xMsSmartAccessTier; + public BlobsDownloadHeaders setSmartAccessTier(String smartAccessTier) { + this.smartAccessTier = smartAccessTier; return this; } /** - * Get the xMsDownloadHint property: The x-ms-download-hint property. - * - * @return the xMsDownloadHint value. + * Get the downloadHint property: The x-ms-download-hint property. + * + * @return the downloadHint value. */ @Generated - public DownloadHint getXMsDownloadHint() { - return this.xMsDownloadHint; + public DownloadHint getDownloadHint() { + return this.downloadHint; } /** - * Set the xMsDownloadHint property: The x-ms-download-hint property. - * - * @param xMsDownloadHint the xMsDownloadHint value to set. + * Set the downloadHint property. + * + * @param downloadHint the downloadHint value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsDownloadHint(DownloadHint xMsDownloadHint) { - this.xMsDownloadHint = xMsDownloadHint; + public BlobsDownloadHeaders setDownloadHint(DownloadHint downloadHint) { + this.downloadHint = downloadHint; return this; } /** - * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @return the xMsContentCrc64 value. + * Get the version property: The x-ms-version property. + * + * @return the version value. */ @Generated - public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); + public String getVersion() { + return this.version; } /** - * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @param xMsContentCrc64 the xMsContentCrc64 value to set. + * Set the version property. + * + * @param version the version value to set. * @return the BlobsDownloadHeaders object itself. */ @Generated - public BlobsDownloadHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); + public BlobsDownloadHeaders setVersion(String version) { + this.version = version; return this; } } 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 deleted file mode 100644 index 1b3ee4ac2468b..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccessControlHeaders.java +++ /dev/null @@ -1,252 +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.azure.core.util.DateTimeRfc1123; -import java.time.OffsetDateTime; - -/** The BlobsGetAccessControlHeaders model. */ -@Fluent -public final class BlobsGetAccessControlHeaders { - /* - * The x-ms-group property. - */ - private String xMsGroup; - - /* - * The x-ms-version property. - */ - private String xMsVersion; - - /* - * The ETag property. - */ - private String eTag; - - /* - * The x-ms-acl property. - */ - private String xMsAcl; - - /* - * The Last-Modified property. - */ - private DateTimeRfc1123 lastModified; - - /* - * The x-ms-permissions property. - */ - private String xMsPermissions; - - /* - * The x-ms-request-id property. - */ - private String xMsRequestId; - - /* - * The Date property. - */ - private DateTimeRfc1123 dateProperty; - - /* - * The x-ms-owner property. - */ - private String xMsOwner; - - /** - * Get the xMsGroup property: The x-ms-group property. - * - * @return the xMsGroup value. - */ - public String getXMsGroup() { - return this.xMsGroup; - } - - /** - * Set the xMsGroup property: The x-ms-group property. - * - * @param xMsGroup the xMsGroup value to set. - * @return the BlobsGetAccessControlHeaders object itself. - */ - public BlobsGetAccessControlHeaders setXMsGroup(String xMsGroup) { - this.xMsGroup = xMsGroup; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsGetAccessControlHeaders object itself. - */ - public BlobsGetAccessControlHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the eTag property: The ETag property. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the BlobsGetAccessControlHeaders object itself. - */ - public BlobsGetAccessControlHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the xMsAcl property: The x-ms-acl property. - * - * @return the xMsAcl value. - */ - public String getXMsAcl() { - return this.xMsAcl; - } - - /** - * Set the xMsAcl property: The x-ms-acl property. - * - * @param xMsAcl the xMsAcl value to set. - * @return the BlobsGetAccessControlHeaders object itself. - */ - public BlobsGetAccessControlHeaders setXMsAcl(String xMsAcl) { - this.xMsAcl = xMsAcl; - return this; - } - - /** - * Get the lastModified property: The Last-Modified property. - * - * @return the lastModified value. - */ - public OffsetDateTime getLastModified() { - if (this.lastModified == null) { - return null; - } - return this.lastModified.getDateTime(); - } - - /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the BlobsGetAccessControlHeaders object itself. - */ - public BlobsGetAccessControlHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsPermissions property: The x-ms-permissions property. - * - * @return the xMsPermissions value. - */ - public String getXMsPermissions() { - return this.xMsPermissions; - } - - /** - * Set the xMsPermissions property: The x-ms-permissions property. - * - * @param xMsPermissions the xMsPermissions value to set. - * @return the BlobsGetAccessControlHeaders object itself. - */ - public BlobsGetAccessControlHeaders setXMsPermissions(String xMsPermissions) { - this.xMsPermissions = xMsPermissions; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsGetAccessControlHeaders object itself. - */ - public BlobsGetAccessControlHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the dateProperty property: The Date property. - * - * @return the dateProperty value. - */ - public OffsetDateTime getDateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); - } - - /** - * Set the dateProperty property: The Date property. - * - * @param dateProperty the dateProperty value to set. - * @return the BlobsGetAccessControlHeaders object itself. - */ - public BlobsGetAccessControlHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } - - /** - * Get the xMsOwner property: The x-ms-owner property. - * - * @return the xMsOwner value. - */ - public String getXMsOwner() { - return this.xMsOwner; - } - - /** - * Set the xMsOwner property: The x-ms-owner property. - * - * @param xMsOwner the xMsOwner value to set. - * @return the BlobsGetAccessControlHeaders object itself. - */ - public BlobsGetAccessControlHeaders setXMsOwner(String xMsOwner) { - this.xMsOwner = xMsOwner; - return this; - } -} 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 2405310c02567..b5779e78dee38 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -16,58 +16,58 @@ /** * The BlobsGetAccountInfoHeaders model. */ -@Fluent +@Immutable public final class BlobsGetAccountInfoHeaders { /* - * The x-ms-client-request-id property. + * The x-ms-account-kind property. */ @Generated - private String xMsClientRequestId; + private final AccountKind accountKind; /* - * The x-ms-request-id property. + * The x-ms-sku-name property. */ @Generated - private String xMsRequestId; + private final SkuName skuName; /* - * The x-ms-version property. + * The x-ms-is-hns-enabled property. */ @Generated - private String xMsVersion; + private final Boolean isHierarchicalNamespaceEnabled; /* * The Date property. */ @Generated - private DateTimeRfc1123 date; + private final DateTimeRfc1123 date; /* - * The x-ms-sku-name property. + * The x-ms-version property. */ @Generated - private SkuName xMsSkuName; + private final String version; /* - * The x-ms-account-kind property. + * The x-ms-request-id property. */ @Generated - private AccountKind xMsAccountKind; + private final String requestId; /* - * The x-ms-is-hns-enabled property. + * The x-ms-client-request-id property. */ @Generated - private Boolean xMsIsHnsEnabled; + private final String clientRequestId; - 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_SKU_NAME = HttpHeaderName.fromString("x-ms-sku-name"); - 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_VERSION = HttpHeaderName.fromString("x-ms-version"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsGetAccountInfoHeaders class. @@ -75,99 +75,63 @@ public final class BlobsGetAccountInfoHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsGetAccountInfoHeaders(HttpHeaders rawHeaders) { - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - String date = rawHeaders.getValue(HttpHeaderName.DATE); - if (date != null) { - this.date = new DateTimeRfc1123(date); + String accountKind = rawHeaders.getValue(X_MS_ACCOUNT_KIND); + if (accountKind != null) { + this.accountKind = AccountKind.fromString(accountKind); } else { - this.date = null; + this.accountKind = null; } - String xMsSkuName = rawHeaders.getValue(X_MS_SKU_NAME); - if (xMsSkuName != null) { - this.xMsSkuName = SkuName.fromString(xMsSkuName); + String skuName = rawHeaders.getValue(X_MS_SKU_NAME); + if (skuName != null) { + this.skuName = SkuName.fromString(skuName); } else { - this.xMsSkuName = null; + this.skuName = null; } - String xMsAccountKind = rawHeaders.getValue(X_MS_ACCOUNT_KIND); - if (xMsAccountKind != null) { - this.xMsAccountKind = AccountKind.fromString(xMsAccountKind); + String isHierarchicalNamespaceEnabled = rawHeaders.getValue(X_MS_IS_HNS_ENABLED); + if (isHierarchicalNamespaceEnabled != null) { + this.isHierarchicalNamespaceEnabled = Boolean.parseBoolean(isHierarchicalNamespaceEnabled); } else { - this.xMsAccountKind = null; + this.isHierarchicalNamespaceEnabled = null; } - String xMsIsHnsEnabled = rawHeaders.getValue(X_MS_IS_HNS_ENABLED); - if (xMsIsHnsEnabled != null) { - this.xMsIsHnsEnabled = Boolean.parseBoolean(xMsIsHnsEnabled); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); } else { - this.xMsIsHnsEnabled = null; + this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsGetAccountInfoHeaders object itself. - */ - @Generated - public BlobsGetAccountInfoHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. + * Get the accountKind property: The x-ms-account-kind property. * - * @return the xMsRequestId value. + * @return the accountKind value. */ @Generated - public String getXMsRequestId() { - return this.xMsRequestId; + public AccountKind getAccountKind() { + return this.accountKind; } /** - * Set the xMsRequestId property: The x-ms-request-id property. + * Get the skuName property: The x-ms-sku-name property. * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsGetAccountInfoHeaders object itself. + * @return the skuName value. */ @Generated - public BlobsGetAccountInfoHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; + public SkuName getSkuName() { + return this.skuName; } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the isHierarchicalNamespaceEnabled property: The x-ms-is-hns-enabled property. * - * @return the xMsVersion value. + * @return the isHierarchicalNamespaceEnabled value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsGetAccountInfoHeaders object itself. - */ - @Generated - public BlobsGetAccountInfoHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public Boolean isHierarchicalNamespaceEnabled() { + return this.isHierarchicalNamespaceEnabled; } /** @@ -184,84 +148,32 @@ public OffsetDateTime getDate() { } /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the BlobsGetAccountInfoHeaders object itself. - */ - @Generated - public BlobsGetAccountInfoHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsSkuName property: The x-ms-sku-name property. - * - * @return the xMsSkuName value. - */ - @Generated - public SkuName getXMsSkuName() { - return this.xMsSkuName; - } - - /** - * Set the xMsSkuName property: The x-ms-sku-name property. - * - * @param xMsSkuName the xMsSkuName value to set. - * @return the BlobsGetAccountInfoHeaders object itself. - */ - @Generated - public BlobsGetAccountInfoHeaders setXMsSkuName(SkuName xMsSkuName) { - this.xMsSkuName = xMsSkuName; - return this; - } - - /** - * Get the xMsAccountKind property: The x-ms-account-kind property. - * - * @return the xMsAccountKind value. - */ - @Generated - public AccountKind getXMsAccountKind() { - return this.xMsAccountKind; - } - - /** - * Set the xMsAccountKind property: The x-ms-account-kind property. + * Get the version property: The x-ms-version property. * - * @param xMsAccountKind the xMsAccountKind value to set. - * @return the BlobsGetAccountInfoHeaders object itself. + * @return the version value. */ @Generated - public BlobsGetAccountInfoHeaders setXMsAccountKind(AccountKind xMsAccountKind) { - this.xMsAccountKind = xMsAccountKind; - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsIsHnsEnabled value. + * @return the requestId value. */ @Generated - public Boolean isXMsIsHnsEnabled() { - return this.xMsIsHnsEnabled; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsIsHnsEnabled the xMsIsHnsEnabled value to set. - * @return the BlobsGetAccountInfoHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlobsGetAccountInfoHeaders setXMsIsHnsEnabled(Boolean xMsIsHnsEnabled) { - this.xMsIsHnsEnabled = xMsIsHnsEnabled; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetLayoutHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetLayoutHeaders.java index 4a9a3a2637f5f..be587dbbcbdc2 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetLayoutHeaders.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetLayoutHeaders.java @@ -1,360 +1,357 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; +import com.azure.storage.blob.models.ArchiveStatus; import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; import com.azure.storage.blob.models.BlobType; import com.azure.storage.blob.models.CopyStatusType; import com.azure.storage.blob.models.LeaseDurationType; import com.azure.storage.blob.models.LeaseStateType; import com.azure.storage.blob.models.LeaseStatusType; +import com.azure.storage.blob.models.RehydratePriority; import java.time.OffsetDateTime; import java.util.Base64; import java.util.LinkedHashMap; +import java.util.Locale; import java.util.Map; /** * The BlobsGetLayoutHeaders model. */ -@Fluent +@Immutable public final class BlobsGetLayoutHeaders { /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* * The x-ms-blob-content-length property. */ @Generated - private Long xMsBlobContentLength; + private final Long blobContentLength; /* * The x-ms-blob-content-type property. */ @Generated - private String xMsBlobContentType; + private final String blobContentType; /* * The x-ms-blob-content-encoding property. */ @Generated - private String xMsBlobContentEncoding; + private final String blobContentEncoding; /* * The x-ms-blob-content-md5 property. */ @Generated - private byte[] xMsBlobContentMd5; + private final byte[] blobContentMd5; /* * The x-ms-blob-creation-time property. */ @Generated - private DateTimeRfc1123 xMsBlobCreationTime; + private final DateTimeRfc1123 blobCreationTime; /* * The x-ms-creation-time property. */ @Generated - private DateTimeRfc1123 xMsCreationTime; + private final DateTimeRfc1123 creationTime; /* * The x-ms-meta- property. */ @Generated - private Map xMsMeta; + private final Map metadata; /* * The x-ms-or-policy-id property. */ @Generated - private String xMsOrPolicyId; + private final String objectReplicationPolicyId; /* * The x-ms-or- property. */ @Generated - private Map xMsOr; + private final Map objectReplicationRules; /* * The x-ms-blob-type property. */ @Generated - private BlobType xMsBlobType; + private final BlobType blobType; /* * The x-ms-copy-completion-time property. */ @Generated - private DateTimeRfc1123 xMsCopyCompletionTime; + private final DateTimeRfc1123 copyCompletionTime; /* * The x-ms-copy-status-description property. */ @Generated - private String xMsCopyStatusDescription; + private final String copyStatusDescription; /* * The x-ms-copy-id property. */ @Generated - private String xMsCopyId; + private final String copyId; /* * The x-ms-copy-progress property. */ @Generated - private String xMsCopyProgress; + private final String copyProgress; /* * The x-ms-copy-source property. */ @Generated - private String xMsCopySource; + private final String copySource; /* * The x-ms-copy-status property. */ @Generated - private CopyStatusType xMsCopyStatus; + private final CopyStatusType copyStatus; /* * The x-ms-incremental-copy property. */ @Generated - private Boolean xMsIncrementalCopy; + private final Boolean isIncrementalCopy; /* * The x-ms-copy-destination-snapshot property. */ @Generated - private String xMsCopyDestinationSnapshot; + private final String destinationSnapshot; /* * The x-ms-lease-duration property. */ @Generated - private LeaseDurationType xMsLeaseDuration; + private final LeaseDurationType duration; /* * The x-ms-lease-state property. */ @Generated - private LeaseStateType xMsLeaseState; + private final LeaseStateType leaseState; /* * The x-ms-lease-status property. */ @Generated - private LeaseStatusType xMsLeaseStatus; + private final LeaseStatusType leaseStatus; /* * The Content-Length property. */ @Generated - private Long contentLength; - - /* - * The Content-Type property. - */ - @Generated - private String contentType; + private final Long contentLength; /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Content-MD5 property. */ @Generated - private byte[] contentMD5; + private final byte[] contentMd5; /* * The Content-Encoding property. */ @Generated - private String contentEncoding; + private final String contentEncoding; /* * The Content-Disposition property. */ @Generated - private String contentDisposition; + private final String contentDisposition; /* * The Content-Language property. */ @Generated - private String contentLanguage; + private final String contentLanguage; /* * The Cache-Control property. */ @Generated - private String cacheControl; + private final String cacheControl; /* * The x-ms-blob-sequence-number property. */ @Generated - private Long xMsBlobSequenceNumber; - - /* - * The x-ms-client-request-id property. - */ - @Generated - private String xMsClientRequestId; - - /* - * The x-ms-request-id property. - */ - @Generated - private String xMsRequestId; - - /* - * The x-ms-version property. - */ - @Generated - private String xMsVersion; - - /* - * The Date property. - */ - @Generated - private DateTimeRfc1123 date; + private final Long blobSequenceNumber; /* * The Accept-Ranges property. */ @Generated - private String acceptRanges; + private final String acceptRanges; /* * The x-ms-blob-committed-block-count property. */ @Generated - private Integer xMsBlobCommittedBlockCount; + private final Integer blobCommittedBlockCount; /* * The x-ms-server-encrypted property. */ @Generated - private Boolean xMsServerEncrypted; + private final Boolean isServerEncrypted; /* * The x-ms-encryption-key-sha256 property. */ @Generated - private String xMsEncryptionKeySha256; + private final String encryptionKeySha256; /* * The x-ms-encryption-scope property. */ @Generated - private String xMsEncryptionScope; + private final String encryptionScope; /* * The x-ms-access-tier property. */ @Generated - private String xMsAccessTier; + private final String accessTier; /* * The x-ms-access-tier-inferred property. */ @Generated - private Boolean xMsAccessTierInferred; + private final Boolean accessTierInferred; /* * The x-ms-smart-access-tier property. */ @Generated - private String xMsSmartAccessTier; + private final String smartAccessTier; /* * The x-ms-archive-status property. */ @Generated - private String xMsArchiveStatus; + private final ArchiveStatus archiveStatus; /* * The x-ms-access-tier-change-time property. */ @Generated - private DateTimeRfc1123 xMsAccessTierChangeTime; + private final DateTimeRfc1123 accessTierChangeTime; /* * The x-ms-version-id property. */ @Generated - private String xMsVersionId; + private final String versionId; /* * The x-ms-is-current-version property. */ @Generated - private Boolean xMsIsCurrentVersion; + private final Boolean isCurrentVersion; /* * The x-ms-tag-count property. */ @Generated - private Long xMsTagCount; + private final Long tagCount; /* * The x-ms-expiry-time property. */ @Generated - private DateTimeRfc1123 xMsExpiryTime; + private final DateTimeRfc1123 expiresOn; /* * The x-ms-blob-sealed property. */ @Generated - private Boolean xMsBlobSealed; + private final Boolean isSealed; /* * The x-ms-rehydrate-priority property. */ @Generated - private String xMsRehydratePriority; + private final RehydratePriority rehydratePriority; /* * The x-ms-last-access-time property. */ @Generated - private DateTimeRfc1123 xMsLastAccessTime; + private final DateTimeRfc1123 lastAccessed; /* * The x-ms-immutability-policy-until-date property. */ @Generated - private DateTimeRfc1123 xMsImmutabilityPolicyUntilDate; + private final DateTimeRfc1123 immutabilityPolicyExpiresOn; /* * The x-ms-immutability-policy-mode property. */ @Generated - private BlobImmutabilityPolicyMode xMsImmutabilityPolicyMode; + private final BlobImmutabilityPolicyMode immutabilityPolicyMode; /* * The x-ms-legal-hold property. */ @Generated - private Boolean xMsLegalHold; + private final Boolean legalHold; + + /* + * The x-ms-client-request-id property. + */ + @Generated + private final String clientRequestId; + + /* + * The x-ms-request-id property. + */ + @Generated + private final String requestId; + + /* + * The x-ms-version property. + */ + @Generated + private final String version; + + /* + * The Date property. + */ + @Generated + private final DateTimeRfc1123 date; private static final HttpHeaderName X_MS_BLOB_CONTENT_LENGTH = HttpHeaderName.fromString("x-ms-blob-content-length"); @@ -402,8 +399,6 @@ public final class BlobsGetLayoutHeaders { private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER = HttpHeaderName.fromString("x-ms-blob-sequence-number"); - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_BLOB_COMMITTED_BLOCK_COUNT = HttpHeaderName.fromString("x-ms-blob-committed-block-count"); @@ -448,6 +443,8 @@ public final class BlobsGetLayoutHeaders { private static final HttpHeaderName X_MS_LEGAL_HOLD = HttpHeaderName.fromString("x-ms-legal-hold"); + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsGetLayoutHeaders class. @@ -461,79 +458,79 @@ public BlobsGetLayoutHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - String xMsBlobContentLength = rawHeaders.getValue(X_MS_BLOB_CONTENT_LENGTH); - if (xMsBlobContentLength != null) { - this.xMsBlobContentLength = Long.parseLong(xMsBlobContentLength); + String blobContentLength = rawHeaders.getValue(X_MS_BLOB_CONTENT_LENGTH); + if (blobContentLength != null) { + this.blobContentLength = Long.parseLong(blobContentLength); } else { - this.xMsBlobContentLength = null; + this.blobContentLength = null; } - this.xMsBlobContentType = rawHeaders.getValue(X_MS_BLOB_CONTENT_TYPE); - this.xMsBlobContentEncoding = rawHeaders.getValue(X_MS_BLOB_CONTENT_ENCODING); - String xMsBlobContentMd5 = rawHeaders.getValue(X_MS_BLOB_CONTENT_MD5); - if (xMsBlobContentMd5 != null) { - this.xMsBlobContentMd5 = Base64.getDecoder().decode(xMsBlobContentMd5); + this.blobContentType = rawHeaders.getValue(X_MS_BLOB_CONTENT_TYPE); + this.blobContentEncoding = rawHeaders.getValue(X_MS_BLOB_CONTENT_ENCODING); + String blobContentMd5 = rawHeaders.getValue(X_MS_BLOB_CONTENT_MD5); + if (blobContentMd5 != null) { + this.blobContentMd5 = Base64.getDecoder().decode(blobContentMd5); } else { - this.xMsBlobContentMd5 = null; + this.blobContentMd5 = null; } - String xMsBlobCreationTime = rawHeaders.getValue(X_MS_BLOB_CREATION_TIME); - if (xMsBlobCreationTime != null) { - this.xMsBlobCreationTime = new DateTimeRfc1123(xMsBlobCreationTime); + String blobCreationTime = rawHeaders.getValue(X_MS_BLOB_CREATION_TIME); + if (blobCreationTime != null) { + this.blobCreationTime = new DateTimeRfc1123(blobCreationTime); } else { - this.xMsBlobCreationTime = null; + this.blobCreationTime = null; } - String xMsCreationTime = rawHeaders.getValue(X_MS_CREATION_TIME); - if (xMsCreationTime != null) { - this.xMsCreationTime = new DateTimeRfc1123(xMsCreationTime); + String creationTime = rawHeaders.getValue(X_MS_CREATION_TIME); + if (creationTime != null) { + this.creationTime = new DateTimeRfc1123(creationTime); } else { - this.xMsCreationTime = null; + this.creationTime = null; } - this.xMsOrPolicyId = rawHeaders.getValue(X_MS_OR_POLICY_ID); - String xMsBlobType = rawHeaders.getValue(X_MS_BLOB_TYPE); - if (xMsBlobType != null) { - this.xMsBlobType = BlobType.fromString(xMsBlobType); + this.objectReplicationPolicyId = rawHeaders.getValue(X_MS_OR_POLICY_ID); + String blobType = rawHeaders.getValue(X_MS_BLOB_TYPE); + if (blobType != null) { + this.blobType = BlobType.fromString(blobType); } else { - this.xMsBlobType = null; + this.blobType = null; } - String xMsCopyCompletionTime = rawHeaders.getValue(X_MS_COPY_COMPLETION_TIME); - if (xMsCopyCompletionTime != null) { - this.xMsCopyCompletionTime = new DateTimeRfc1123(xMsCopyCompletionTime); + String copyCompletionTime = rawHeaders.getValue(X_MS_COPY_COMPLETION_TIME); + if (copyCompletionTime != null) { + this.copyCompletionTime = new DateTimeRfc1123(copyCompletionTime); } else { - this.xMsCopyCompletionTime = null; + this.copyCompletionTime = null; } - this.xMsCopyStatusDescription = rawHeaders.getValue(X_MS_COPY_STATUS_DESCRIPTION); - this.xMsCopyId = rawHeaders.getValue(X_MS_COPY_ID); - this.xMsCopyProgress = rawHeaders.getValue(X_MS_COPY_PROGRESS); - this.xMsCopySource = rawHeaders.getValue(X_MS_COPY_SOURCE); - String xMsCopyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); - if (xMsCopyStatus != null) { - this.xMsCopyStatus = CopyStatusType.fromString(xMsCopyStatus); + this.copyStatusDescription = rawHeaders.getValue(X_MS_COPY_STATUS_DESCRIPTION); + this.copyId = rawHeaders.getValue(X_MS_COPY_ID); + this.copyProgress = rawHeaders.getValue(X_MS_COPY_PROGRESS); + this.copySource = rawHeaders.getValue(X_MS_COPY_SOURCE); + String copyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); + if (copyStatus != null) { + this.copyStatus = CopyStatusType.fromString(copyStatus); } else { - this.xMsCopyStatus = null; + this.copyStatus = null; } - String xMsIncrementalCopy = rawHeaders.getValue(X_MS_INCREMENTAL_COPY); - if (xMsIncrementalCopy != null) { - this.xMsIncrementalCopy = Boolean.parseBoolean(xMsIncrementalCopy); + String isIncrementalCopy = rawHeaders.getValue(X_MS_INCREMENTAL_COPY); + if (isIncrementalCopy != null) { + this.isIncrementalCopy = Boolean.parseBoolean(isIncrementalCopy); } else { - this.xMsIncrementalCopy = null; + this.isIncrementalCopy = null; } - this.xMsCopyDestinationSnapshot = rawHeaders.getValue(X_MS_COPY_DESTINATION_SNAPSHOT); - String xMsLeaseDuration = rawHeaders.getValue(X_MS_LEASE_DURATION); - if (xMsLeaseDuration != null) { - this.xMsLeaseDuration = LeaseDurationType.fromString(xMsLeaseDuration); + this.destinationSnapshot = rawHeaders.getValue(X_MS_COPY_DESTINATION_SNAPSHOT); + String duration = rawHeaders.getValue(X_MS_LEASE_DURATION); + if (duration != null) { + this.duration = LeaseDurationType.fromString(duration); } else { - this.xMsLeaseDuration = null; + this.duration = null; } - String xMsLeaseState = rawHeaders.getValue(X_MS_LEASE_STATE); - if (xMsLeaseState != null) { - this.xMsLeaseState = LeaseStateType.fromString(xMsLeaseState); + String leaseState = rawHeaders.getValue(X_MS_LEASE_STATE); + if (leaseState != null) { + this.leaseState = LeaseStateType.fromString(leaseState); } else { - this.xMsLeaseState = null; + this.leaseState = null; } - String xMsLeaseStatus = rawHeaders.getValue(X_MS_LEASE_STATUS); - if (xMsLeaseStatus != null) { - this.xMsLeaseStatus = LeaseStatusType.fromString(xMsLeaseStatus); + String leaseStatus = rawHeaders.getValue(X_MS_LEASE_STATUS); + if (leaseStatus != null) { + this.leaseStatus = LeaseStatusType.fromString(leaseStatus); } else { - this.xMsLeaseStatus = null; + this.leaseStatus = null; } String contentLength = rawHeaders.getValue(HttpHeaderName.CONTENT_LENGTH); if (contentLength != null) { @@ -541,128 +538,138 @@ public BlobsGetLayoutHeaders(HttpHeaders rawHeaders) { } else { this.contentLength = null; } - this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); - String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); - if (contentMD5 != null) { - this.contentMD5 = Base64.getDecoder().decode(contentMD5); + String contentMd5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMd5 != null) { + this.contentMd5 = Base64.getDecoder().decode(contentMd5); } else { - this.contentMD5 = null; + this.contentMd5 = null; } this.contentEncoding = rawHeaders.getValue(HttpHeaderName.CONTENT_ENCODING); this.contentDisposition = rawHeaders.getValue(HttpHeaderName.CONTENT_DISPOSITION); this.contentLanguage = rawHeaders.getValue(HttpHeaderName.CONTENT_LANGUAGE); this.cacheControl = rawHeaders.getValue(HttpHeaderName.CACHE_CONTROL); - String xMsBlobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); - if (xMsBlobSequenceNumber != null) { - this.xMsBlobSequenceNumber = Long.parseLong(xMsBlobSequenceNumber); + String blobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); + if (blobSequenceNumber != null) { + this.blobSequenceNumber = Long.parseLong(blobSequenceNumber); } else { - this.xMsBlobSequenceNumber = null; + this.blobSequenceNumber = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - String date = rawHeaders.getValue(HttpHeaderName.DATE); - if (date != null) { - this.date = new DateTimeRfc1123(date); + this.acceptRanges = rawHeaders.getValue(HttpHeaderName.ACCEPT_RANGES); + String blobCommittedBlockCount = rawHeaders.getValue(X_MS_BLOB_COMMITTED_BLOCK_COUNT); + if (blobCommittedBlockCount != null) { + this.blobCommittedBlockCount = Integer.parseInt(blobCommittedBlockCount); } else { - this.date = null; + this.blobCommittedBlockCount = null; } - this.acceptRanges = rawHeaders.getValue(HttpHeaderName.ACCEPT_RANGES); - String xMsBlobCommittedBlockCount = rawHeaders.getValue(X_MS_BLOB_COMMITTED_BLOCK_COUNT); - if (xMsBlobCommittedBlockCount != null) { - this.xMsBlobCommittedBlockCount = Integer.parseInt(xMsBlobCommittedBlockCount); + String isServerEncrypted = rawHeaders.getValue(X_MS_SERVER_ENCRYPTED); + if (isServerEncrypted != null) { + this.isServerEncrypted = Boolean.parseBoolean(isServerEncrypted); } else { - this.xMsBlobCommittedBlockCount = null; + this.isServerEncrypted = null; } - String xMsServerEncrypted = rawHeaders.getValue(X_MS_SERVER_ENCRYPTED); - if (xMsServerEncrypted != null) { - this.xMsServerEncrypted = Boolean.parseBoolean(xMsServerEncrypted); + this.encryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.encryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + this.accessTier = rawHeaders.getValue(X_MS_ACCESS_TIER); + String accessTierInferred = rawHeaders.getValue(X_MS_ACCESS_TIER_INFERRED); + if (accessTierInferred != null) { + this.accessTierInferred = Boolean.parseBoolean(accessTierInferred); } else { - this.xMsServerEncrypted = null; + this.accessTierInferred = null; } - this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); - this.xMsAccessTier = rawHeaders.getValue(X_MS_ACCESS_TIER); - String xMsAccessTierInferred = rawHeaders.getValue(X_MS_ACCESS_TIER_INFERRED); - if (xMsAccessTierInferred != null) { - this.xMsAccessTierInferred = Boolean.parseBoolean(xMsAccessTierInferred); + this.smartAccessTier = rawHeaders.getValue(X_MS_SMART_ACCESS_TIER); + String archiveStatus = rawHeaders.getValue(X_MS_ARCHIVE_STATUS); + if (archiveStatus != null) { + this.archiveStatus = ArchiveStatus.fromString(archiveStatus); } else { - this.xMsAccessTierInferred = null; + this.archiveStatus = null; } - this.xMsSmartAccessTier = rawHeaders.getValue(X_MS_SMART_ACCESS_TIER); - this.xMsArchiveStatus = rawHeaders.getValue(X_MS_ARCHIVE_STATUS); - String xMsAccessTierChangeTime = rawHeaders.getValue(X_MS_ACCESS_TIER_CHANGE_TIME); - if (xMsAccessTierChangeTime != null) { - this.xMsAccessTierChangeTime = new DateTimeRfc1123(xMsAccessTierChangeTime); + String accessTierChangeTime = rawHeaders.getValue(X_MS_ACCESS_TIER_CHANGE_TIME); + if (accessTierChangeTime != null) { + this.accessTierChangeTime = new DateTimeRfc1123(accessTierChangeTime); } else { - this.xMsAccessTierChangeTime = null; + this.accessTierChangeTime = null; } - this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); - String xMsIsCurrentVersion = rawHeaders.getValue(X_MS_IS_CURRENT_VERSION); - if (xMsIsCurrentVersion != null) { - this.xMsIsCurrentVersion = Boolean.parseBoolean(xMsIsCurrentVersion); + this.versionId = rawHeaders.getValue(X_MS_VERSION_ID); + String isCurrentVersion = rawHeaders.getValue(X_MS_IS_CURRENT_VERSION); + if (isCurrentVersion != null) { + this.isCurrentVersion = Boolean.parseBoolean(isCurrentVersion); } else { - this.xMsIsCurrentVersion = null; + this.isCurrentVersion = null; } - String xMsTagCount = rawHeaders.getValue(X_MS_TAG_COUNT); - if (xMsTagCount != null) { - this.xMsTagCount = Long.parseLong(xMsTagCount); + String tagCount = rawHeaders.getValue(X_MS_TAG_COUNT); + if (tagCount != null) { + this.tagCount = Long.parseLong(tagCount); } else { - this.xMsTagCount = null; + this.tagCount = null; } - String xMsExpiryTime = rawHeaders.getValue(X_MS_EXPIRY_TIME); - if (xMsExpiryTime != null) { - this.xMsExpiryTime = new DateTimeRfc1123(xMsExpiryTime); + String expiresOn = rawHeaders.getValue(X_MS_EXPIRY_TIME); + if (expiresOn != null) { + this.expiresOn = new DateTimeRfc1123(expiresOn); } else { - this.xMsExpiryTime = null; + this.expiresOn = null; } - String xMsBlobSealed = rawHeaders.getValue(X_MS_BLOB_SEALED); - if (xMsBlobSealed != null) { - this.xMsBlobSealed = Boolean.parseBoolean(xMsBlobSealed); + String isSealed = rawHeaders.getValue(X_MS_BLOB_SEALED); + if (isSealed != null) { + this.isSealed = Boolean.parseBoolean(isSealed); } else { - this.xMsBlobSealed = null; + this.isSealed = null; } - this.xMsRehydratePriority = rawHeaders.getValue(X_MS_REHYDRATE_PRIORITY); - String xMsLastAccessTime = rawHeaders.getValue(X_MS_LAST_ACCESS_TIME); - if (xMsLastAccessTime != null) { - this.xMsLastAccessTime = new DateTimeRfc1123(xMsLastAccessTime); + String rehydratePriority = rawHeaders.getValue(X_MS_REHYDRATE_PRIORITY); + if (rehydratePriority != null) { + this.rehydratePriority = RehydratePriority.fromString(rehydratePriority); } else { - this.xMsLastAccessTime = null; + this.rehydratePriority = null; } - String xMsImmutabilityPolicyUntilDate = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_UNTIL_DATE); - if (xMsImmutabilityPolicyUntilDate != null) { - this.xMsImmutabilityPolicyUntilDate = new DateTimeRfc1123(xMsImmutabilityPolicyUntilDate); + String lastAccessed = rawHeaders.getValue(X_MS_LAST_ACCESS_TIME); + if (lastAccessed != null) { + this.lastAccessed = new DateTimeRfc1123(lastAccessed); } else { - this.xMsImmutabilityPolicyUntilDate = null; + this.lastAccessed = null; } - String xMsImmutabilityPolicyMode = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_MODE); - if (xMsImmutabilityPolicyMode != null) { - this.xMsImmutabilityPolicyMode = BlobImmutabilityPolicyMode.fromString(xMsImmutabilityPolicyMode); + String immutabilityPolicyExpiresOn = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_UNTIL_DATE); + if (immutabilityPolicyExpiresOn != null) { + this.immutabilityPolicyExpiresOn = new DateTimeRfc1123(immutabilityPolicyExpiresOn); } else { - this.xMsImmutabilityPolicyMode = null; + this.immutabilityPolicyExpiresOn = null; } - String xMsLegalHold = rawHeaders.getValue(X_MS_LEGAL_HOLD); - if (xMsLegalHold != null) { - this.xMsLegalHold = Boolean.parseBoolean(xMsLegalHold); + String immutabilityPolicyMode = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_MODE); + if (immutabilityPolicyMode != null) { + this.immutabilityPolicyMode = BlobImmutabilityPolicyMode.fromString(immutabilityPolicyMode); } else { - this.xMsLegalHold = null; + this.immutabilityPolicyMode = null; } - Map xMsMetaHeaderCollection = new LinkedHashMap<>(); - Map xMsOrHeaderCollection = new LinkedHashMap<>(); + String legalHold = rawHeaders.getValue(X_MS_LEGAL_HOLD); + if (legalHold != null) { + this.legalHold = Boolean.parseBoolean(legalHold); + } else { + this.legalHold = null; + } + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.version = rawHeaders.getValue(X_MS_VERSION); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } else { + this.date = null; + } + Map metadataHeaderCollection = new LinkedHashMap<>(); + Map objectReplicationRulesHeaderCollection = new LinkedHashMap<>(); rawHeaders.stream().forEach(header -> { String headerName = header.getName(); - if (headerName.startsWith("x-ms-meta-")) { - xMsMetaHeaderCollection.put(headerName.substring(10), header.getValue()); + String headerNameLowerCase = headerName.toLowerCase(Locale.ROOT); + if (headerNameLowerCase.startsWith("x-ms-meta-")) { + metadataHeaderCollection.put(headerName.substring(10), header.getValue()); return; } - if (headerName.startsWith("x-ms-or-")) { - xMsOrHeaderCollection.put(headerName.substring(8), header.getValue()); + if (headerNameLowerCase.startsWith("x-ms-or-")) { + objectReplicationRulesHeaderCollection.put(headerName.substring(8), header.getValue()); } }); - this.xMsMeta = xMsMetaHeaderCollection; - this.xMsOr = xMsOrHeaderCollection; + this.metadata = metadataHeaderCollection; + this.objectReplicationRules = objectReplicationRulesHeaderCollection; } /** @@ -679,502 +686,222 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsBlobContentLength property: The x-ms-blob-content-length property. - * - * @return the xMsBlobContentLength value. - */ - @Generated - public Long getXMsBlobContentLength() { - return this.xMsBlobContentLength; - } - - /** - * Set the xMsBlobContentLength property: The x-ms-blob-content-length property. - * - * @param xMsBlobContentLength the xMsBlobContentLength value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsBlobContentLength(Long xMsBlobContentLength) { - this.xMsBlobContentLength = xMsBlobContentLength; - return this; - } - - /** - * Get the xMsBlobContentType property: The x-ms-blob-content-type property. - * - * @return the xMsBlobContentType value. - */ - @Generated - public String getXMsBlobContentType() { - return this.xMsBlobContentType; - } - - /** - * Set the xMsBlobContentType property: The x-ms-blob-content-type property. - * - * @param xMsBlobContentType the xMsBlobContentType value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsBlobContentType(String xMsBlobContentType) { - this.xMsBlobContentType = xMsBlobContentType; - return this; - } - - /** - * Get the xMsBlobContentEncoding property: The x-ms-blob-content-encoding property. + * Get the blobContentLength property: The x-ms-blob-content-length property. * - * @return the xMsBlobContentEncoding value. + * @return the blobContentLength value. */ @Generated - public String getXMsBlobContentEncoding() { - return this.xMsBlobContentEncoding; + public Long getBlobContentLength() { + return this.blobContentLength; } /** - * Set the xMsBlobContentEncoding property: The x-ms-blob-content-encoding property. + * Get the blobContentType property: The x-ms-blob-content-type property. * - * @param xMsBlobContentEncoding the xMsBlobContentEncoding value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the blobContentType value. */ @Generated - public BlobsGetLayoutHeaders setXMsBlobContentEncoding(String xMsBlobContentEncoding) { - this.xMsBlobContentEncoding = xMsBlobContentEncoding; - return this; + public String getBlobContentType() { + return this.blobContentType; } /** - * Get the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. + * Get the blobContentEncoding property: The x-ms-blob-content-encoding property. * - * @return the xMsBlobContentMd5 value. + * @return the blobContentEncoding value. */ @Generated - public byte[] getXMsBlobContentMd5() { - return CoreUtils.clone(this.xMsBlobContentMd5); + public String getBlobContentEncoding() { + return this.blobContentEncoding; } /** - * Set the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. + * Get the blobContentMd5 property: The x-ms-blob-content-md5 property. * - * @param xMsBlobContentMd5 the xMsBlobContentMd5 value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the blobContentMd5 value. */ @Generated - public BlobsGetLayoutHeaders setXMsBlobContentMd5(byte[] xMsBlobContentMd5) { - this.xMsBlobContentMd5 = CoreUtils.clone(xMsBlobContentMd5); - return this; + public byte[] getBlobContentMd5() { + return CoreUtils.clone(this.blobContentMd5); } /** - * Get the xMsBlobCreationTime property: The x-ms-blob-creation-time property. + * Get the blobCreationTime property: The x-ms-blob-creation-time property. * - * @return the xMsBlobCreationTime value. + * @return the blobCreationTime value. */ @Generated - public OffsetDateTime getXMsBlobCreationTime() { - if (this.xMsBlobCreationTime == null) { + public OffsetDateTime getBlobCreationTime() { + if (this.blobCreationTime == null) { return null; } - return this.xMsBlobCreationTime.getDateTime(); + return this.blobCreationTime.getDateTime(); } /** - * Set the xMsBlobCreationTime property: The x-ms-blob-creation-time property. + * Get the creationTime property: The x-ms-creation-time property. * - * @param xMsBlobCreationTime the xMsBlobCreationTime value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the creationTime value. */ @Generated - public BlobsGetLayoutHeaders setXMsBlobCreationTime(OffsetDateTime xMsBlobCreationTime) { - if (xMsBlobCreationTime == null) { - this.xMsBlobCreationTime = null; - } else { - this.xMsBlobCreationTime = new DateTimeRfc1123(xMsBlobCreationTime); - } - return this; - } - - /** - * Get the xMsCreationTime property: The x-ms-creation-time property. - * - * @return the xMsCreationTime value. - */ - @Generated - public OffsetDateTime getXMsCreationTime() { - if (this.xMsCreationTime == null) { + public OffsetDateTime getCreationTime() { + if (this.creationTime == null) { return null; } - return this.xMsCreationTime.getDateTime(); - } - - /** - * Set the xMsCreationTime property: The x-ms-creation-time property. - * - * @param xMsCreationTime the xMsCreationTime value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsCreationTime(OffsetDateTime xMsCreationTime) { - if (xMsCreationTime == null) { - this.xMsCreationTime = null; - } else { - this.xMsCreationTime = new DateTimeRfc1123(xMsCreationTime); - } - return this; - } - - /** - * Get the xMsMeta property: The x-ms-meta- property. - * - * @return the xMsMeta value. - */ - @Generated - public Map getXMsMeta() { - return this.xMsMeta; - } - - /** - * Set the xMsMeta property: The x-ms-meta- property. - * - * @param xMsMeta the xMsMeta value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsMeta(Map xMsMeta) { - this.xMsMeta = xMsMeta; - return this; - } - - /** - * Get the xMsOrPolicyId property: The x-ms-or-policy-id property. - * - * @return the xMsOrPolicyId value. - */ - @Generated - public String getXMsOrPolicyId() { - return this.xMsOrPolicyId; + return this.creationTime.getDateTime(); } /** - * Set the xMsOrPolicyId property: The x-ms-or-policy-id property. + * Get the metadata property: The x-ms-meta- property. * - * @param xMsOrPolicyId the xMsOrPolicyId value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the metadata value. */ @Generated - public BlobsGetLayoutHeaders setXMsOrPolicyId(String xMsOrPolicyId) { - this.xMsOrPolicyId = xMsOrPolicyId; - return this; + public Map getMetadata() { + return this.metadata; } /** - * Get the xMsOr property: The x-ms-or- property. + * Get the objectReplicationPolicyId property: The x-ms-or-policy-id property. * - * @return the xMsOr value. + * @return the objectReplicationPolicyId value. */ @Generated - public Map getXMsOr() { - return this.xMsOr; + public String getObjectReplicationPolicyId() { + return this.objectReplicationPolicyId; } /** - * Set the xMsOr property: The x-ms-or- property. + * Get the objectReplicationRules property: The x-ms-or- property. * - * @param xMsOr the xMsOr value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the objectReplicationRules value. */ @Generated - public BlobsGetLayoutHeaders setXMsOr(Map xMsOr) { - this.xMsOr = xMsOr; - return this; + public Map getObjectReplicationRules() { + return this.objectReplicationRules; } /** - * Get the xMsBlobType property: The x-ms-blob-type property. + * Get the blobType property: The x-ms-blob-type property. * - * @return the xMsBlobType value. + * @return the blobType value. */ @Generated - public BlobType getXMsBlobType() { - return this.xMsBlobType; + public BlobType getBlobType() { + return this.blobType; } /** - * Set the xMsBlobType property: The x-ms-blob-type property. + * Get the copyCompletionTime property: The x-ms-copy-completion-time property. * - * @param xMsBlobType the xMsBlobType value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the copyCompletionTime value. */ @Generated - public BlobsGetLayoutHeaders setXMsBlobType(BlobType xMsBlobType) { - this.xMsBlobType = xMsBlobType; - return this; - } - - /** - * Get the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * - * @return the xMsCopyCompletionTime value. - */ - @Generated - public OffsetDateTime getXMsCopyCompletionTime() { - if (this.xMsCopyCompletionTime == null) { + public OffsetDateTime getCopyCompletionTime() { + if (this.copyCompletionTime == null) { return null; } - return this.xMsCopyCompletionTime.getDateTime(); + return this.copyCompletionTime.getDateTime(); } /** - * Set the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. + * Get the copyStatusDescription property: The x-ms-copy-status-description property. * - * @param xMsCopyCompletionTime the xMsCopyCompletionTime value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the copyStatusDescription value. */ @Generated - public BlobsGetLayoutHeaders setXMsCopyCompletionTime(OffsetDateTime xMsCopyCompletionTime) { - if (xMsCopyCompletionTime == null) { - this.xMsCopyCompletionTime = null; - } else { - this.xMsCopyCompletionTime = new DateTimeRfc1123(xMsCopyCompletionTime); - } - return this; - } - - /** - * Get the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * - * @return the xMsCopyStatusDescription value. - */ - @Generated - public String getXMsCopyStatusDescription() { - return this.xMsCopyStatusDescription; + public String getCopyStatusDescription() { + return this.copyStatusDescription; } /** - * Set the xMsCopyStatusDescription property: The x-ms-copy-status-description property. + * Get the copyId property: The x-ms-copy-id property. * - * @param xMsCopyStatusDescription the xMsCopyStatusDescription value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the copyId value. */ @Generated - public BlobsGetLayoutHeaders setXMsCopyStatusDescription(String xMsCopyStatusDescription) { - this.xMsCopyStatusDescription = xMsCopyStatusDescription; - return this; + public String getCopyId() { + return this.copyId; } /** - * Get the xMsCopyId property: The x-ms-copy-id property. + * Get the copyProgress property: The x-ms-copy-progress property. * - * @return the xMsCopyId value. + * @return the copyProgress value. */ @Generated - public String getXMsCopyId() { - return this.xMsCopyId; + public String getCopyProgress() { + return this.copyProgress; } /** - * Set the xMsCopyId property: The x-ms-copy-id property. + * Get the copySource property: The x-ms-copy-source property. * - * @param xMsCopyId the xMsCopyId value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the copySource value. */ @Generated - public BlobsGetLayoutHeaders setXMsCopyId(String xMsCopyId) { - this.xMsCopyId = xMsCopyId; - return this; + public String getCopySource() { + return this.copySource; } /** - * Get the xMsCopyProgress property: The x-ms-copy-progress property. + * Get the copyStatus property: The x-ms-copy-status property. * - * @return the xMsCopyProgress value. + * @return the copyStatus value. */ @Generated - public String getXMsCopyProgress() { - return this.xMsCopyProgress; + public CopyStatusType getCopyStatus() { + return this.copyStatus; } /** - * Set the xMsCopyProgress property: The x-ms-copy-progress property. + * Get the isIncrementalCopy property: The x-ms-incremental-copy property. * - * @param xMsCopyProgress the xMsCopyProgress value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the isIncrementalCopy value. */ @Generated - public BlobsGetLayoutHeaders setXMsCopyProgress(String xMsCopyProgress) { - this.xMsCopyProgress = xMsCopyProgress; - return this; + public Boolean isIncrementalCopy() { + return this.isIncrementalCopy; } /** - * Get the xMsCopySource property: The x-ms-copy-source property. + * Get the destinationSnapshot property: The x-ms-copy-destination-snapshot property. * - * @return the xMsCopySource value. + * @return the destinationSnapshot value. */ @Generated - public String getXMsCopySource() { - return this.xMsCopySource; + public String getDestinationSnapshot() { + return this.destinationSnapshot; } /** - * Set the xMsCopySource property: The x-ms-copy-source property. + * Get the duration property: The x-ms-lease-duration property. * - * @param xMsCopySource the xMsCopySource value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the duration value. */ @Generated - public BlobsGetLayoutHeaders setXMsCopySource(String xMsCopySource) { - this.xMsCopySource = xMsCopySource; - return this; + public LeaseDurationType getDuration() { + return this.duration; } /** - * Get the xMsCopyStatus property: The x-ms-copy-status property. + * Get the leaseState property: The x-ms-lease-state property. * - * @return the xMsCopyStatus value. + * @return the leaseState value. */ @Generated - public CopyStatusType getXMsCopyStatus() { - return this.xMsCopyStatus; + public LeaseStateType getLeaseState() { + return this.leaseState; } /** - * Set the xMsCopyStatus property: The x-ms-copy-status property. + * Get the leaseStatus property: The x-ms-lease-status property. * - * @param xMsCopyStatus the xMsCopyStatus value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the leaseStatus value. */ @Generated - public BlobsGetLayoutHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) { - this.xMsCopyStatus = xMsCopyStatus; - return this; - } - - /** - * Get the xMsIncrementalCopy property: The x-ms-incremental-copy property. - * - * @return the xMsIncrementalCopy value. - */ - @Generated - public Boolean isXMsIncrementalCopy() { - return this.xMsIncrementalCopy; - } - - /** - * Set the xMsIncrementalCopy property: The x-ms-incremental-copy property. - * - * @param xMsIncrementalCopy the xMsIncrementalCopy value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsIncrementalCopy(Boolean xMsIncrementalCopy) { - this.xMsIncrementalCopy = xMsIncrementalCopy; - return this; - } - - /** - * Get the xMsCopyDestinationSnapshot property: The x-ms-copy-destination-snapshot property. - * - * @return the xMsCopyDestinationSnapshot value. - */ - @Generated - public String getXMsCopyDestinationSnapshot() { - return this.xMsCopyDestinationSnapshot; - } - - /** - * Set the xMsCopyDestinationSnapshot property: The x-ms-copy-destination-snapshot property. - * - * @param xMsCopyDestinationSnapshot the xMsCopyDestinationSnapshot value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsCopyDestinationSnapshot(String xMsCopyDestinationSnapshot) { - this.xMsCopyDestinationSnapshot = xMsCopyDestinationSnapshot; - return this; - } - - /** - * Get the xMsLeaseDuration property: The x-ms-lease-duration property. - * - * @return the xMsLeaseDuration value. - */ - @Generated - public LeaseDurationType getXMsLeaseDuration() { - return this.xMsLeaseDuration; - } - - /** - * Set the xMsLeaseDuration property: The x-ms-lease-duration property. - * - * @param xMsLeaseDuration the xMsLeaseDuration value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsLeaseDuration(LeaseDurationType xMsLeaseDuration) { - this.xMsLeaseDuration = xMsLeaseDuration; - return this; - } - - /** - * Get the xMsLeaseState property: The x-ms-lease-state property. - * - * @return the xMsLeaseState value. - */ - @Generated - public LeaseStateType getXMsLeaseState() { - return this.xMsLeaseState; - } - - /** - * Set the xMsLeaseState property: The x-ms-lease-state property. - * - * @param xMsLeaseState the xMsLeaseState value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsLeaseState(LeaseStateType xMsLeaseState) { - this.xMsLeaseState = xMsLeaseState; - return this; - } - - /** - * Get the xMsLeaseStatus property: The x-ms-lease-status property. - * - * @return the xMsLeaseStatus value. - */ - @Generated - public LeaseStatusType getXMsLeaseStatus() { - return this.xMsLeaseStatus; - } - - /** - * Set the xMsLeaseStatus property: The x-ms-lease-status property. - * - * @param xMsLeaseStatus the xMsLeaseStatus value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsLeaseStatus(LeaseStatusType xMsLeaseStatus) { - this.xMsLeaseStatus = xMsLeaseStatus; - return this; + public LeaseStatusType getLeaseStatus() { + return this.leaseStatus; } /** @@ -1187,40 +914,6 @@ public Long getContentLength() { return this.contentLength; } - /** - * Set the contentLength property: The Content-Length property. - * - * @param contentLength the contentLength value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setContentLength(Long contentLength) { - this.contentLength = contentLength; - return this; - } - - /** - * Get the contentType property: The Content-Type property. - * - * @return the contentType value. - */ - @Generated - public String getContentType() { - return this.contentType; - } - - /** - * Set the contentType property: The Content-Type property. - * - * @param contentType the contentType value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setContentType(String contentType) { - this.contentType = contentType; - return this; - } - /** * Get the eTag property: The ETag property. * @@ -1232,37 +925,13 @@ public String getETag() { } /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the contentMD5 property: The Content-MD5 property. - * - * @return the contentMD5 value. - */ - @Generated - public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); - } - - /** - * Set the contentMD5 property: The Content-MD5 property. + * Get the contentMd5 property: The Content-MD5 property. * - * @param contentMD5 the contentMD5 value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the contentMd5 value. */ @Generated - public BlobsGetLayoutHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); - return this; + public byte[] getContentMd5() { + return CoreUtils.clone(this.contentMd5); } /** @@ -1275,18 +944,6 @@ public String getContentEncoding() { return this.contentEncoding; } - /** - * Set the contentEncoding property: The Content-Encoding property. - * - * @param contentEncoding the contentEncoding value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setContentEncoding(String contentEncoding) { - this.contentEncoding = contentEncoding; - return this; - } - /** * Get the contentDisposition property: The Content-Disposition property. * @@ -1297,18 +954,6 @@ public String getContentDisposition() { return this.contentDisposition; } - /** - * Set the contentDisposition property: The Content-Disposition property. - * - * @param contentDisposition the contentDisposition value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setContentDisposition(String contentDisposition) { - this.contentDisposition = contentDisposition; - return this; - } - /** * Get the contentLanguage property: The Content-Language property. * @@ -1319,18 +964,6 @@ public String getContentLanguage() { return this.contentLanguage; } - /** - * Set the contentLanguage property: The Content-Language property. - * - * @param contentLanguage the contentLanguage value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setContentLanguage(String contentLanguage) { - this.contentLanguage = contentLanguage; - return this; - } - /** * Get the cacheControl property: The Cache-Control property. * @@ -1342,132 +975,13 @@ public String getCacheControl() { } /** - * Set the cacheControl property: The Cache-Control property. - * - * @param cacheControl the cacheControl value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setCacheControl(String cacheControl) { - this.cacheControl = cacheControl; - return this; - } - - /** - * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. + * Get the blobSequenceNumber property: The x-ms-blob-sequence-number property. * - * @return the xMsBlobSequenceNumber value. + * @return the blobSequenceNumber value. */ @Generated - public Long getXMsBlobSequenceNumber() { - return this.xMsBlobSequenceNumber; - } - - /** - * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * - * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { - this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the date property: The Date property. - * - * @return the date value. - */ - @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); - } - - /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public Long getBlobSequenceNumber() { + return this.blobSequenceNumber; } /** @@ -1481,460 +995,247 @@ public String getAcceptRanges() { } /** - * Set the acceptRanges property: The Accept-Ranges property. - * - * @param acceptRanges the acceptRanges value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setAcceptRanges(String acceptRanges) { - this.acceptRanges = acceptRanges; - return this; - } - - /** - * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * - * @return the xMsBlobCommittedBlockCount value. - */ - @Generated - public Integer getXMsBlobCommittedBlockCount() { - return this.xMsBlobCommittedBlockCount; - } - - /** - * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * - * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCommittedBlockCount) { - this.xMsBlobCommittedBlockCount = xMsBlobCommittedBlockCount; - return this; - } - - /** - * Get the xMsServerEncrypted property: The x-ms-server-encrypted property. + * Get the blobCommittedBlockCount property: The x-ms-blob-committed-block-count property. * - * @return the xMsServerEncrypted value. + * @return the blobCommittedBlockCount value. */ @Generated - public Boolean isXMsServerEncrypted() { - return this.xMsServerEncrypted; + public Integer getBlobCommittedBlockCount() { + return this.blobCommittedBlockCount; } /** - * Set the xMsServerEncrypted property: The x-ms-server-encrypted property. + * Get the isServerEncrypted property: The x-ms-server-encrypted property. * - * @param xMsServerEncrypted the xMsServerEncrypted value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the isServerEncrypted value. */ @Generated - public BlobsGetLayoutHeaders setXMsServerEncrypted(Boolean xMsServerEncrypted) { - this.xMsServerEncrypted = xMsServerEncrypted; - return this; + public Boolean isServerEncrypted() { + return this.isServerEncrypted; } /** - * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * Get the encryptionKeySha256 property: The x-ms-encryption-key-sha256 property. * - * @return the xMsEncryptionKeySha256 value. + * @return the encryptionKeySha256 value. */ @Generated - public String getXMsEncryptionKeySha256() { - return this.xMsEncryptionKeySha256; + public String getEncryptionKeySha256() { + return this.encryptionKeySha256; } /** - * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * Get the encryptionScope property: The x-ms-encryption-scope property. * - * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the encryptionScope value. */ @Generated - public BlobsGetLayoutHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { - this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; - return this; + public String getEncryptionScope() { + return this.encryptionScope; } /** - * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * Get the accessTier property: The x-ms-access-tier property. * - * @return the xMsEncryptionScope value. + * @return the accessTier value. */ @Generated - public String getXMsEncryptionScope() { - return this.xMsEncryptionScope; + public String getAccessTier() { + return this.accessTier; } /** - * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. + * Get the accessTierInferred property: The x-ms-access-tier-inferred property. * - * @param xMsEncryptionScope the xMsEncryptionScope value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the accessTierInferred value. */ @Generated - public BlobsGetLayoutHeaders setXMsEncryptionScope(String xMsEncryptionScope) { - this.xMsEncryptionScope = xMsEncryptionScope; - return this; + public Boolean isAccessTierInferred() { + return this.accessTierInferred; } /** - * Get the xMsAccessTier property: The x-ms-access-tier property. + * Get the smartAccessTier property: The x-ms-smart-access-tier property. * - * @return the xMsAccessTier value. + * @return the smartAccessTier value. */ @Generated - public String getXMsAccessTier() { - return this.xMsAccessTier; + public String getSmartAccessTier() { + return this.smartAccessTier; } /** - * Set the xMsAccessTier property: The x-ms-access-tier property. + * Get the archiveStatus property: The x-ms-archive-status property. * - * @param xMsAccessTier the xMsAccessTier value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the archiveStatus value. */ @Generated - public BlobsGetLayoutHeaders setXMsAccessTier(String xMsAccessTier) { - this.xMsAccessTier = xMsAccessTier; - return this; + public ArchiveStatus getArchiveStatus() { + return this.archiveStatus; } /** - * Get the xMsAccessTierInferred property: The x-ms-access-tier-inferred property. + * Get the accessTierChangeTime property: The x-ms-access-tier-change-time property. * - * @return the xMsAccessTierInferred value. + * @return the accessTierChangeTime value. */ @Generated - public Boolean isXMsAccessTierInferred() { - return this.xMsAccessTierInferred; - } - - /** - * Set the xMsAccessTierInferred property: The x-ms-access-tier-inferred property. - * - * @param xMsAccessTierInferred the xMsAccessTierInferred value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsAccessTierInferred(Boolean xMsAccessTierInferred) { - this.xMsAccessTierInferred = xMsAccessTierInferred; - return this; - } - - /** - * Get the xMsSmartAccessTier property: The x-ms-smart-access-tier property. - * - * @return the xMsSmartAccessTier value. - */ - @Generated - public String getXMsSmartAccessTier() { - return this.xMsSmartAccessTier; - } - - /** - * Set the xMsSmartAccessTier property: The x-ms-smart-access-tier property. - * - * @param xMsSmartAccessTier the xMsSmartAccessTier value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsSmartAccessTier(String xMsSmartAccessTier) { - this.xMsSmartAccessTier = xMsSmartAccessTier; - return this; - } - - /** - * Get the xMsArchiveStatus property: The x-ms-archive-status property. - * - * @return the xMsArchiveStatus value. - */ - @Generated - public String getXMsArchiveStatus() { - return this.xMsArchiveStatus; - } - - /** - * Set the xMsArchiveStatus property: The x-ms-archive-status property. - * - * @param xMsArchiveStatus the xMsArchiveStatus value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsArchiveStatus(String xMsArchiveStatus) { - this.xMsArchiveStatus = xMsArchiveStatus; - return this; - } - - /** - * Get the xMsAccessTierChangeTime property: The x-ms-access-tier-change-time property. - * - * @return the xMsAccessTierChangeTime value. - */ - @Generated - public OffsetDateTime getXMsAccessTierChangeTime() { - if (this.xMsAccessTierChangeTime == null) { + public OffsetDateTime getAccessTierChangeTime() { + if (this.accessTierChangeTime == null) { return null; } - return this.xMsAccessTierChangeTime.getDateTime(); + return this.accessTierChangeTime.getDateTime(); } /** - * Set the xMsAccessTierChangeTime property: The x-ms-access-tier-change-time property. + * Get the versionId property: The x-ms-version-id property. * - * @param xMsAccessTierChangeTime the xMsAccessTierChangeTime value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the versionId value. */ @Generated - public BlobsGetLayoutHeaders setXMsAccessTierChangeTime(OffsetDateTime xMsAccessTierChangeTime) { - if (xMsAccessTierChangeTime == null) { - this.xMsAccessTierChangeTime = null; - } else { - this.xMsAccessTierChangeTime = new DateTimeRfc1123(xMsAccessTierChangeTime); - } - return this; + public String getVersionId() { + return this.versionId; } /** - * Get the xMsVersionId property: The x-ms-version-id property. + * Get the isCurrentVersion property: The x-ms-is-current-version property. * - * @return the xMsVersionId value. + * @return the isCurrentVersion value. */ @Generated - public String getXMsVersionId() { - return this.xMsVersionId; + public Boolean isCurrentVersion() { + return this.isCurrentVersion; } /** - * Set the xMsVersionId property: The x-ms-version-id property. + * Get the tagCount property: The x-ms-tag-count property. * - * @param xMsVersionId the xMsVersionId value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the tagCount value. */ @Generated - public BlobsGetLayoutHeaders setXMsVersionId(String xMsVersionId) { - this.xMsVersionId = xMsVersionId; - return this; + public Long getTagCount() { + return this.tagCount; } /** - * Get the xMsIsCurrentVersion property: The x-ms-is-current-version property. + * Get the expiresOn property: The x-ms-expiry-time property. * - * @return the xMsIsCurrentVersion value. + * @return the expiresOn value. */ @Generated - public Boolean isXMsIsCurrentVersion() { - return this.xMsIsCurrentVersion; - } - - /** - * Set the xMsIsCurrentVersion property: The x-ms-is-current-version property. - * - * @param xMsIsCurrentVersion the xMsIsCurrentVersion value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsIsCurrentVersion(Boolean xMsIsCurrentVersion) { - this.xMsIsCurrentVersion = xMsIsCurrentVersion; - return this; - } - - /** - * Get the xMsTagCount property: The x-ms-tag-count property. - * - * @return the xMsTagCount value. - */ - @Generated - public Long getXMsTagCount() { - return this.xMsTagCount; - } - - /** - * Set the xMsTagCount property: The x-ms-tag-count property. - * - * @param xMsTagCount the xMsTagCount value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsTagCount(Long xMsTagCount) { - this.xMsTagCount = xMsTagCount; - return this; - } - - /** - * Get the xMsExpiryTime property: The x-ms-expiry-time property. - * - * @return the xMsExpiryTime value. - */ - @Generated - public OffsetDateTime getXMsExpiryTime() { - if (this.xMsExpiryTime == null) { + public OffsetDateTime getExpiresOn() { + if (this.expiresOn == null) { return null; } - return this.xMsExpiryTime.getDateTime(); - } - - /** - * Set the xMsExpiryTime property: The x-ms-expiry-time property. - * - * @param xMsExpiryTime the xMsExpiryTime value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsExpiryTime(OffsetDateTime xMsExpiryTime) { - if (xMsExpiryTime == null) { - this.xMsExpiryTime = null; - } else { - this.xMsExpiryTime = new DateTimeRfc1123(xMsExpiryTime); - } - return this; - } - - /** - * Get the xMsBlobSealed property: The x-ms-blob-sealed property. - * - * @return the xMsBlobSealed value. - */ - @Generated - public Boolean isXMsBlobSealed() { - return this.xMsBlobSealed; - } - - /** - * Set the xMsBlobSealed property: The x-ms-blob-sealed property. - * - * @param xMsBlobSealed the xMsBlobSealed value to set. - * @return the BlobsGetLayoutHeaders object itself. - */ - @Generated - public BlobsGetLayoutHeaders setXMsBlobSealed(Boolean xMsBlobSealed) { - this.xMsBlobSealed = xMsBlobSealed; - return this; + return this.expiresOn.getDateTime(); } /** - * Get the xMsRehydratePriority property: The x-ms-rehydrate-priority property. + * Get the isSealed property: The x-ms-blob-sealed property. * - * @return the xMsRehydratePriority value. + * @return the isSealed value. */ @Generated - public String getXMsRehydratePriority() { - return this.xMsRehydratePriority; + public Boolean isSealed() { + return this.isSealed; } /** - * Set the xMsRehydratePriority property: The x-ms-rehydrate-priority property. + * Get the rehydratePriority property: The x-ms-rehydrate-priority property. * - * @param xMsRehydratePriority the xMsRehydratePriority value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the rehydratePriority value. */ @Generated - public BlobsGetLayoutHeaders setXMsRehydratePriority(String xMsRehydratePriority) { - this.xMsRehydratePriority = xMsRehydratePriority; - return this; + public RehydratePriority getRehydratePriority() { + return this.rehydratePriority; } /** - * Get the xMsLastAccessTime property: The x-ms-last-access-time property. + * Get the lastAccessed property: The x-ms-last-access-time property. * - * @return the xMsLastAccessTime value. + * @return the lastAccessed value. */ @Generated - public OffsetDateTime getXMsLastAccessTime() { - if (this.xMsLastAccessTime == null) { + public OffsetDateTime getLastAccessed() { + if (this.lastAccessed == null) { return null; } - return this.xMsLastAccessTime.getDateTime(); + return this.lastAccessed.getDateTime(); } /** - * Set the xMsLastAccessTime property: The x-ms-last-access-time property. + * Get the immutabilityPolicyExpiresOn property: The x-ms-immutability-policy-until-date property. * - * @param xMsLastAccessTime the xMsLastAccessTime value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the immutabilityPolicyExpiresOn value. */ @Generated - public BlobsGetLayoutHeaders setXMsLastAccessTime(OffsetDateTime xMsLastAccessTime) { - if (xMsLastAccessTime == null) { - this.xMsLastAccessTime = null; - } else { - this.xMsLastAccessTime = new DateTimeRfc1123(xMsLastAccessTime); + public OffsetDateTime getImmutabilityPolicyExpiresOn() { + if (this.immutabilityPolicyExpiresOn == null) { + return null; } - return this; + return this.immutabilityPolicyExpiresOn.getDateTime(); } /** - * Get the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. + * Get the immutabilityPolicyMode property: The x-ms-immutability-policy-mode property. * - * @return the xMsImmutabilityPolicyUntilDate value. + * @return the immutabilityPolicyMode value. */ @Generated - public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { - if (this.xMsImmutabilityPolicyUntilDate == null) { - return null; - } - return this.xMsImmutabilityPolicyUntilDate.getDateTime(); + public BlobImmutabilityPolicyMode getImmutabilityPolicyMode() { + return this.immutabilityPolicyMode; } /** - * Set the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. + * Get the legalHold property: The x-ms-legal-hold property. * - * @param xMsImmutabilityPolicyUntilDate the xMsImmutabilityPolicyUntilDate value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the legalHold value. */ @Generated - public BlobsGetLayoutHeaders setXMsImmutabilityPolicyUntilDate(OffsetDateTime xMsImmutabilityPolicyUntilDate) { - if (xMsImmutabilityPolicyUntilDate == null) { - this.xMsImmutabilityPolicyUntilDate = null; - } else { - this.xMsImmutabilityPolicyUntilDate = new DateTimeRfc1123(xMsImmutabilityPolicyUntilDate); - } - return this; + public Boolean isLegalHold() { + return this.legalHold; } /** - * Get the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @return the xMsImmutabilityPolicyMode value. + * @return the clientRequestId value. */ @Generated - public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { - return this.xMsImmutabilityPolicyMode; + public String getClientRequestId() { + return this.clientRequestId; } /** - * Set the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. + * Get the requestId property: The x-ms-request-id property. * - * @param xMsImmutabilityPolicyMode the xMsImmutabilityPolicyMode value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the requestId value. */ @Generated - public BlobsGetLayoutHeaders setXMsImmutabilityPolicyMode(BlobImmutabilityPolicyMode xMsImmutabilityPolicyMode) { - this.xMsImmutabilityPolicyMode = xMsImmutabilityPolicyMode; - return this; + public String getRequestId() { + return this.requestId; } /** - * Get the xMsLegalHold property: The x-ms-legal-hold property. + * Get the version property: The x-ms-version property. * - * @return the xMsLegalHold value. + * @return the version value. */ @Generated - public Boolean isXMsLegalHold() { - return this.xMsLegalHold; + public String getVersion() { + return this.version; } /** - * Set the xMsLegalHold property: The x-ms-legal-hold property. + * Get the date property: The Date property. * - * @param xMsLegalHold the xMsLegalHold value to set. - * @return the BlobsGetLayoutHeaders object itself. + * @return the date value. */ @Generated - public BlobsGetLayoutHeaders setXMsLegalHold(Boolean xMsLegalHold) { - this.xMsLegalHold = xMsLegalHold; - return this; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } } 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 fdc8214321b7b..f162b87cbeb29 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 @@ -1,330 +1,333 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; import com.azure.core.util.DateTimeRfc1123; +import com.azure.storage.blob.models.ArchiveStatus; import com.azure.storage.blob.models.BlobImmutabilityPolicyMode; import com.azure.storage.blob.models.BlobType; import com.azure.storage.blob.models.CopyStatusType; import com.azure.storage.blob.models.LeaseDurationType; import com.azure.storage.blob.models.LeaseStateType; import com.azure.storage.blob.models.LeaseStatusType; +import com.azure.storage.blob.models.RehydratePriority; import java.time.OffsetDateTime; import java.util.Base64; import java.util.LinkedHashMap; +import java.util.Locale; import java.util.Map; /** * The BlobsGetPropertiesHeaders model. */ -@Fluent +@Immutable public final class BlobsGetPropertiesHeaders { /* - * The Last-Modified property. + * The Content-Type property. */ @Generated - private DateTimeRfc1123 lastModified; + private final String contentType; /* - * The x-ms-creation-time property. + * The x-ms-meta- property. */ @Generated - private DateTimeRfc1123 xMsCreationTime; + private final Map metadata; /* - * The x-ms-meta- property. + * The x-ms-or- property. */ @Generated - private Map xMsMeta; + private final Map objectReplicationRules; /* - * The x-ms-or-policy-id property. + * The Last-Modified property. */ @Generated - private String xMsOrPolicyId; + private final DateTimeRfc1123 lastModified; /* - * The x-ms-or- property. + * The x-ms-creation-time property. + */ + @Generated + private final DateTimeRfc1123 creationTime; + + /* + * The x-ms-or-policy-id property. */ @Generated - private Map xMsOr; + private final String objectReplicationPolicyId; /* * The x-ms-blob-type property. */ @Generated - private BlobType xMsBlobType; + private final BlobType blobType; /* * The x-ms-copy-completion-time property. */ @Generated - private DateTimeRfc1123 xMsCopyCompletionTime; + private final DateTimeRfc1123 copyCompletionTime; /* * The x-ms-copy-status-description property. */ @Generated - private String xMsCopyStatusDescription; + private final String copyStatusDescription; /* * The x-ms-copy-id property. */ @Generated - private String xMsCopyId; + private final String copyId; /* * The x-ms-copy-progress property. */ @Generated - private String xMsCopyProgress; + private final String copyProgress; /* - * The x-ms-copy-source property. + * The x-ms-copy-status property. */ @Generated - private String xMsCopySource; + private final CopyStatusType copyStatus; /* - * The x-ms-copy-status property. + * The x-ms-copy-source property. */ @Generated - private CopyStatusType xMsCopyStatus; + private final String copySource; /* * The x-ms-incremental-copy property. */ @Generated - private Boolean xMsIncrementalCopy; + private final Boolean isIncrementalCopy; /* * The x-ms-copy-destination-snapshot property. */ @Generated - private String xMsCopyDestinationSnapshot; + private final String destinationSnapshot; /* * The x-ms-lease-duration property. */ @Generated - private LeaseDurationType xMsLeaseDuration; + private final LeaseDurationType duration; /* * The x-ms-lease-state property. */ @Generated - private LeaseStateType xMsLeaseState; + private final LeaseStateType leaseState; /* * The x-ms-lease-status property. */ @Generated - private LeaseStatusType xMsLeaseStatus; + private final LeaseStatusType leaseStatus; /* * The Content-Length property. */ @Generated - private Long contentLength; - - /* - * The Content-Type property. - */ - @Generated - private String contentType; + private final Long contentLength; /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Content-MD5 property. */ @Generated - private byte[] contentMD5; + private final byte[] contentMd5; /* * The Content-Encoding property. */ @Generated - private String contentEncoding; + private final String contentEncoding; /* * The Content-Disposition property. */ @Generated - private String contentDisposition; + private final String contentDisposition; /* * The Content-Language property. */ @Generated - private String contentLanguage; + private final String contentLanguage; /* * The Cache-Control property. */ @Generated - private String cacheControl; + private final String cacheControl; /* * The x-ms-blob-sequence-number property. */ @Generated - private Long xMsBlobSequenceNumber; - - /* - * The x-ms-client-request-id property. - */ - @Generated - private String xMsClientRequestId; - - /* - * The x-ms-request-id property. - */ - @Generated - private String xMsRequestId; - - /* - * The x-ms-version property. - */ - @Generated - private String xMsVersion; - - /* - * The Date property. - */ - @Generated - private DateTimeRfc1123 date; + private final Long blobSequenceNumber; /* * The Accept-Ranges property. */ @Generated - private String acceptRanges; + private final String acceptRanges; /* * The x-ms-blob-committed-block-count property. */ @Generated - private Integer xMsBlobCommittedBlockCount; + private final Integer blobCommittedBlockCount; /* * The x-ms-server-encrypted property. */ @Generated - private Boolean xMsServerEncrypted; + private final Boolean isServerEncrypted; /* * The x-ms-encryption-key-sha256 property. */ @Generated - private String xMsEncryptionKeySha256; + private final String encryptionKeySha256; /* * The x-ms-encryption-scope property. */ @Generated - private String xMsEncryptionScope; + private final String encryptionScope; /* * The x-ms-access-tier property. */ @Generated - private String xMsAccessTier; + private final String accessTier; /* * The x-ms-access-tier-inferred property. */ @Generated - private Boolean xMsAccessTierInferred; + private final Boolean accessTierInferred; /* * The x-ms-archive-status property. */ @Generated - private String xMsArchiveStatus; + private final ArchiveStatus archiveStatus; /* * The x-ms-access-tier-change-time property. */ @Generated - private DateTimeRfc1123 xMsAccessTierChangeTime; + private final DateTimeRfc1123 accessTierChangeTime; /* * The x-ms-smart-access-tier property. */ @Generated - private String xMsSmartAccessTier; + private final String smartAccessTier; /* * The x-ms-version-id property. */ @Generated - private String xMsVersionId; + private final String versionId; /* * The x-ms-is-current-version property. */ @Generated - private Boolean xMsIsCurrentVersion; + private final Boolean isCurrentVersion; /* * The x-ms-tag-count property. */ @Generated - private Long xMsTagCount; + private final Long tagCount; /* * The x-ms-expiry-time property. */ @Generated - private DateTimeRfc1123 xMsExpiryTime; + private final DateTimeRfc1123 expiresOn; /* * The x-ms-blob-sealed property. */ @Generated - private Boolean xMsBlobSealed; + private final Boolean isSealed; /* * The x-ms-rehydrate-priority property. */ @Generated - private String xMsRehydratePriority; + private final RehydratePriority rehydratePriority; /* * The x-ms-last-access-time property. */ @Generated - private DateTimeRfc1123 xMsLastAccessTime; + private final DateTimeRfc1123 lastAccessed; /* * The x-ms-immutability-policy-until-date property. */ @Generated - private DateTimeRfc1123 xMsImmutabilityPolicyUntilDate; + private final DateTimeRfc1123 immutabilityPolicyExpiresOn; /* * The x-ms-immutability-policy-mode property. */ @Generated - private BlobImmutabilityPolicyMode xMsImmutabilityPolicyMode; + private final BlobImmutabilityPolicyMode immutabilityPolicyMode; /* * The x-ms-legal-hold property. */ @Generated - private Boolean xMsLegalHold; + private final Boolean legalHold; + + /* + * The Date property. + */ + @Generated + private final DateTimeRfc1123 date; + + /* + * The x-ms-version property. + */ + @Generated + private final String version; + + /* + * The x-ms-request-id property. + */ + @Generated + private final String requestId; + + /* + * The x-ms-client-request-id property. + */ + @Generated + private final String clientRequestId; private static final HttpHeaderName X_MS_CREATION_TIME = HttpHeaderName.fromString("x-ms-creation-time"); @@ -342,10 +345,10 @@ public final class BlobsGetPropertiesHeaders { private static final HttpHeaderName X_MS_COPY_PROGRESS = HttpHeaderName.fromString("x-ms-copy-progress"); - private static final HttpHeaderName X_MS_COPY_SOURCE = HttpHeaderName.fromString("x-ms-copy-source"); - private static final HttpHeaderName X_MS_COPY_STATUS = HttpHeaderName.fromString("x-ms-copy-status"); + private static final HttpHeaderName X_MS_COPY_SOURCE = HttpHeaderName.fromString("x-ms-copy-source"); + private static final HttpHeaderName X_MS_INCREMENTAL_COPY = HttpHeaderName.fromString("x-ms-incremental-copy"); private static final HttpHeaderName X_MS_COPY_DESTINATION_SNAPSHOT @@ -360,8 +363,6 @@ public final class BlobsGetPropertiesHeaders { private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER = HttpHeaderName.fromString("x-ms-blob-sequence-number"); - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_BLOB_COMMITTED_BLOCK_COUNT = HttpHeaderName.fromString("x-ms-blob-committed-block-count"); @@ -406,6 +407,8 @@ public final class BlobsGetPropertiesHeaders { private static final HttpHeaderName X_MS_LEGAL_HOLD = HttpHeaderName.fromString("x-ms-legal-hold"); + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsGetPropertiesHeaders class. @@ -413,65 +416,66 @@ public final class BlobsGetPropertiesHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsGetPropertiesHeaders(HttpHeaders rawHeaders) { + this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); if (lastModified != null) { this.lastModified = new DateTimeRfc1123(lastModified); } else { this.lastModified = null; } - String xMsCreationTime = rawHeaders.getValue(X_MS_CREATION_TIME); - if (xMsCreationTime != null) { - this.xMsCreationTime = new DateTimeRfc1123(xMsCreationTime); + String creationTime = rawHeaders.getValue(X_MS_CREATION_TIME); + if (creationTime != null) { + this.creationTime = new DateTimeRfc1123(creationTime); } else { - this.xMsCreationTime = null; + this.creationTime = null; } - this.xMsOrPolicyId = rawHeaders.getValue(X_MS_OR_POLICY_ID); - String xMsBlobType = rawHeaders.getValue(X_MS_BLOB_TYPE); - if (xMsBlobType != null) { - this.xMsBlobType = BlobType.fromString(xMsBlobType); + this.objectReplicationPolicyId = rawHeaders.getValue(X_MS_OR_POLICY_ID); + String blobType = rawHeaders.getValue(X_MS_BLOB_TYPE); + if (blobType != null) { + this.blobType = BlobType.fromString(blobType); } else { - this.xMsBlobType = null; + this.blobType = null; } - String xMsCopyCompletionTime = rawHeaders.getValue(X_MS_COPY_COMPLETION_TIME); - if (xMsCopyCompletionTime != null) { - this.xMsCopyCompletionTime = new DateTimeRfc1123(xMsCopyCompletionTime); + String copyCompletionTime = rawHeaders.getValue(X_MS_COPY_COMPLETION_TIME); + if (copyCompletionTime != null) { + this.copyCompletionTime = new DateTimeRfc1123(copyCompletionTime); } else { - this.xMsCopyCompletionTime = null; + this.copyCompletionTime = null; } - this.xMsCopyStatusDescription = rawHeaders.getValue(X_MS_COPY_STATUS_DESCRIPTION); - this.xMsCopyId = rawHeaders.getValue(X_MS_COPY_ID); - this.xMsCopyProgress = rawHeaders.getValue(X_MS_COPY_PROGRESS); - this.xMsCopySource = rawHeaders.getValue(X_MS_COPY_SOURCE); - String xMsCopyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); - if (xMsCopyStatus != null) { - this.xMsCopyStatus = CopyStatusType.fromString(xMsCopyStatus); + this.copyStatusDescription = rawHeaders.getValue(X_MS_COPY_STATUS_DESCRIPTION); + this.copyId = rawHeaders.getValue(X_MS_COPY_ID); + this.copyProgress = rawHeaders.getValue(X_MS_COPY_PROGRESS); + String copyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); + if (copyStatus != null) { + this.copyStatus = CopyStatusType.fromString(copyStatus); } else { - this.xMsCopyStatus = null; + this.copyStatus = null; } - String xMsIncrementalCopy = rawHeaders.getValue(X_MS_INCREMENTAL_COPY); - if (xMsIncrementalCopy != null) { - this.xMsIncrementalCopy = Boolean.parseBoolean(xMsIncrementalCopy); + this.copySource = rawHeaders.getValue(X_MS_COPY_SOURCE); + String isIncrementalCopy = rawHeaders.getValue(X_MS_INCREMENTAL_COPY); + if (isIncrementalCopy != null) { + this.isIncrementalCopy = Boolean.parseBoolean(isIncrementalCopy); } else { - this.xMsIncrementalCopy = null; + this.isIncrementalCopy = null; } - this.xMsCopyDestinationSnapshot = rawHeaders.getValue(X_MS_COPY_DESTINATION_SNAPSHOT); - String xMsLeaseDuration = rawHeaders.getValue(X_MS_LEASE_DURATION); - if (xMsLeaseDuration != null) { - this.xMsLeaseDuration = LeaseDurationType.fromString(xMsLeaseDuration); + this.destinationSnapshot = rawHeaders.getValue(X_MS_COPY_DESTINATION_SNAPSHOT); + String duration = rawHeaders.getValue(X_MS_LEASE_DURATION); + if (duration != null) { + this.duration = LeaseDurationType.fromString(duration); } else { - this.xMsLeaseDuration = null; + this.duration = null; } - String xMsLeaseState = rawHeaders.getValue(X_MS_LEASE_STATE); - if (xMsLeaseState != null) { - this.xMsLeaseState = LeaseStateType.fromString(xMsLeaseState); + String leaseState = rawHeaders.getValue(X_MS_LEASE_STATE); + if (leaseState != null) { + this.leaseState = LeaseStateType.fromString(leaseState); } else { - this.xMsLeaseState = null; + this.leaseState = null; } - String xMsLeaseStatus = rawHeaders.getValue(X_MS_LEASE_STATUS); - if (xMsLeaseStatus != null) { - this.xMsLeaseStatus = LeaseStatusType.fromString(xMsLeaseStatus); + String leaseStatus = rawHeaders.getValue(X_MS_LEASE_STATUS); + if (leaseStatus != null) { + this.leaseStatus = LeaseStatusType.fromString(leaseStatus); } else { - this.xMsLeaseStatus = null; + this.leaseStatus = null; } String contentLength = rawHeaders.getValue(HttpHeaderName.CONTENT_LENGTH); if (contentLength != null) { @@ -479,523 +483,327 @@ public BlobsGetPropertiesHeaders(HttpHeaders rawHeaders) { } else { this.contentLength = null; } - this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); - String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); - if (contentMD5 != null) { - this.contentMD5 = Base64.getDecoder().decode(contentMD5); + String contentMd5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMd5 != null) { + this.contentMd5 = Base64.getDecoder().decode(contentMd5); } else { - this.contentMD5 = null; + this.contentMd5 = null; } this.contentEncoding = rawHeaders.getValue(HttpHeaderName.CONTENT_ENCODING); this.contentDisposition = rawHeaders.getValue(HttpHeaderName.CONTENT_DISPOSITION); this.contentLanguage = rawHeaders.getValue(HttpHeaderName.CONTENT_LANGUAGE); this.cacheControl = rawHeaders.getValue(HttpHeaderName.CACHE_CONTROL); - String xMsBlobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); - if (xMsBlobSequenceNumber != null) { - this.xMsBlobSequenceNumber = Long.parseLong(xMsBlobSequenceNumber); + String blobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); + if (blobSequenceNumber != null) { + this.blobSequenceNumber = Long.parseLong(blobSequenceNumber); } else { - this.xMsBlobSequenceNumber = null; + this.blobSequenceNumber = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - String date = rawHeaders.getValue(HttpHeaderName.DATE); - if (date != null) { - this.date = new DateTimeRfc1123(date); + this.acceptRanges = rawHeaders.getValue(HttpHeaderName.ACCEPT_RANGES); + String blobCommittedBlockCount = rawHeaders.getValue(X_MS_BLOB_COMMITTED_BLOCK_COUNT); + if (blobCommittedBlockCount != null) { + this.blobCommittedBlockCount = Integer.parseInt(blobCommittedBlockCount); } else { - this.date = null; + this.blobCommittedBlockCount = null; } - this.acceptRanges = rawHeaders.getValue(HttpHeaderName.ACCEPT_RANGES); - String xMsBlobCommittedBlockCount = rawHeaders.getValue(X_MS_BLOB_COMMITTED_BLOCK_COUNT); - if (xMsBlobCommittedBlockCount != null) { - this.xMsBlobCommittedBlockCount = Integer.parseInt(xMsBlobCommittedBlockCount); + String isServerEncrypted = rawHeaders.getValue(X_MS_SERVER_ENCRYPTED); + if (isServerEncrypted != null) { + this.isServerEncrypted = Boolean.parseBoolean(isServerEncrypted); + } else { + this.isServerEncrypted = null; + } + this.encryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.encryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + this.accessTier = rawHeaders.getValue(X_MS_ACCESS_TIER); + String accessTierInferred = rawHeaders.getValue(X_MS_ACCESS_TIER_INFERRED); + if (accessTierInferred != null) { + this.accessTierInferred = Boolean.parseBoolean(accessTierInferred); + } else { + this.accessTierInferred = null; + } + String archiveStatus = rawHeaders.getValue(X_MS_ARCHIVE_STATUS); + if (archiveStatus != null) { + this.archiveStatus = ArchiveStatus.fromString(archiveStatus); } else { - this.xMsBlobCommittedBlockCount = null; + this.archiveStatus = null; } - String xMsServerEncrypted = rawHeaders.getValue(X_MS_SERVER_ENCRYPTED); - if (xMsServerEncrypted != null) { - this.xMsServerEncrypted = Boolean.parseBoolean(xMsServerEncrypted); + String accessTierChangeTime = rawHeaders.getValue(X_MS_ACCESS_TIER_CHANGE_TIME); + if (accessTierChangeTime != null) { + this.accessTierChangeTime = new DateTimeRfc1123(accessTierChangeTime); } else { - this.xMsServerEncrypted = null; + this.accessTierChangeTime = null; } - this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); - this.xMsAccessTier = rawHeaders.getValue(X_MS_ACCESS_TIER); - String xMsAccessTierInferred = rawHeaders.getValue(X_MS_ACCESS_TIER_INFERRED); - if (xMsAccessTierInferred != null) { - this.xMsAccessTierInferred = Boolean.parseBoolean(xMsAccessTierInferred); + this.smartAccessTier = rawHeaders.getValue(X_MS_SMART_ACCESS_TIER); + this.versionId = rawHeaders.getValue(X_MS_VERSION_ID); + String isCurrentVersion = rawHeaders.getValue(X_MS_IS_CURRENT_VERSION); + if (isCurrentVersion != null) { + this.isCurrentVersion = Boolean.parseBoolean(isCurrentVersion); } else { - this.xMsAccessTierInferred = null; + this.isCurrentVersion = null; } - this.xMsArchiveStatus = rawHeaders.getValue(X_MS_ARCHIVE_STATUS); - String xMsAccessTierChangeTime = rawHeaders.getValue(X_MS_ACCESS_TIER_CHANGE_TIME); - if (xMsAccessTierChangeTime != null) { - this.xMsAccessTierChangeTime = new DateTimeRfc1123(xMsAccessTierChangeTime); + String tagCount = rawHeaders.getValue(X_MS_TAG_COUNT); + if (tagCount != null) { + this.tagCount = Long.parseLong(tagCount); } else { - this.xMsAccessTierChangeTime = null; + this.tagCount = null; } - this.xMsSmartAccessTier = rawHeaders.getValue(X_MS_SMART_ACCESS_TIER); - this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); - String xMsIsCurrentVersion = rawHeaders.getValue(X_MS_IS_CURRENT_VERSION); - if (xMsIsCurrentVersion != null) { - this.xMsIsCurrentVersion = Boolean.parseBoolean(xMsIsCurrentVersion); + String expiresOn = rawHeaders.getValue(X_MS_EXPIRY_TIME); + if (expiresOn != null) { + this.expiresOn = new DateTimeRfc1123(expiresOn); } else { - this.xMsIsCurrentVersion = null; + this.expiresOn = null; } - String xMsTagCount = rawHeaders.getValue(X_MS_TAG_COUNT); - if (xMsTagCount != null) { - this.xMsTagCount = Long.parseLong(xMsTagCount); + String isSealed = rawHeaders.getValue(X_MS_BLOB_SEALED); + if (isSealed != null) { + this.isSealed = Boolean.parseBoolean(isSealed); } else { - this.xMsTagCount = null; + this.isSealed = null; } - String xMsExpiryTime = rawHeaders.getValue(X_MS_EXPIRY_TIME); - if (xMsExpiryTime != null) { - this.xMsExpiryTime = new DateTimeRfc1123(xMsExpiryTime); + String rehydratePriority = rawHeaders.getValue(X_MS_REHYDRATE_PRIORITY); + if (rehydratePriority != null) { + this.rehydratePriority = RehydratePriority.fromString(rehydratePriority); } else { - this.xMsExpiryTime = null; + this.rehydratePriority = null; } - String xMsBlobSealed = rawHeaders.getValue(X_MS_BLOB_SEALED); - if (xMsBlobSealed != null) { - this.xMsBlobSealed = Boolean.parseBoolean(xMsBlobSealed); + String lastAccessed = rawHeaders.getValue(X_MS_LAST_ACCESS_TIME); + if (lastAccessed != null) { + this.lastAccessed = new DateTimeRfc1123(lastAccessed); } else { - this.xMsBlobSealed = null; + this.lastAccessed = null; } - this.xMsRehydratePriority = rawHeaders.getValue(X_MS_REHYDRATE_PRIORITY); - String xMsLastAccessTime = rawHeaders.getValue(X_MS_LAST_ACCESS_TIME); - if (xMsLastAccessTime != null) { - this.xMsLastAccessTime = new DateTimeRfc1123(xMsLastAccessTime); + String immutabilityPolicyExpiresOn = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_UNTIL_DATE); + if (immutabilityPolicyExpiresOn != null) { + this.immutabilityPolicyExpiresOn = new DateTimeRfc1123(immutabilityPolicyExpiresOn); } else { - this.xMsLastAccessTime = null; + this.immutabilityPolicyExpiresOn = null; } - String xMsImmutabilityPolicyUntilDate = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_UNTIL_DATE); - if (xMsImmutabilityPolicyUntilDate != null) { - this.xMsImmutabilityPolicyUntilDate = new DateTimeRfc1123(xMsImmutabilityPolicyUntilDate); + String immutabilityPolicyMode = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_MODE); + if (immutabilityPolicyMode != null) { + this.immutabilityPolicyMode = BlobImmutabilityPolicyMode.fromString(immutabilityPolicyMode); } else { - this.xMsImmutabilityPolicyUntilDate = null; + this.immutabilityPolicyMode = null; } - String xMsImmutabilityPolicyMode = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_MODE); - if (xMsImmutabilityPolicyMode != null) { - this.xMsImmutabilityPolicyMode = BlobImmutabilityPolicyMode.fromString(xMsImmutabilityPolicyMode); + String legalHold = rawHeaders.getValue(X_MS_LEGAL_HOLD); + if (legalHold != null) { + this.legalHold = Boolean.parseBoolean(legalHold); } else { - this.xMsImmutabilityPolicyMode = null; + this.legalHold = null; } - String xMsLegalHold = rawHeaders.getValue(X_MS_LEGAL_HOLD); - if (xMsLegalHold != null) { - this.xMsLegalHold = Boolean.parseBoolean(xMsLegalHold); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); } else { - this.xMsLegalHold = null; + this.date = null; } - Map xMsMetaHeaderCollection = new LinkedHashMap<>(); - Map xMsOrHeaderCollection = new LinkedHashMap<>(); + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); + Map metadataHeaderCollection = new LinkedHashMap<>(); + Map objectReplicationRulesHeaderCollection = new LinkedHashMap<>(); rawHeaders.stream().forEach(header -> { String headerName = header.getName(); - if (headerName.startsWith("x-ms-meta-")) { - xMsMetaHeaderCollection.put(headerName.substring(10), header.getValue()); + String headerNameLowerCase = headerName.toLowerCase(Locale.ROOT); + if (headerNameLowerCase.startsWith("x-ms-meta-")) { + metadataHeaderCollection.put(headerName.substring(10), header.getValue()); return; } - if (headerName.startsWith("x-ms-or-")) { - xMsOrHeaderCollection.put(headerName.substring(8), header.getValue()); + if (headerNameLowerCase.startsWith("x-ms-or-")) { + objectReplicationRulesHeaderCollection.put(headerName.substring(8), header.getValue()); } }); - this.xMsMeta = xMsMetaHeaderCollection; - this.xMsOr = xMsOrHeaderCollection; - } - - /** - * Get the lastModified property: The Last-Modified property. - * - * @return the lastModified value. - */ - @Generated - public OffsetDateTime getLastModified() { - if (this.lastModified == null) { - return null; - } - return this.lastModified.getDateTime(); - } - - /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsCreationTime property: The x-ms-creation-time property. - * - * @return the xMsCreationTime value. - */ - @Generated - public OffsetDateTime getXMsCreationTime() { - if (this.xMsCreationTime == null) { - return null; - } - return this.xMsCreationTime.getDateTime(); - } - - /** - * Set the xMsCreationTime property: The x-ms-creation-time property. - * - * @param xMsCreationTime the xMsCreationTime value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setXMsCreationTime(OffsetDateTime xMsCreationTime) { - if (xMsCreationTime == null) { - this.xMsCreationTime = null; - } else { - this.xMsCreationTime = new DateTimeRfc1123(xMsCreationTime); - } - return this; - } - - /** - * Get the xMsMeta property: The x-ms-meta- property. - * - * @return the xMsMeta value. - */ - @Generated - public Map getXMsMeta() { - return this.xMsMeta; - } - - /** - * Set the xMsMeta property: The x-ms-meta- property. - * - * @param xMsMeta the xMsMeta value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setXMsMeta(Map xMsMeta) { - this.xMsMeta = xMsMeta; - return this; - } - - /** - * Get the xMsOrPolicyId property: The x-ms-or-policy-id property. - * - * @return the xMsOrPolicyId value. - */ - @Generated - public String getXMsOrPolicyId() { - return this.xMsOrPolicyId; - } - - /** - * Set the xMsOrPolicyId property: The x-ms-or-policy-id property. - * - * @param xMsOrPolicyId the xMsOrPolicyId value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setXMsOrPolicyId(String xMsOrPolicyId) { - this.xMsOrPolicyId = xMsOrPolicyId; - return this; - } - - /** - * Get the xMsOr property: The x-ms-or- property. - * - * @return the xMsOr value. - */ - @Generated - public Map getXMsOr() { - return this.xMsOr; + this.metadata = metadataHeaderCollection; + this.objectReplicationRules = objectReplicationRulesHeaderCollection; } /** - * Set the xMsOr property: The x-ms-or- property. + * Get the contentType property: The Content-Type property. * - * @param xMsOr the xMsOr value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the contentType value. */ @Generated - public BlobsGetPropertiesHeaders setXMsOr(Map xMsOr) { - this.xMsOr = xMsOr; - return this; + public String getContentType() { + return this.contentType; } /** - * Get the xMsBlobType property: The x-ms-blob-type property. + * Get the metadata property: The x-ms-meta- property. * - * @return the xMsBlobType value. + * @return the metadata value. */ @Generated - public BlobType getXMsBlobType() { - return this.xMsBlobType; + public Map getMetadata() { + return this.metadata; } /** - * Set the xMsBlobType property: The x-ms-blob-type property. + * Get the objectReplicationRules property: The x-ms-or- property. * - * @param xMsBlobType the xMsBlobType value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the objectReplicationRules value. */ @Generated - public BlobsGetPropertiesHeaders setXMsBlobType(BlobType xMsBlobType) { - this.xMsBlobType = xMsBlobType; - return this; + public Map getObjectReplicationRules() { + return this.objectReplicationRules; } /** - * Get the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. + * Get the lastModified property: The Last-Modified property. * - * @return the xMsCopyCompletionTime value. + * @return the lastModified value. */ @Generated - public OffsetDateTime getXMsCopyCompletionTime() { - if (this.xMsCopyCompletionTime == null) { + public OffsetDateTime getLastModified() { + if (this.lastModified == null) { return null; } - return this.xMsCopyCompletionTime.getDateTime(); + return this.lastModified.getDateTime(); } /** - * Set the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. + * Get the creationTime property: The x-ms-creation-time property. * - * @param xMsCopyCompletionTime the xMsCopyCompletionTime value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the creationTime value. */ @Generated - public BlobsGetPropertiesHeaders setXMsCopyCompletionTime(OffsetDateTime xMsCopyCompletionTime) { - if (xMsCopyCompletionTime == null) { - this.xMsCopyCompletionTime = null; - } else { - this.xMsCopyCompletionTime = new DateTimeRfc1123(xMsCopyCompletionTime); + public OffsetDateTime getCreationTime() { + if (this.creationTime == null) { + return null; } - return this; + return this.creationTime.getDateTime(); } /** - * Get the xMsCopyStatusDescription property: The x-ms-copy-status-description property. + * Get the objectReplicationPolicyId property: The x-ms-or-policy-id property. * - * @return the xMsCopyStatusDescription value. + * @return the objectReplicationPolicyId value. */ @Generated - public String getXMsCopyStatusDescription() { - return this.xMsCopyStatusDescription; + public String getObjectReplicationPolicyId() { + return this.objectReplicationPolicyId; } /** - * Set the xMsCopyStatusDescription property: The x-ms-copy-status-description property. + * Get the blobType property: The x-ms-blob-type property. * - * @param xMsCopyStatusDescription the xMsCopyStatusDescription value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the blobType value. */ @Generated - public BlobsGetPropertiesHeaders setXMsCopyStatusDescription(String xMsCopyStatusDescription) { - this.xMsCopyStatusDescription = xMsCopyStatusDescription; - return this; + public BlobType getBlobType() { + return this.blobType; } /** - * Get the xMsCopyId property: The x-ms-copy-id property. + * Get the copyCompletionTime property: The x-ms-copy-completion-time property. * - * @return the xMsCopyId value. + * @return the copyCompletionTime value. */ @Generated - public String getXMsCopyId() { - return this.xMsCopyId; - } - - /** - * Set the xMsCopyId property: The x-ms-copy-id property. - * - * @param xMsCopyId the xMsCopyId value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setXMsCopyId(String xMsCopyId) { - this.xMsCopyId = xMsCopyId; - return this; - } - - /** - * Get the xMsCopyProgress property: The x-ms-copy-progress property. - * - * @return the xMsCopyProgress value. - */ - @Generated - public String getXMsCopyProgress() { - return this.xMsCopyProgress; - } - - /** - * Set the xMsCopyProgress property: The x-ms-copy-progress property. - * - * @param xMsCopyProgress the xMsCopyProgress value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setXMsCopyProgress(String xMsCopyProgress) { - this.xMsCopyProgress = xMsCopyProgress; - return this; - } - - /** - * Get the xMsCopySource property: The x-ms-copy-source property. - * - * @return the xMsCopySource value. - */ - @Generated - public String getXMsCopySource() { - return this.xMsCopySource; - } - - /** - * Set the xMsCopySource property: The x-ms-copy-source property. - * - * @param xMsCopySource the xMsCopySource value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setXMsCopySource(String xMsCopySource) { - this.xMsCopySource = xMsCopySource; - return this; - } - - /** - * Get the xMsCopyStatus property: The x-ms-copy-status property. - * - * @return the xMsCopyStatus value. - */ - @Generated - public CopyStatusType getXMsCopyStatus() { - return this.xMsCopyStatus; - } - - /** - * Set the xMsCopyStatus property: The x-ms-copy-status property. - * - * @param xMsCopyStatus the xMsCopyStatus value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) { - this.xMsCopyStatus = xMsCopyStatus; - return this; + public OffsetDateTime getCopyCompletionTime() { + if (this.copyCompletionTime == null) { + return null; + } + return this.copyCompletionTime.getDateTime(); } /** - * Get the xMsIncrementalCopy property: The x-ms-incremental-copy property. + * Get the copyStatusDescription property: The x-ms-copy-status-description property. * - * @return the xMsIncrementalCopy value. + * @return the copyStatusDescription value. */ @Generated - public Boolean isXMsIncrementalCopy() { - return this.xMsIncrementalCopy; + public String getCopyStatusDescription() { + return this.copyStatusDescription; } /** - * Set the xMsIncrementalCopy property: The x-ms-incremental-copy property. + * Get the copyId property: The x-ms-copy-id property. * - * @param xMsIncrementalCopy the xMsIncrementalCopy value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the copyId value. */ @Generated - public BlobsGetPropertiesHeaders setXMsIncrementalCopy(Boolean xMsIncrementalCopy) { - this.xMsIncrementalCopy = xMsIncrementalCopy; - return this; + public String getCopyId() { + return this.copyId; } /** - * Get the xMsCopyDestinationSnapshot property: The x-ms-copy-destination-snapshot property. + * Get the copyProgress property: The x-ms-copy-progress property. * - * @return the xMsCopyDestinationSnapshot value. + * @return the copyProgress value. */ @Generated - public String getXMsCopyDestinationSnapshot() { - return this.xMsCopyDestinationSnapshot; + public String getCopyProgress() { + return this.copyProgress; } /** - * Set the xMsCopyDestinationSnapshot property: The x-ms-copy-destination-snapshot property. + * Get the copyStatus property: The x-ms-copy-status property. * - * @param xMsCopyDestinationSnapshot the xMsCopyDestinationSnapshot value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the copyStatus value. */ @Generated - public BlobsGetPropertiesHeaders setXMsCopyDestinationSnapshot(String xMsCopyDestinationSnapshot) { - this.xMsCopyDestinationSnapshot = xMsCopyDestinationSnapshot; - return this; + public CopyStatusType getCopyStatus() { + return this.copyStatus; } /** - * Get the xMsLeaseDuration property: The x-ms-lease-duration property. + * Get the copySource property: The x-ms-copy-source property. * - * @return the xMsLeaseDuration value. + * @return the copySource value. */ @Generated - public LeaseDurationType getXMsLeaseDuration() { - return this.xMsLeaseDuration; + public String getCopySource() { + return this.copySource; } /** - * Set the xMsLeaseDuration property: The x-ms-lease-duration property. + * Get the isIncrementalCopy property: The x-ms-incremental-copy property. * - * @param xMsLeaseDuration the xMsLeaseDuration value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the isIncrementalCopy value. */ @Generated - public BlobsGetPropertiesHeaders setXMsLeaseDuration(LeaseDurationType xMsLeaseDuration) { - this.xMsLeaseDuration = xMsLeaseDuration; - return this; + public Boolean isIncrementalCopy() { + return this.isIncrementalCopy; } /** - * Get the xMsLeaseState property: The x-ms-lease-state property. + * Get the destinationSnapshot property: The x-ms-copy-destination-snapshot property. * - * @return the xMsLeaseState value. + * @return the destinationSnapshot value. */ @Generated - public LeaseStateType getXMsLeaseState() { - return this.xMsLeaseState; + public String getDestinationSnapshot() { + return this.destinationSnapshot; } /** - * Set the xMsLeaseState property: The x-ms-lease-state property. + * Get the duration property: The x-ms-lease-duration property. * - * @param xMsLeaseState the xMsLeaseState value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the duration value. */ @Generated - public BlobsGetPropertiesHeaders setXMsLeaseState(LeaseStateType xMsLeaseState) { - this.xMsLeaseState = xMsLeaseState; - return this; + public LeaseDurationType getDuration() { + return this.duration; } /** - * Get the xMsLeaseStatus property: The x-ms-lease-status property. + * Get the leaseState property: The x-ms-lease-state property. * - * @return the xMsLeaseStatus value. + * @return the leaseState value. */ @Generated - public LeaseStatusType getXMsLeaseStatus() { - return this.xMsLeaseStatus; + public LeaseStateType getLeaseState() { + return this.leaseState; } /** - * Set the xMsLeaseStatus property: The x-ms-lease-status property. + * Get the leaseStatus property: The x-ms-lease-status property. * - * @param xMsLeaseStatus the xMsLeaseStatus value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the leaseStatus value. */ @Generated - public BlobsGetPropertiesHeaders setXMsLeaseStatus(LeaseStatusType xMsLeaseStatus) { - this.xMsLeaseStatus = xMsLeaseStatus; - return this; + public LeaseStatusType getLeaseStatus() { + return this.leaseStatus; } /** @@ -1008,40 +816,6 @@ public Long getContentLength() { return this.contentLength; } - /** - * Set the contentLength property: The Content-Length property. - * - * @param contentLength the contentLength value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setContentLength(Long contentLength) { - this.contentLength = contentLength; - return this; - } - - /** - * Get the contentType property: The Content-Type property. - * - * @return the contentType value. - */ - @Generated - public String getContentType() { - return this.contentType; - } - - /** - * Set the contentType property: The Content-Type property. - * - * @param contentType the contentType value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setContentType(String contentType) { - this.contentType = contentType; - return this; - } - /** * Get the eTag property: The ETag property. * @@ -1053,37 +827,13 @@ public String getETag() { } /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the contentMD5 property: The Content-MD5 property. - * - * @return the contentMD5 value. - */ - @Generated - public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); - } - - /** - * Set the contentMD5 property: The Content-MD5 property. + * Get the contentMd5 property: The Content-MD5 property. * - * @param contentMD5 the contentMD5 value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the contentMd5 value. */ @Generated - public BlobsGetPropertiesHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); - return this; + public byte[] getContentMd5() { + return CoreUtils.clone(this.contentMd5); } /** @@ -1096,18 +846,6 @@ public String getContentEncoding() { return this.contentEncoding; } - /** - * Set the contentEncoding property: The Content-Encoding property. - * - * @param contentEncoding the contentEncoding value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setContentEncoding(String contentEncoding) { - this.contentEncoding = contentEncoding; - return this; - } - /** * Get the contentDisposition property: The Content-Disposition property. * @@ -1118,18 +856,6 @@ public String getContentDisposition() { return this.contentDisposition; } - /** - * Set the contentDisposition property: The Content-Disposition property. - * - * @param contentDisposition the contentDisposition value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setContentDisposition(String contentDisposition) { - this.contentDisposition = contentDisposition; - return this; - } - /** * Get the contentLanguage property: The Content-Language property. * @@ -1140,18 +866,6 @@ public String getContentLanguage() { return this.contentLanguage; } - /** - * Set the contentLanguage property: The Content-Language property. - * - * @param contentLanguage the contentLanguage value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setContentLanguage(String contentLanguage) { - this.contentLanguage = contentLanguage; - return this; - } - /** * Get the cacheControl property: The Cache-Control property. * @@ -1163,132 +877,13 @@ public String getCacheControl() { } /** - * Set the cacheControl property: The Cache-Control property. - * - * @param cacheControl the cacheControl value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setCacheControl(String cacheControl) { - this.cacheControl = cacheControl; - return this; - } - - /** - * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * - * @return the xMsBlobSequenceNumber value. - */ - @Generated - public Long getXMsBlobSequenceNumber() { - return this.xMsBlobSequenceNumber; - } - - /** - * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * - * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { - this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the date property: The Date property. - * - * @return the date value. - */ - @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); - } - - /** - * Set the date property: The Date property. + * Get the blobSequenceNumber property: The x-ms-blob-sequence-number property. * - * @param date the date value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the blobSequenceNumber value. */ @Generated - public BlobsGetPropertiesHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public Long getBlobSequenceNumber() { + return this.blobSequenceNumber; } /** @@ -1302,461 +897,247 @@ public String getAcceptRanges() { } /** - * Set the acceptRanges property: The Accept-Ranges property. - * - * @param acceptRanges the acceptRanges value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setAcceptRanges(String acceptRanges) { - this.acceptRanges = acceptRanges; - return this; - } - - /** - * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * - * @return the xMsBlobCommittedBlockCount value. - */ - @Generated - public Integer getXMsBlobCommittedBlockCount() { - return this.xMsBlobCommittedBlockCount; - } - - /** - * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * - * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCommittedBlockCount) { - this.xMsBlobCommittedBlockCount = xMsBlobCommittedBlockCount; - return this; - } - - /** - * Get the xMsServerEncrypted property: The x-ms-server-encrypted property. - * - * @return the xMsServerEncrypted value. - */ - @Generated - public Boolean isXMsServerEncrypted() { - return this.xMsServerEncrypted; - } - - /** - * Set the xMsServerEncrypted property: The x-ms-server-encrypted property. - * - * @param xMsServerEncrypted the xMsServerEncrypted value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setXMsServerEncrypted(Boolean xMsServerEncrypted) { - this.xMsServerEncrypted = xMsServerEncrypted; - return this; - } - - /** - * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @return the xMsEncryptionKeySha256 value. - */ - @Generated - public String getXMsEncryptionKeySha256() { - return this.xMsEncryptionKeySha256; - } - - /** - * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { - this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; - return this; - } - - /** - * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * - * @return the xMsEncryptionScope value. - */ - @Generated - public String getXMsEncryptionScope() { - return this.xMsEncryptionScope; - } - - /** - * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. + * Get the blobCommittedBlockCount property: The x-ms-blob-committed-block-count property. * - * @param xMsEncryptionScope the xMsEncryptionScope value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the blobCommittedBlockCount value. */ @Generated - public BlobsGetPropertiesHeaders setXMsEncryptionScope(String xMsEncryptionScope) { - this.xMsEncryptionScope = xMsEncryptionScope; - return this; + public Integer getBlobCommittedBlockCount() { + return this.blobCommittedBlockCount; } /** - * Get the xMsAccessTier property: The x-ms-access-tier property. + * Get the isServerEncrypted property: The x-ms-server-encrypted property. * - * @return the xMsAccessTier value. + * @return the isServerEncrypted value. */ @Generated - public String getXMsAccessTier() { - return this.xMsAccessTier; + public Boolean isServerEncrypted() { + return this.isServerEncrypted; } /** - * Set the xMsAccessTier property: The x-ms-access-tier property. + * Get the encryptionKeySha256 property: The x-ms-encryption-key-sha256 property. * - * @param xMsAccessTier the xMsAccessTier value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the encryptionKeySha256 value. */ @Generated - public BlobsGetPropertiesHeaders setXMsAccessTier(String xMsAccessTier) { - this.xMsAccessTier = xMsAccessTier; - return this; + public String getEncryptionKeySha256() { + return this.encryptionKeySha256; } /** - * Get the xMsAccessTierInferred property: The x-ms-access-tier-inferred property. + * Get the encryptionScope property: The x-ms-encryption-scope property. * - * @return the xMsAccessTierInferred value. + * @return the encryptionScope value. */ @Generated - public Boolean isXMsAccessTierInferred() { - return this.xMsAccessTierInferred; + public String getEncryptionScope() { + return this.encryptionScope; } /** - * Set the xMsAccessTierInferred property: The x-ms-access-tier-inferred property. + * Get the accessTier property: The x-ms-access-tier property. * - * @param xMsAccessTierInferred the xMsAccessTierInferred value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the accessTier value. */ @Generated - public BlobsGetPropertiesHeaders setXMsAccessTierInferred(Boolean xMsAccessTierInferred) { - this.xMsAccessTierInferred = xMsAccessTierInferred; - return this; + public String getAccessTier() { + return this.accessTier; } /** - * Get the xMsArchiveStatus property: The x-ms-archive-status property. + * Get the accessTierInferred property: The x-ms-access-tier-inferred property. * - * @return the xMsArchiveStatus value. + * @return the accessTierInferred value. */ @Generated - public String getXMsArchiveStatus() { - return this.xMsArchiveStatus; + public Boolean isAccessTierInferred() { + return this.accessTierInferred; } /** - * Set the xMsArchiveStatus property: The x-ms-archive-status property. + * Get the archiveStatus property: The x-ms-archive-status property. * - * @param xMsArchiveStatus the xMsArchiveStatus value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the archiveStatus value. */ @Generated - public BlobsGetPropertiesHeaders setXMsArchiveStatus(String xMsArchiveStatus) { - this.xMsArchiveStatus = xMsArchiveStatus; - return this; + public ArchiveStatus getArchiveStatus() { + return this.archiveStatus; } /** - * Get the xMsAccessTierChangeTime property: The x-ms-access-tier-change-time property. + * Get the accessTierChangeTime property: The x-ms-access-tier-change-time property. * - * @return the xMsAccessTierChangeTime value. + * @return the accessTierChangeTime value. */ @Generated - public OffsetDateTime getXMsAccessTierChangeTime() { - if (this.xMsAccessTierChangeTime == null) { + public OffsetDateTime getAccessTierChangeTime() { + if (this.accessTierChangeTime == null) { return null; } - return this.xMsAccessTierChangeTime.getDateTime(); - } - - /** - * Set the xMsAccessTierChangeTime property: The x-ms-access-tier-change-time property. - * - * @param xMsAccessTierChangeTime the xMsAccessTierChangeTime value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setXMsAccessTierChangeTime(OffsetDateTime xMsAccessTierChangeTime) { - if (xMsAccessTierChangeTime == null) { - this.xMsAccessTierChangeTime = null; - } else { - this.xMsAccessTierChangeTime = new DateTimeRfc1123(xMsAccessTierChangeTime); - } - return this; - } - - /** - * Get the xMsSmartAccessTier property: The x-ms-smart-access-tier property. - * - * @return the xMsSmartAccessTier value. - */ - @Generated - public String getXMsSmartAccessTier() { - return this.xMsSmartAccessTier; - } - - /** - * Set the xMsSmartAccessTier property: The x-ms-smart-access-tier property. - * - * @param xMsSmartAccessTier the xMsSmartAccessTier value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setXMsSmartAccessTier(String xMsSmartAccessTier) { - this.xMsSmartAccessTier = xMsSmartAccessTier; - return this; - } - - /** - * Get the xMsVersionId property: The x-ms-version-id property. - * - * @return the xMsVersionId value. - */ - @Generated - public String getXMsVersionId() { - return this.xMsVersionId; - } - - /** - * Set the xMsVersionId property: The x-ms-version-id property. - * - * @param xMsVersionId the xMsVersionId value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setXMsVersionId(String xMsVersionId) { - this.xMsVersionId = xMsVersionId; - return this; + return this.accessTierChangeTime.getDateTime(); } /** - * Get the xMsIsCurrentVersion property: The x-ms-is-current-version property. + * Get the smartAccessTier property: The x-ms-smart-access-tier property. * - * @return the xMsIsCurrentVersion value. + * @return the smartAccessTier value. */ @Generated - public Boolean isXMsIsCurrentVersion() { - return this.xMsIsCurrentVersion; + public String getSmartAccessTier() { + return this.smartAccessTier; } /** - * Set the xMsIsCurrentVersion property: The x-ms-is-current-version property. + * Get the versionId property: The x-ms-version-id property. * - * @param xMsIsCurrentVersion the xMsIsCurrentVersion value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the versionId value. */ @Generated - public BlobsGetPropertiesHeaders setXMsIsCurrentVersion(Boolean xMsIsCurrentVersion) { - this.xMsIsCurrentVersion = xMsIsCurrentVersion; - return this; + public String getVersionId() { + return this.versionId; } /** - * Get the xMsTagCount property: The x-ms-tag-count property. + * Get the isCurrentVersion property: The x-ms-is-current-version property. * - * @return the xMsTagCount value. + * @return the isCurrentVersion value. */ @Generated - public Long getXMsTagCount() { - return this.xMsTagCount; + public Boolean isCurrentVersion() { + return this.isCurrentVersion; } /** - * Set the xMsTagCount property: The x-ms-tag-count property. + * Get the tagCount property: The x-ms-tag-count property. * - * @param xMsTagCount the xMsTagCount value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the tagCount value. */ @Generated - public BlobsGetPropertiesHeaders setXMsTagCount(Long xMsTagCount) { - this.xMsTagCount = xMsTagCount; - return this; + public Long getTagCount() { + return this.tagCount; } /** - * Get the xMsExpiryTime property: The x-ms-expiry-time property. + * Get the expiresOn property: The x-ms-expiry-time property. * - * @return the xMsExpiryTime value. + * @return the expiresOn value. */ @Generated - public OffsetDateTime getXMsExpiryTime() { - if (this.xMsExpiryTime == null) { + public OffsetDateTime getExpiresOn() { + if (this.expiresOn == null) { return null; } - return this.xMsExpiryTime.getDateTime(); - } - - /** - * Set the xMsExpiryTime property: The x-ms-expiry-time property. - * - * @param xMsExpiryTime the xMsExpiryTime value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setXMsExpiryTime(OffsetDateTime xMsExpiryTime) { - if (xMsExpiryTime == null) { - this.xMsExpiryTime = null; - } else { - this.xMsExpiryTime = new DateTimeRfc1123(xMsExpiryTime); - } - return this; - } - - /** - * Get the xMsBlobSealed property: The x-ms-blob-sealed property. - * - * @return the xMsBlobSealed value. - */ - @Generated - public Boolean isXMsBlobSealed() { - return this.xMsBlobSealed; - } - - /** - * Set the xMsBlobSealed property: The x-ms-blob-sealed property. - * - * @param xMsBlobSealed the xMsBlobSealed value to set. - * @return the BlobsGetPropertiesHeaders object itself. - */ - @Generated - public BlobsGetPropertiesHeaders setXMsBlobSealed(Boolean xMsBlobSealed) { - this.xMsBlobSealed = xMsBlobSealed; - return this; + return this.expiresOn.getDateTime(); } /** - * Get the xMsRehydratePriority property: The x-ms-rehydrate-priority property. + * Get the isSealed property: The x-ms-blob-sealed property. * - * @return the xMsRehydratePriority value. + * @return the isSealed value. */ @Generated - public String getXMsRehydratePriority() { - return this.xMsRehydratePriority; + public Boolean isSealed() { + return this.isSealed; } /** - * Set the xMsRehydratePriority property: The x-ms-rehydrate-priority property. + * Get the rehydratePriority property: The x-ms-rehydrate-priority property. * - * @param xMsRehydratePriority the xMsRehydratePriority value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the rehydratePriority value. */ @Generated - public BlobsGetPropertiesHeaders setXMsRehydratePriority(String xMsRehydratePriority) { - this.xMsRehydratePriority = xMsRehydratePriority; - return this; + public RehydratePriority getRehydratePriority() { + return this.rehydratePriority; } /** - * Get the xMsLastAccessTime property: The x-ms-last-access-time property. + * Get the lastAccessed property: The x-ms-last-access-time property. * - * @return the xMsLastAccessTime value. + * @return the lastAccessed value. */ @Generated - public OffsetDateTime getXMsLastAccessTime() { - if (this.xMsLastAccessTime == null) { + public OffsetDateTime getLastAccessed() { + if (this.lastAccessed == null) { return null; } - return this.xMsLastAccessTime.getDateTime(); + return this.lastAccessed.getDateTime(); } /** - * Set the xMsLastAccessTime property: The x-ms-last-access-time property. + * Get the immutabilityPolicyExpiresOn property: The x-ms-immutability-policy-until-date property. * - * @param xMsLastAccessTime the xMsLastAccessTime value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the immutabilityPolicyExpiresOn value. */ @Generated - public BlobsGetPropertiesHeaders setXMsLastAccessTime(OffsetDateTime xMsLastAccessTime) { - if (xMsLastAccessTime == null) { - this.xMsLastAccessTime = null; - } else { - this.xMsLastAccessTime = new DateTimeRfc1123(xMsLastAccessTime); + public OffsetDateTime getImmutabilityPolicyExpiresOn() { + if (this.immutabilityPolicyExpiresOn == null) { + return null; } - return this; + return this.immutabilityPolicyExpiresOn.getDateTime(); } /** - * Get the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. + * Get the immutabilityPolicyMode property: The x-ms-immutability-policy-mode property. * - * @return the xMsImmutabilityPolicyUntilDate value. + * @return the immutabilityPolicyMode value. */ @Generated - public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { - if (this.xMsImmutabilityPolicyUntilDate == null) { - return null; - } - return this.xMsImmutabilityPolicyUntilDate.getDateTime(); + public BlobImmutabilityPolicyMode getImmutabilityPolicyMode() { + return this.immutabilityPolicyMode; } /** - * Set the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. + * Get the legalHold property: The x-ms-legal-hold property. * - * @param xMsImmutabilityPolicyUntilDate the xMsImmutabilityPolicyUntilDate value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the legalHold value. */ @Generated - public BlobsGetPropertiesHeaders setXMsImmutabilityPolicyUntilDate(OffsetDateTime xMsImmutabilityPolicyUntilDate) { - if (xMsImmutabilityPolicyUntilDate == null) { - this.xMsImmutabilityPolicyUntilDate = null; - } else { - this.xMsImmutabilityPolicyUntilDate = new DateTimeRfc1123(xMsImmutabilityPolicyUntilDate); - } - return this; + public Boolean isLegalHold() { + return this.legalHold; } /** - * Get the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. + * Get the date property: The Date property. * - * @return the xMsImmutabilityPolicyMode value. + * @return the date value. */ @Generated - public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { - return this.xMsImmutabilityPolicyMode; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. + * Get the version property: The x-ms-version property. * - * @param xMsImmutabilityPolicyMode the xMsImmutabilityPolicyMode value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the version value. */ @Generated - public BlobsGetPropertiesHeaders - setXMsImmutabilityPolicyMode(BlobImmutabilityPolicyMode xMsImmutabilityPolicyMode) { - this.xMsImmutabilityPolicyMode = xMsImmutabilityPolicyMode; - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsLegalHold property: The x-ms-legal-hold property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsLegalHold value. + * @return the requestId value. */ @Generated - public Boolean isXMsLegalHold() { - return this.xMsLegalHold; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsLegalHold property: The x-ms-legal-hold property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsLegalHold the xMsLegalHold value to set. - * @return the BlobsGetPropertiesHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlobsGetPropertiesHeaders setXMsLegalHold(Boolean xMsLegalHold) { - this.xMsLegalHold = xMsLegalHold; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 8c84674c25d86..940480e302965 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,31 +14,31 @@ /** * The BlobsGetTagsHeaders model. */ -@Fluent +@Immutable public final class BlobsGetTagsHeaders { /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -49,109 +49,57 @@ public final class BlobsGetTagsHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsGetTagsHeaders(HttpHeaders rawHeaders) { - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsGetTagsHeaders object itself. - */ - @Generated - public BlobsGetTagsHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsGetTagsHeaders object itself. - */ - @Generated - public BlobsGetTagsHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsGetTagsHeaders object itself. + * @return the version value. */ @Generated - public BlobsGetTagsHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the BlobsGetTagsHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlobsGetTagsHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 89378122e0a80..e912e1a121fd0 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 @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; @@ -18,6 +17,7 @@ import java.time.OffsetDateTime; import java.util.Base64; import java.util.LinkedHashMap; +import java.util.Locale; import java.util.Map; /** @@ -25,29 +25,24 @@ */ @Fluent public final class BlobsQueryHeaders { - /* - * The Last-Modified property. - */ - @Generated - private DateTimeRfc1123 lastModified; /* * The x-ms-meta- property. */ @Generated - private Map xMsMeta; + private Map metadata; /* - * The Content-Length property. + * The Last-Modified property. */ @Generated - private Long contentLength; + private DateTimeRfc1123 lastModified; /* - * The Content-Type property. + * The Content-Length property. */ @Generated - private String contentType; + private Long contentLength; /* * The Content-Range property. @@ -65,7 +60,7 @@ public final class BlobsQueryHeaders { * The Content-MD5 property. */ @Generated - private byte[] contentMD5; + private byte[] contentMd5; /* * The Content-Encoding property. @@ -95,139 +90,141 @@ public final class BlobsQueryHeaders { * The x-ms-blob-sequence-number property. */ @Generated - private Long xMsBlobSequenceNumber; + private Long blobSequenceNumber; /* * The x-ms-blob-type property. */ @Generated - private BlobType xMsBlobType; + private BlobType blobType; + + /* + * The x-ms-content-crc64 property. + */ + @Generated + private byte[] contentCrc64; /* * The x-ms-copy-completion-time property. */ @Generated - private DateTimeRfc1123 xMsCopyCompletionTime; + private DateTimeRfc1123 copyCompletionTime; /* * The x-ms-copy-status-description property. */ @Generated - private String xMsCopyStatusDescription; + private String copyStatusDescription; /* * The x-ms-copy-id property. */ @Generated - private String xMsCopyId; + private String copyId; /* * The x-ms-copy-progress property. */ @Generated - private String xMsCopyProgress; + private String copyProgress; /* * The x-ms-copy-source property. */ @Generated - private String xMsCopySource; + private String copySource; /* * The x-ms-copy-status property. */ @Generated - private CopyStatusType xMsCopyStatus; + private CopyStatusType copyStatus; /* * The x-ms-lease-duration property. */ @Generated - private LeaseDurationType xMsLeaseDuration; + private LeaseDurationType duration; /* * The x-ms-lease-state property. */ @Generated - private LeaseStateType xMsLeaseState; + private LeaseStateType leaseState; /* * The x-ms-lease-status property. */ @Generated - private LeaseStatusType xMsLeaseStatus; + private LeaseStatusType leaseStatus; /* - * The x-ms-client-request-id property. - */ - @Generated - private String xMsClientRequestId; - - /* - * The x-ms-request-id property. + * The Accept-Ranges property. */ @Generated - private String xMsRequestId; + private String acceptRanges; /* - * The x-ms-version property. + * The x-ms-blob-committed-block-count property. */ @Generated - private String xMsVersion; + private Integer blobCommittedBlockCount; /* - * The Accept-Ranges property. + * The x-ms-server-encrypted property. */ @Generated - private String acceptRanges; + private Boolean isServerEncrypted; /* - * The Date property. + * The x-ms-encryption-key-sha256 property. */ @Generated - private DateTimeRfc1123 date; + private String encryptionKeySha256; /* - * The x-ms-blob-committed-block-count property. + * The x-ms-encryption-scope property. */ @Generated - private Integer xMsBlobCommittedBlockCount; + private String encryptionScope; /* - * The x-ms-server-encrypted property. + * The x-ms-blob-content-md5 property. */ @Generated - private Boolean xMsServerEncrypted; + private byte[] blobContentMd5; /* - * The x-ms-encryption-key-sha256 property. + * The Date property. */ @Generated - private String xMsEncryptionKeySha256; + private DateTimeRfc1123 date; /* - * The x-ms-encryption-scope property. + * The x-ms-version property. */ @Generated - private String xMsEncryptionScope; + private String version; /* - * The x-ms-blob-content-md5 property. + * The x-ms-request-id property. */ @Generated - private byte[] xMsBlobContentMd5; + private String requestId; /* - * The x-ms-content-crc64 property. + * The x-ms-client-request-id property. */ @Generated - private byte[] xMsContentCrc64; + private String clientRequestId; private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER = HttpHeaderName.fromString("x-ms-blob-sequence-number"); private static final HttpHeaderName X_MS_BLOB_TYPE = HttpHeaderName.fromString("x-ms-blob-type"); + private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); + private static final HttpHeaderName X_MS_COPY_COMPLETION_TIME = HttpHeaderName.fromString("x-ms-copy-completion-time"); @@ -248,8 +245,6 @@ public final class BlobsQueryHeaders { 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_BLOB_COMMITTED_BLOCK_COUNT = HttpHeaderName.fromString("x-ms-blob-committed-block-count"); @@ -262,12 +257,12 @@ public final class BlobsQueryHeaders { private static final HttpHeaderName X_MS_BLOB_CONTENT_MD5 = HttpHeaderName.fromString("x-ms-blob-content-md5"); - private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); // 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) { @@ -283,166 +278,161 @@ public BlobsQueryHeaders(HttpHeaders rawHeaders) { } else { this.contentLength = null; } - this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); this.contentRange = rawHeaders.getValue(HttpHeaderName.CONTENT_RANGE); this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); - String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); - if (contentMD5 != null) { - this.contentMD5 = Base64.getDecoder().decode(contentMD5); + String contentMd5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMd5 != null) { + this.contentMd5 = Base64.getDecoder().decode(contentMd5); } else { - this.contentMD5 = null; + this.contentMd5 = null; } this.contentEncoding = rawHeaders.getValue(HttpHeaderName.CONTENT_ENCODING); this.cacheControl = rawHeaders.getValue(HttpHeaderName.CACHE_CONTROL); this.contentDisposition = rawHeaders.getValue(HttpHeaderName.CONTENT_DISPOSITION); this.contentLanguage = rawHeaders.getValue(HttpHeaderName.CONTENT_LANGUAGE); - String xMsBlobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); - if (xMsBlobSequenceNumber != null) { - this.xMsBlobSequenceNumber = Long.parseLong(xMsBlobSequenceNumber); + String blobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); + if (blobSequenceNumber != null) { + this.blobSequenceNumber = Long.parseLong(blobSequenceNumber); } else { - this.xMsBlobSequenceNumber = null; + this.blobSequenceNumber = null; } - String xMsBlobType = rawHeaders.getValue(X_MS_BLOB_TYPE); - if (xMsBlobType != null) { - this.xMsBlobType = BlobType.fromString(xMsBlobType); + String blobType = rawHeaders.getValue(X_MS_BLOB_TYPE); + if (blobType != null) { + this.blobType = BlobType.fromString(blobType); } else { - this.xMsBlobType = null; + this.blobType = null; } - String xMsCopyCompletionTime = rawHeaders.getValue(X_MS_COPY_COMPLETION_TIME); - if (xMsCopyCompletionTime != null) { - this.xMsCopyCompletionTime = new DateTimeRfc1123(xMsCopyCompletionTime); + String contentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (contentCrc64 != null) { + this.contentCrc64 = Base64.getDecoder().decode(contentCrc64); } else { - this.xMsCopyCompletionTime = null; + this.contentCrc64 = null; } - this.xMsCopyStatusDescription = rawHeaders.getValue(X_MS_COPY_STATUS_DESCRIPTION); - this.xMsCopyId = rawHeaders.getValue(X_MS_COPY_ID); - this.xMsCopyProgress = rawHeaders.getValue(X_MS_COPY_PROGRESS); - this.xMsCopySource = rawHeaders.getValue(X_MS_COPY_SOURCE); - String xMsCopyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); - if (xMsCopyStatus != null) { - this.xMsCopyStatus = CopyStatusType.fromString(xMsCopyStatus); + String copyCompletionTime = rawHeaders.getValue(X_MS_COPY_COMPLETION_TIME); + if (copyCompletionTime != null) { + this.copyCompletionTime = new DateTimeRfc1123(copyCompletionTime); } else { - this.xMsCopyStatus = null; + this.copyCompletionTime = null; } - String xMsLeaseDuration = rawHeaders.getValue(X_MS_LEASE_DURATION); - if (xMsLeaseDuration != null) { - this.xMsLeaseDuration = LeaseDurationType.fromString(xMsLeaseDuration); + this.copyStatusDescription = rawHeaders.getValue(X_MS_COPY_STATUS_DESCRIPTION); + this.copyId = rawHeaders.getValue(X_MS_COPY_ID); + this.copyProgress = rawHeaders.getValue(X_MS_COPY_PROGRESS); + this.copySource = rawHeaders.getValue(X_MS_COPY_SOURCE); + String copyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); + if (copyStatus != null) { + this.copyStatus = CopyStatusType.fromString(copyStatus); } else { - this.xMsLeaseDuration = null; + this.copyStatus = null; } - String xMsLeaseState = rawHeaders.getValue(X_MS_LEASE_STATE); - if (xMsLeaseState != null) { - this.xMsLeaseState = LeaseStateType.fromString(xMsLeaseState); + String duration = rawHeaders.getValue(X_MS_LEASE_DURATION); + if (duration != null) { + this.duration = LeaseDurationType.fromString(duration); } else { - this.xMsLeaseState = null; + this.duration = null; } - String xMsLeaseStatus = rawHeaders.getValue(X_MS_LEASE_STATUS); - if (xMsLeaseStatus != null) { - this.xMsLeaseStatus = LeaseStatusType.fromString(xMsLeaseStatus); + String leaseState = rawHeaders.getValue(X_MS_LEASE_STATE); + if (leaseState != null) { + this.leaseState = LeaseStateType.fromString(leaseState); } else { - this.xMsLeaseStatus = null; + this.leaseState = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.acceptRanges = rawHeaders.getValue(HttpHeaderName.ACCEPT_RANGES); - String date = rawHeaders.getValue(HttpHeaderName.DATE); - if (date != null) { - this.date = new DateTimeRfc1123(date); + String leaseStatus = rawHeaders.getValue(X_MS_LEASE_STATUS); + if (leaseStatus != null) { + this.leaseStatus = LeaseStatusType.fromString(leaseStatus); } else { - this.date = null; + this.leaseStatus = null; } - String xMsBlobCommittedBlockCount = rawHeaders.getValue(X_MS_BLOB_COMMITTED_BLOCK_COUNT); - if (xMsBlobCommittedBlockCount != null) { - this.xMsBlobCommittedBlockCount = Integer.parseInt(xMsBlobCommittedBlockCount); + this.acceptRanges = rawHeaders.getValue(HttpHeaderName.ACCEPT_RANGES); + String blobCommittedBlockCount = rawHeaders.getValue(X_MS_BLOB_COMMITTED_BLOCK_COUNT); + if (blobCommittedBlockCount != null) { + this.blobCommittedBlockCount = Integer.parseInt(blobCommittedBlockCount); } else { - this.xMsBlobCommittedBlockCount = null; + this.blobCommittedBlockCount = null; } - String xMsServerEncrypted = rawHeaders.getValue(X_MS_SERVER_ENCRYPTED); - if (xMsServerEncrypted != null) { - this.xMsServerEncrypted = Boolean.parseBoolean(xMsServerEncrypted); + String isServerEncrypted = rawHeaders.getValue(X_MS_SERVER_ENCRYPTED); + if (isServerEncrypted != null) { + this.isServerEncrypted = Boolean.parseBoolean(isServerEncrypted); } else { - this.xMsServerEncrypted = null; + this.isServerEncrypted = null; } - this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); - String xMsBlobContentMd5 = rawHeaders.getValue(X_MS_BLOB_CONTENT_MD5); - if (xMsBlobContentMd5 != null) { - this.xMsBlobContentMd5 = Base64.getDecoder().decode(xMsBlobContentMd5); + this.encryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.encryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + String blobContentMd5 = rawHeaders.getValue(X_MS_BLOB_CONTENT_MD5); + if (blobContentMd5 != null) { + this.blobContentMd5 = Base64.getDecoder().decode(blobContentMd5); } else { - this.xMsBlobContentMd5 = null; + this.blobContentMd5 = null; } - String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); - if (xMsContentCrc64 != null) { - this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); } else { - this.xMsContentCrc64 = null; + this.date = null; } - Map xMsMetaHeaderCollection = new LinkedHashMap<>(); - + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); + Map metadataHeaderCollection = new LinkedHashMap<>(); rawHeaders.stream().forEach(header -> { String headerName = header.getName(); - if (headerName.startsWith("x-ms-meta-")) { - xMsMetaHeaderCollection.put(headerName.substring(10), header.getValue()); + String headerNameLowerCase = headerName.toLowerCase(Locale.ROOT); + if (headerNameLowerCase.startsWith("x-ms-meta-")) { + metadataHeaderCollection.put(headerName.substring(10), header.getValue()); } }); - this.xMsMeta = xMsMetaHeaderCollection; + this.metadata = metadataHeaderCollection; } /** - * Get the lastModified property: The Last-Modified property. - * - * @return the lastModified value. + * Get the metadata property: The x-ms-meta- property. + * + * @return the metadata value. */ @Generated - public OffsetDateTime getLastModified() { - if (this.lastModified == null) { - return null; - } - return this.lastModified.getDateTime(); + public Map getMetadata() { + return this.metadata; } /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. + * Set the metadata property. + * + * @param metadata the metadata value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } + public BlobsQueryHeaders setMetadata(Map metadata) { + this.metadata = metadata; return this; } /** - * Get the xMsMeta property: The x-ms-meta- property. - * - * @return the xMsMeta value. + * Get the lastModified property: The Last-Modified property. + * + * @return the lastModified value. */ @Generated - public Map getXMsMeta() { - return this.xMsMeta; + public OffsetDateTime getLastModified() { + if (this.lastModified == null) { + return null; + } + return this.lastModified.getDateTime(); } /** - * Set the xMsMeta property: The x-ms-meta- property. - * - * @param xMsMeta the xMsMeta value to set. + * Set the lastModified property. + * + * @param lastModified the lastModified value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsMeta(Map xMsMeta) { - this.xMsMeta = xMsMeta; + public BlobsQueryHeaders setLastModified(OffsetDateTime lastModified) { + this.lastModified = lastModified == null ? null : new DateTimeRfc1123(lastModified); return this; } /** * Get the contentLength property: The Content-Length property. - * + * * @return the contentLength value. */ @Generated @@ -451,8 +441,8 @@ public Long getContentLength() { } /** - * Set the contentLength property: The Content-Length property. - * + * Set the contentLength property. + * * @param contentLength the contentLength value to set. * @return the BlobsQueryHeaders object itself. */ @@ -462,31 +452,9 @@ public BlobsQueryHeaders setContentLength(Long contentLength) { return this; } - /** - * Get the contentType property: The Content-Type property. - * - * @return the contentType value. - */ - @Generated - public String getContentType() { - return this.contentType; - } - - /** - * Set the contentType property: The Content-Type property. - * - * @param contentType the contentType value to set. - * @return the BlobsQueryHeaders object itself. - */ - @Generated - public BlobsQueryHeaders setContentType(String contentType) { - this.contentType = contentType; - return this; - } - /** * Get the contentRange property: The Content-Range property. - * + * * @return the contentRange value. */ @Generated @@ -495,8 +463,8 @@ public String getContentRange() { } /** - * Set the contentRange property: The Content-Range property. - * + * Set the contentRange property. + * * @param contentRange the contentRange value to set. * @return the BlobsQueryHeaders object itself. */ @@ -508,7 +476,7 @@ public BlobsQueryHeaders setContentRange(String contentRange) { /** * Get the eTag property: The ETag property. - * + * * @return the eTag value. */ @Generated @@ -517,8 +485,8 @@ public String getETag() { } /** - * Set the eTag property: The ETag property. - * + * Set the eTag property. + * * @param eTag the eTag value to set. * @return the BlobsQueryHeaders object itself. */ @@ -529,30 +497,30 @@ public BlobsQueryHeaders setETag(String eTag) { } /** - * Get the contentMD5 property: The Content-MD5 property. - * - * @return the contentMD5 value. + * Get the contentMd5 property: The Content-MD5 property. + * + * @return the contentMd5 value. */ @Generated - public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + public byte[] getContentMd5() { + return CoreUtils.clone(this.contentMd5); } /** - * Set the contentMD5 property: The Content-MD5 property. - * - * @param contentMD5 the contentMD5 value to set. + * Set the contentMd5 property. + * + * @param contentMd5 the contentMd5 value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); + public BlobsQueryHeaders setContentMd5(byte[] contentMd5) { + this.contentMd5 = contentMd5; return this; } /** * Get the contentEncoding property: The Content-Encoding property. - * + * * @return the contentEncoding value. */ @Generated @@ -561,8 +529,8 @@ public String getContentEncoding() { } /** - * Set the contentEncoding property: The Content-Encoding property. - * + * Set the contentEncoding property. + * * @param contentEncoding the contentEncoding value to set. * @return the BlobsQueryHeaders object itself. */ @@ -574,7 +542,7 @@ public BlobsQueryHeaders setContentEncoding(String contentEncoding) { /** * Get the cacheControl property: The Cache-Control property. - * + * * @return the cacheControl value. */ @Generated @@ -583,8 +551,8 @@ public String getCacheControl() { } /** - * Set the cacheControl property: The Cache-Control property. - * + * Set the cacheControl property. + * * @param cacheControl the cacheControl value to set. * @return the BlobsQueryHeaders object itself. */ @@ -596,7 +564,7 @@ public BlobsQueryHeaders setCacheControl(String cacheControl) { /** * Get the contentDisposition property: The Content-Disposition property. - * + * * @return the contentDisposition value. */ @Generated @@ -605,8 +573,8 @@ public String getContentDisposition() { } /** - * Set the contentDisposition property: The Content-Disposition property. - * + * Set the contentDisposition property. + * * @param contentDisposition the contentDisposition value to set. * @return the BlobsQueryHeaders object itself. */ @@ -618,7 +586,7 @@ public BlobsQueryHeaders setContentDisposition(String contentDisposition) { /** * Get the contentLanguage property: The Content-Language property. - * + * * @return the contentLanguage value. */ @Generated @@ -627,8 +595,8 @@ public String getContentLanguage() { } /** - * Set the contentLanguage property: The Content-Language property. - * + * Set the contentLanguage property. + * * @param contentLanguage the contentLanguage value to set. * @return the BlobsQueryHeaders object itself. */ @@ -639,500 +607,492 @@ public BlobsQueryHeaders setContentLanguage(String contentLanguage) { } /** - * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * - * @return the xMsBlobSequenceNumber value. + * Get the blobSequenceNumber property: The x-ms-blob-sequence-number property. + * + * @return the blobSequenceNumber value. */ @Generated - public Long getXMsBlobSequenceNumber() { - return this.xMsBlobSequenceNumber; + public Long getBlobSequenceNumber() { + return this.blobSequenceNumber; } /** - * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * - * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. + * Set the blobSequenceNumber property. + * + * @param blobSequenceNumber the blobSequenceNumber value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { - this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; + public BlobsQueryHeaders setBlobSequenceNumber(Long blobSequenceNumber) { + this.blobSequenceNumber = blobSequenceNumber; return this; } /** - * Get the xMsBlobType property: The x-ms-blob-type property. - * - * @return the xMsBlobType value. + * Get the blobType property: The x-ms-blob-type property. + * + * @return the blobType value. */ @Generated - public BlobType getXMsBlobType() { - return this.xMsBlobType; + public BlobType getBlobType() { + return this.blobType; } /** - * Set the xMsBlobType property: The x-ms-blob-type property. - * - * @param xMsBlobType the xMsBlobType value to set. + * Set the blobType property. + * + * @param blobType the blobType value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsBlobType(BlobType xMsBlobType) { - this.xMsBlobType = xMsBlobType; + public BlobsQueryHeaders setBlobType(BlobType blobType) { + this.blobType = blobType; return this; } /** - * Get the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * - * @return the xMsCopyCompletionTime value. + * Get the contentCrc64 property: The x-ms-content-crc64 property. + * + * @return the contentCrc64 value. */ @Generated - public OffsetDateTime getXMsCopyCompletionTime() { - if (this.xMsCopyCompletionTime == null) { - return null; - } - return this.xMsCopyCompletionTime.getDateTime(); + public byte[] getContentCrc64() { + return CoreUtils.clone(this.contentCrc64); } /** - * Set the xMsCopyCompletionTime property: The x-ms-copy-completion-time property. - * - * @param xMsCopyCompletionTime the xMsCopyCompletionTime value to set. + * Set the contentCrc64 property. + * + * @param contentCrc64 the contentCrc64 value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsCopyCompletionTime(OffsetDateTime xMsCopyCompletionTime) { - if (xMsCopyCompletionTime == null) { - this.xMsCopyCompletionTime = null; - } else { - this.xMsCopyCompletionTime = new DateTimeRfc1123(xMsCopyCompletionTime); - } + public BlobsQueryHeaders setContentCrc64(byte[] contentCrc64) { + this.contentCrc64 = contentCrc64; return this; } /** - * Get the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * - * @return the xMsCopyStatusDescription value. + * Get the copyCompletionTime property: The x-ms-copy-completion-time property. + * + * @return the copyCompletionTime value. */ @Generated - public String getXMsCopyStatusDescription() { - return this.xMsCopyStatusDescription; + public OffsetDateTime getCopyCompletionTime() { + if (this.copyCompletionTime == null) { + return null; + } + return this.copyCompletionTime.getDateTime(); } /** - * Set the xMsCopyStatusDescription property: The x-ms-copy-status-description property. - * - * @param xMsCopyStatusDescription the xMsCopyStatusDescription value to set. + * Set the copyCompletionTime property. + * + * @param copyCompletionTime the copyCompletionTime value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsCopyStatusDescription(String xMsCopyStatusDescription) { - this.xMsCopyStatusDescription = xMsCopyStatusDescription; + public BlobsQueryHeaders setCopyCompletionTime(OffsetDateTime copyCompletionTime) { + this.copyCompletionTime = copyCompletionTime == null ? null : new DateTimeRfc1123(copyCompletionTime); return this; } /** - * Get the xMsCopyId property: The x-ms-copy-id property. - * - * @return the xMsCopyId value. + * Get the copyStatusDescription property: The x-ms-copy-status-description property. + * + * @return the copyStatusDescription value. */ @Generated - public String getXMsCopyId() { - return this.xMsCopyId; + public String getCopyStatusDescription() { + return this.copyStatusDescription; } /** - * Set the xMsCopyId property: The x-ms-copy-id property. - * - * @param xMsCopyId the xMsCopyId value to set. + * Set the copyStatusDescription property. + * + * @param copyStatusDescription the copyStatusDescription value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsCopyId(String xMsCopyId) { - this.xMsCopyId = xMsCopyId; + public BlobsQueryHeaders setCopyStatusDescription(String copyStatusDescription) { + this.copyStatusDescription = copyStatusDescription; return this; } /** - * Get the xMsCopyProgress property: The x-ms-copy-progress property. - * - * @return the xMsCopyProgress value. + * Get the copyId property: The x-ms-copy-id property. + * + * @return the copyId value. */ @Generated - public String getXMsCopyProgress() { - return this.xMsCopyProgress; + public String getCopyId() { + return this.copyId; } /** - * Set the xMsCopyProgress property: The x-ms-copy-progress property. - * - * @param xMsCopyProgress the xMsCopyProgress value to set. + * Set the copyId property. + * + * @param copyId the copyId value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsCopyProgress(String xMsCopyProgress) { - this.xMsCopyProgress = xMsCopyProgress; + public BlobsQueryHeaders setCopyId(String copyId) { + this.copyId = copyId; return this; } /** - * Get the xMsCopySource property: The x-ms-copy-source property. - * - * @return the xMsCopySource value. + * Get the copyProgress property: The x-ms-copy-progress property. + * + * @return the copyProgress value. */ @Generated - public String getXMsCopySource() { - return this.xMsCopySource; + public String getCopyProgress() { + return this.copyProgress; } /** - * Set the xMsCopySource property: The x-ms-copy-source property. - * - * @param xMsCopySource the xMsCopySource value to set. + * Set the copyProgress property. + * + * @param copyProgress the copyProgress value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsCopySource(String xMsCopySource) { - this.xMsCopySource = xMsCopySource; + public BlobsQueryHeaders setCopyProgress(String copyProgress) { + this.copyProgress = copyProgress; return this; } /** - * Get the xMsCopyStatus property: The x-ms-copy-status property. - * - * @return the xMsCopyStatus value. + * Get the copySource property: The x-ms-copy-source property. + * + * @return the copySource value. */ @Generated - public CopyStatusType getXMsCopyStatus() { - return this.xMsCopyStatus; + public String getCopySource() { + return this.copySource; } /** - * Set the xMsCopyStatus property: The x-ms-copy-status property. - * - * @param xMsCopyStatus the xMsCopyStatus value to set. + * Set the copySource property. + * + * @param copySource the copySource value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) { - this.xMsCopyStatus = xMsCopyStatus; + public BlobsQueryHeaders setCopySource(String copySource) { + this.copySource = copySource; return this; } /** - * Get the xMsLeaseDuration property: The x-ms-lease-duration property. - * - * @return the xMsLeaseDuration value. + * Get the copyStatus property: The x-ms-copy-status property. + * + * @return the copyStatus value. */ @Generated - public LeaseDurationType getXMsLeaseDuration() { - return this.xMsLeaseDuration; + public CopyStatusType getCopyStatus() { + return this.copyStatus; } /** - * Set the xMsLeaseDuration property: The x-ms-lease-duration property. - * - * @param xMsLeaseDuration the xMsLeaseDuration value to set. + * Set the copyStatus property. + * + * @param copyStatus the copyStatus value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsLeaseDuration(LeaseDurationType xMsLeaseDuration) { - this.xMsLeaseDuration = xMsLeaseDuration; + public BlobsQueryHeaders setCopyStatus(CopyStatusType copyStatus) { + this.copyStatus = copyStatus; return this; } /** - * Get the xMsLeaseState property: The x-ms-lease-state property. - * - * @return the xMsLeaseState value. + * Get the duration property: The x-ms-lease-duration property. + * + * @return the duration value. */ @Generated - public LeaseStateType getXMsLeaseState() { - return this.xMsLeaseState; + public LeaseDurationType getDuration() { + return this.duration; } /** - * Set the xMsLeaseState property: The x-ms-lease-state property. - * - * @param xMsLeaseState the xMsLeaseState value to set. + * Set the duration property. + * + * @param duration the duration value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsLeaseState(LeaseStateType xMsLeaseState) { - this.xMsLeaseState = xMsLeaseState; + public BlobsQueryHeaders setDuration(LeaseDurationType duration) { + this.duration = duration; return this; } /** - * Get the xMsLeaseStatus property: The x-ms-lease-status property. - * - * @return the xMsLeaseStatus value. + * Get the leaseState property: The x-ms-lease-state property. + * + * @return the leaseState value. */ @Generated - public LeaseStatusType getXMsLeaseStatus() { - return this.xMsLeaseStatus; + public LeaseStateType getLeaseState() { + return this.leaseState; } /** - * Set the xMsLeaseStatus property: The x-ms-lease-status property. - * - * @param xMsLeaseStatus the xMsLeaseStatus value to set. + * Set the leaseState property. + * + * @param leaseState the leaseState value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsLeaseStatus(LeaseStatusType xMsLeaseStatus) { - this.xMsLeaseStatus = xMsLeaseStatus; + public BlobsQueryHeaders setLeaseState(LeaseStateType leaseState) { + this.leaseState = leaseState; return this; } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. + * Get the leaseStatus property: The x-ms-lease-status property. + * + * @return the leaseStatus value. */ @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; + public LeaseStatusType getLeaseStatus() { + return this.leaseStatus; } /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. + * Set the leaseStatus property. + * + * @param leaseStatus the leaseStatus value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; + public BlobsQueryHeaders setLeaseStatus(LeaseStatusType leaseStatus) { + this.leaseStatus = leaseStatus; return this; } /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. + * Get the acceptRanges property: The Accept-Ranges property. + * + * @return the acceptRanges value. */ @Generated - public String getXMsRequestId() { - return this.xMsRequestId; + public String getAcceptRanges() { + return this.acceptRanges; } /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. + * Set the acceptRanges property. + * + * @param acceptRanges the acceptRanges value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; + public BlobsQueryHeaders setAcceptRanges(String acceptRanges) { + this.acceptRanges = acceptRanges; return this; } /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. + * Get the blobCommittedBlockCount property: The x-ms-blob-committed-block-count property. + * + * @return the blobCommittedBlockCount value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public Integer getBlobCommittedBlockCount() { + return this.blobCommittedBlockCount; } /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. + * Set the blobCommittedBlockCount property. + * + * @param blobCommittedBlockCount the blobCommittedBlockCount value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; + public BlobsQueryHeaders setBlobCommittedBlockCount(Integer blobCommittedBlockCount) { + this.blobCommittedBlockCount = blobCommittedBlockCount; return this; } /** - * Get the acceptRanges property: The Accept-Ranges property. - * - * @return the acceptRanges value. + * Get the isServerEncrypted property: The x-ms-server-encrypted property. + * + * @return the isServerEncrypted value. */ @Generated - public String getAcceptRanges() { - return this.acceptRanges; + public Boolean isServerEncrypted() { + return this.isServerEncrypted; } /** - * Set the acceptRanges property: The Accept-Ranges property. - * - * @param acceptRanges the acceptRanges value to set. + * Set the isServerEncrypted property. + * + * @param isServerEncrypted the isServerEncrypted value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setAcceptRanges(String acceptRanges) { - this.acceptRanges = acceptRanges; + public BlobsQueryHeaders setServerEncrypted(Boolean isServerEncrypted) { + this.isServerEncrypted = isServerEncrypted; return this; } /** - * Get the date property: The Date property. - * - * @return the date value. + * Get the encryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the encryptionKeySha256 value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getEncryptionKeySha256() { + return this.encryptionKeySha256; } /** - * Set the date property: The Date property. - * - * @param date the date value to set. + * Set the encryptionKeySha256 property. + * + * @param encryptionKeySha256 the encryptionKeySha256 value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } + public BlobsQueryHeaders setEncryptionKeySha256(String encryptionKeySha256) { + this.encryptionKeySha256 = encryptionKeySha256; return this; } /** - * Get the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * - * @return the xMsBlobCommittedBlockCount value. + * Get the encryptionScope property: The x-ms-encryption-scope property. + * + * @return the encryptionScope value. */ @Generated - public Integer getXMsBlobCommittedBlockCount() { - return this.xMsBlobCommittedBlockCount; + public String getEncryptionScope() { + return this.encryptionScope; } /** - * Set the xMsBlobCommittedBlockCount property: The x-ms-blob-committed-block-count property. - * - * @param xMsBlobCommittedBlockCount the xMsBlobCommittedBlockCount value to set. + * Set the encryptionScope property. + * + * @param encryptionScope the encryptionScope value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsBlobCommittedBlockCount(Integer xMsBlobCommittedBlockCount) { - this.xMsBlobCommittedBlockCount = xMsBlobCommittedBlockCount; + public BlobsQueryHeaders setEncryptionScope(String encryptionScope) { + this.encryptionScope = encryptionScope; return this; } /** - * Get the xMsServerEncrypted property: The x-ms-server-encrypted property. - * - * @return the xMsServerEncrypted value. + * Get the blobContentMd5 property: The x-ms-blob-content-md5 property. + * + * @return the blobContentMd5 value. */ @Generated - public Boolean isXMsServerEncrypted() { - return this.xMsServerEncrypted; + public byte[] getBlobContentMd5() { + return CoreUtils.clone(this.blobContentMd5); } /** - * Set the xMsServerEncrypted property: The x-ms-server-encrypted property. - * - * @param xMsServerEncrypted the xMsServerEncrypted value to set. + * Set the blobContentMd5 property. + * + * @param blobContentMd5 the blobContentMd5 value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsServerEncrypted(Boolean xMsServerEncrypted) { - this.xMsServerEncrypted = xMsServerEncrypted; + public BlobsQueryHeaders setBlobContentMd5(byte[] blobContentMd5) { + this.blobContentMd5 = blobContentMd5; return this; } /** - * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @return the xMsEncryptionKeySha256 value. + * Get the date property: The Date property. + * + * @return the date value. */ @Generated - public String getXMsEncryptionKeySha256() { - return this.xMsEncryptionKeySha256; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. + * Set the date property. + * + * @param date the date value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { - this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; + public BlobsQueryHeaders setDate(OffsetDateTime date) { + this.date = date == null ? null : new DateTimeRfc1123(date); return this; } /** - * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * - * @return the xMsEncryptionScope value. + * Get the version property: The x-ms-version property. + * + * @return the version value. */ @Generated - public String getXMsEncryptionScope() { - return this.xMsEncryptionScope; + public String getVersion() { + return this.version; } /** - * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * - * @param xMsEncryptionScope the xMsEncryptionScope value to set. + * Set the version property. + * + * @param version the version value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsEncryptionScope(String xMsEncryptionScope) { - this.xMsEncryptionScope = xMsEncryptionScope; + public BlobsQueryHeaders setVersion(String version) { + this.version = version; return this; } /** - * Get the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. - * - * @return the xMsBlobContentMd5 value. + * Get the requestId property: The x-ms-request-id property. + * + * @return the requestId value. */ @Generated - public byte[] getXMsBlobContentMd5() { - return CoreUtils.clone(this.xMsBlobContentMd5); + public String getRequestId() { + return this.requestId; } /** - * Set the xMsBlobContentMd5 property: The x-ms-blob-content-md5 property. - * - * @param xMsBlobContentMd5 the xMsBlobContentMd5 value to set. + * Set the requestId property. + * + * @param requestId the requestId value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsBlobContentMd5(byte[] xMsBlobContentMd5) { - this.xMsBlobContentMd5 = CoreUtils.clone(xMsBlobContentMd5); + public BlobsQueryHeaders setRequestId(String requestId) { + this.requestId = requestId; return this; } /** - * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @return the xMsContentCrc64 value. + * Get the clientRequestId property: The x-ms-client-request-id property. + * + * @return the clientRequestId value. */ @Generated - public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); + public String getClientRequestId() { + return this.clientRequestId; } /** - * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @param xMsContentCrc64 the xMsContentCrc64 value to set. + * Set the clientRequestId property. + * + * @param clientRequestId the clientRequestId value to set. * @return the BlobsQueryHeaders object itself. */ @Generated - public BlobsQueryHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); + public BlobsQueryHeaders setClientRequestId(String clientRequestId) { + this.clientRequestId = clientRequestId; return this; } } 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 72ca440f3dddf..bd48706c0fa9e 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,43 +14,43 @@ /** * The BlobsReleaseLeaseHeaders model. */ -@Fluent +@Immutable public final class BlobsReleaseLeaseHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -68,15 +68,15 @@ public BlobsReleaseLeaseHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -89,18 +89,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the BlobsReleaseLeaseHeaders object itself. - */ - @Generated - public BlobsReleaseLeaseHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -115,113 +103,45 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. + * Get the date property: The Date property. * - * @param lastModified the lastModified value to set. - * @return the BlobsReleaseLeaseHeaders object itself. + * @return the date value. */ @Generated - public BlobsReleaseLeaseHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); + public OffsetDateTime getDate() { + if (this.date == null) { + return null; } - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsReleaseLeaseHeaders object itself. - */ - @Generated - public BlobsReleaseLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsReleaseLeaseHeaders object itself. - */ - @Generated - public BlobsReleaseLeaseHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsReleaseLeaseHeaders object itself. + * @return the version value. */ @Generated - public BlobsReleaseLeaseHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the BlobsReleaseLeaseHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlobsReleaseLeaseHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 deleted file mode 100644 index b772b3519cdc4..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsRenameHeaders.java +++ /dev/null @@ -1,202 +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.azure.core.util.DateTimeRfc1123; -import java.time.OffsetDateTime; - -/** The BlobsRenameHeaders model. */ -@Fluent -public final class BlobsRenameHeaders { - /* - * The x-ms-version property. - */ - private String xMsVersion; - - /* - * The ETag property. - */ - private String eTag; - - /* - * The Last-Modified property. - */ - private DateTimeRfc1123 lastModified; - - /* - * The Content-Length property. - */ - private Long contentLength; - - /* - * The x-ms-request-id property. - */ - private String xMsRequestId; - - /* - * The x-ms-client-request-id property. - */ - private String xMsClientRequestId; - - /* - * The Date property. - */ - private DateTimeRfc1123 dateProperty; - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsRenameHeaders object itself. - */ - public BlobsRenameHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the eTag property: The ETag property. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the BlobsRenameHeaders object itself. - */ - public BlobsRenameHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the lastModified property: The Last-Modified property. - * - * @return the lastModified value. - */ - public OffsetDateTime getLastModified() { - if (this.lastModified == null) { - return null; - } - return this.lastModified.getDateTime(); - } - - /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the BlobsRenameHeaders object itself. - */ - public BlobsRenameHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the contentLength property: The Content-Length property. - * - * @return the contentLength value. - */ - public Long getContentLength() { - return this.contentLength; - } - - /** - * Set the contentLength property: The Content-Length property. - * - * @param contentLength the contentLength value to set. - * @return the BlobsRenameHeaders object itself. - */ - public BlobsRenameHeaders setContentLength(Long contentLength) { - this.contentLength = contentLength; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsRenameHeaders object itself. - */ - public BlobsRenameHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsRenameHeaders object itself. - */ - public BlobsRenameHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the dateProperty property: The Date property. - * - * @return the dateProperty value. - */ - public OffsetDateTime getDateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); - } - - /** - * Set the dateProperty property: The Date property. - * - * @param dateProperty the dateProperty value to set. - * @return the BlobsRenameHeaders object itself. - */ - public BlobsRenameHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } -} 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 3eb25e885fb13..014cec872a3c2 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,49 +14,49 @@ /** * The BlobsRenewLeaseHeaders model. */ -@Fluent +@Immutable public final class BlobsRenewLeaseHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* * The x-ms-lease-id property. */ @Generated - private String xMsLeaseId; + private final String leaseId; /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); @@ -76,16 +76,16 @@ public BlobsRenewLeaseHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - this.xMsLeaseId = rawHeaders.getValue(X_MS_LEASE_ID); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.leaseId = rawHeaders.getValue(X_MS_LEASE_ID); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -98,18 +98,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the BlobsRenewLeaseHeaders object itself. - */ - @Generated - public BlobsRenewLeaseHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -124,135 +112,55 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the BlobsRenewLeaseHeaders object itself. - */ - @Generated - public BlobsRenewLeaseHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsLeaseId property: The x-ms-lease-id property. - * - * @return the xMsLeaseId value. - */ - @Generated - public String getXMsLeaseId() { - return this.xMsLeaseId; - } - - /** - * Set the xMsLeaseId property: The x-ms-lease-id property. - * - * @param xMsLeaseId the xMsLeaseId value to set. - * @return the BlobsRenewLeaseHeaders object itself. - */ - @Generated - public BlobsRenewLeaseHeaders setXMsLeaseId(String xMsLeaseId) { - this.xMsLeaseId = xMsLeaseId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * Get the leaseId property: The x-ms-lease-id property. * - * @return the xMsClientRequestId value. + * @return the leaseId value. */ @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; + public String getLeaseId() { + return this.leaseId; } /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsRenewLeaseHeaders object itself. - */ - @Generated - public BlobsRenewLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsRenewLeaseHeaders object itself. - */ - @Generated - public BlobsRenewLeaseHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsRenewLeaseHeaders object itself. + * @return the version value. */ @Generated - public BlobsRenewLeaseHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the BlobsRenewLeaseHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlobsRenewLeaseHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 deleted file mode 100644 index 0f8d1d7057881..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsSetAccessControlHeaders.java +++ /dev/null @@ -1,152 +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.azure.core.util.DateTimeRfc1123; -import java.time.OffsetDateTime; - -/** The BlobsSetAccessControlHeaders model. */ -@Fluent -public final class BlobsSetAccessControlHeaders { - /* - * The x-ms-version property. - */ - private String xMsVersion; - - /* - * The ETag property. - */ - private String eTag; - - /* - * The Last-Modified property. - */ - private DateTimeRfc1123 lastModified; - - /* - * The x-ms-request-id property. - */ - private String xMsRequestId; - - /* - * The Date property. - */ - private DateTimeRfc1123 dateProperty; - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsSetAccessControlHeaders object itself. - */ - public BlobsSetAccessControlHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the eTag property: The ETag property. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the BlobsSetAccessControlHeaders object itself. - */ - public BlobsSetAccessControlHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the lastModified property: The Last-Modified property. - * - * @return the lastModified value. - */ - public OffsetDateTime getLastModified() { - if (this.lastModified == null) { - return null; - } - return this.lastModified.getDateTime(); - } - - /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the BlobsSetAccessControlHeaders object itself. - */ - public BlobsSetAccessControlHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsSetAccessControlHeaders object itself. - */ - public BlobsSetAccessControlHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the dateProperty property: The Date property. - * - * @return the dateProperty value. - */ - public OffsetDateTime getDateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); - } - - /** - * Set the dateProperty property: The Date property. - * - * @param dateProperty the dateProperty value to set. - * @return the BlobsSetAccessControlHeaders object itself. - */ - public BlobsSetAccessControlHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } -} 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 bdca0f09688ff..761103a0dd5c1 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,43 +14,43 @@ /** * The BlobsSetExpiryHeaders model. */ -@Fluent +@Immutable public final class BlobsSetExpiryHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -68,15 +68,15 @@ public BlobsSetExpiryHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -89,18 +89,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the BlobsSetExpiryHeaders object itself. - */ - @Generated - public BlobsSetExpiryHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -115,113 +103,45 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. + * Get the date property: The Date property. * - * @param lastModified the lastModified value to set. - * @return the BlobsSetExpiryHeaders object itself. + * @return the date value. */ @Generated - public BlobsSetExpiryHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); + public OffsetDateTime getDate() { + if (this.date == null) { + return null; } - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsSetExpiryHeaders object itself. - */ - @Generated - public BlobsSetExpiryHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsSetExpiryHeaders object itself. - */ - @Generated - public BlobsSetExpiryHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsSetExpiryHeaders object itself. + * @return the version value. */ @Generated - public BlobsSetExpiryHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the BlobsSetExpiryHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlobsSetExpiryHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 6376ab5dc88ff..6065a7c831eab 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,49 +14,49 @@ /** * The BlobsSetHttpHeadersHeaders model. */ -@Fluent +@Immutable public final class BlobsSetHttpHeadersHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* * The x-ms-blob-sequence-number property. */ @Generated - private Long xMsBlobSequenceNumber; + private final Long blobSequenceNumber; /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER = HttpHeaderName.fromString("x-ms-blob-sequence-number"); @@ -77,21 +77,21 @@ public BlobsSetHttpHeadersHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - String xMsBlobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); - if (xMsBlobSequenceNumber != null) { - this.xMsBlobSequenceNumber = Long.parseLong(xMsBlobSequenceNumber); + String blobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); + if (blobSequenceNumber != null) { + this.blobSequenceNumber = Long.parseLong(blobSequenceNumber); } else { - this.xMsBlobSequenceNumber = null; + this.blobSequenceNumber = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -104,18 +104,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the BlobsSetHttpHeadersHeaders object itself. - */ - @Generated - public BlobsSetHttpHeadersHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -130,135 +118,55 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the BlobsSetHttpHeadersHeaders object itself. - */ - @Generated - public BlobsSetHttpHeadersHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * - * @return the xMsBlobSequenceNumber value. - */ - @Generated - public Long getXMsBlobSequenceNumber() { - return this.xMsBlobSequenceNumber; - } - - /** - * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * - * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. - * @return the BlobsSetHttpHeadersHeaders object itself. - */ - @Generated - public BlobsSetHttpHeadersHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { - this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * Get the blobSequenceNumber property: The x-ms-blob-sequence-number property. * - * @return the xMsClientRequestId value. + * @return the blobSequenceNumber value. */ @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; + public Long getBlobSequenceNumber() { + return this.blobSequenceNumber; } /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsSetHttpHeadersHeaders object itself. - */ - @Generated - public BlobsSetHttpHeadersHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsSetHttpHeadersHeaders object itself. - */ - @Generated - public BlobsSetHttpHeadersHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsSetHttpHeadersHeaders object itself. + * @return the version value. */ @Generated - public BlobsSetHttpHeadersHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the BlobsSetHttpHeadersHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlobsSetHttpHeadersHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 f560e6ed4f857..a0427aea80ead 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -15,45 +15,43 @@ /** * The BlobsSetImmutabilityPolicyHeaders model. */ -@Fluent +@Immutable public final class BlobsSetImmutabilityPolicyHeaders { /* - * The x-ms-client-request-id property. + * The x-ms-immutability-policy-until-date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 immutabilityPolicyExpiresOn; /* - * The x-ms-request-id property. + * The x-ms-immutability-policy-mode property. */ @Generated - private String xMsRequestId; + private final BlobImmutabilityPolicyMode immutabilityPolicyMode; /* - * The x-ms-version property. + * The Date property. */ @Generated - private String xMsVersion; + private final DateTimeRfc1123 date; /* - * The Date property. + * The x-ms-version property. */ @Generated - private DateTimeRfc1123 date; + private final String version; /* - * The x-ms-immutability-policy-until-date property. + * The x-ms-request-id property. */ @Generated - private DateTimeRfc1123 xMsImmutabilityPolicyUntilDate; + private final String requestId; /* - * The x-ms-immutability-policy-mode property. + * The x-ms-client-request-id property. */ @Generated - private BlobImmutabilityPolicyMode xMsImmutabilityPolicyMode; - - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private final String clientRequestId; private static final HttpHeaderName X_MS_IMMUTABILITY_POLICY_UNTIL_DATE = HttpHeaderName.fromString("x-ms-immutability-policy-until-date"); @@ -61,6 +59,8 @@ public final class BlobsSetImmutabilityPolicyHeaders { 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"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetImmutabilityPolicyHeaders class. @@ -68,93 +68,50 @@ public final class BlobsSetImmutabilityPolicyHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetImmutabilityPolicyHeaders(HttpHeaders rawHeaders) { - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - String date = rawHeaders.getValue(HttpHeaderName.DATE); - if (date != null) { - this.date = new DateTimeRfc1123(date); + String immutabilityPolicyExpiresOn = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_UNTIL_DATE); + if (immutabilityPolicyExpiresOn != null) { + this.immutabilityPolicyExpiresOn = new DateTimeRfc1123(immutabilityPolicyExpiresOn); } else { - this.date = null; + this.immutabilityPolicyExpiresOn = null; } - String xMsImmutabilityPolicyUntilDate = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_UNTIL_DATE); - if (xMsImmutabilityPolicyUntilDate != null) { - this.xMsImmutabilityPolicyUntilDate = new DateTimeRfc1123(xMsImmutabilityPolicyUntilDate); + String immutabilityPolicyMode = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_MODE); + if (immutabilityPolicyMode != null) { + this.immutabilityPolicyMode = BlobImmutabilityPolicyMode.fromString(immutabilityPolicyMode); } else { - this.xMsImmutabilityPolicyUntilDate = null; + this.immutabilityPolicyMode = null; } - String xMsImmutabilityPolicyMode = rawHeaders.getValue(X_MS_IMMUTABILITY_POLICY_MODE); - if (xMsImmutabilityPolicyMode != null) { - this.xMsImmutabilityPolicyMode = BlobImmutabilityPolicyMode.fromString(xMsImmutabilityPolicyMode); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); } else { - this.xMsImmutabilityPolicyMode = null; + this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsSetImmutabilityPolicyHeaders object itself. - */ - @Generated - public BlobsSetImmutabilityPolicyHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsSetImmutabilityPolicyHeaders object itself. - */ - @Generated - public BlobsSetImmutabilityPolicyHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the immutabilityPolicyExpiresOn property: The x-ms-immutability-policy-until-date property. * - * @return the xMsVersion value. + * @return the immutabilityPolicyExpiresOn value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getImmutabilityPolicyExpiresOn() { + if (this.immutabilityPolicyExpiresOn == null) { + return null; + } + return this.immutabilityPolicyExpiresOn.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the immutabilityPolicyMode property: The x-ms-immutability-policy-mode property. * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsSetImmutabilityPolicyHeaders object itself. + * @return the immutabilityPolicyMode value. */ @Generated - public BlobsSetImmutabilityPolicyHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public BlobImmutabilityPolicyMode getImmutabilityPolicyMode() { + return this.immutabilityPolicyMode; } /** @@ -171,71 +128,32 @@ public OffsetDateTime getDate() { } /** - * Set the date property: The Date property. + * Get the version property: The x-ms-version property. * - * @param date the date value to set. - * @return the BlobsSetImmutabilityPolicyHeaders object itself. + * @return the version value. */ @Generated - public BlobsSetImmutabilityPolicyHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * - * @return the xMsImmutabilityPolicyUntilDate value. - */ - @Generated - public OffsetDateTime getXMsImmutabilityPolicyUntilDate() { - if (this.xMsImmutabilityPolicyUntilDate == null) { - return null; - } - return this.xMsImmutabilityPolicyUntilDate.getDateTime(); - } - - /** - * Set the xMsImmutabilityPolicyUntilDate property: The x-ms-immutability-policy-until-date property. - * - * @param xMsImmutabilityPolicyUntilDate the xMsImmutabilityPolicyUntilDate value to set. - * @return the BlobsSetImmutabilityPolicyHeaders object itself. - */ - @Generated - public BlobsSetImmutabilityPolicyHeaders - setXMsImmutabilityPolicyUntilDate(OffsetDateTime xMsImmutabilityPolicyUntilDate) { - if (xMsImmutabilityPolicyUntilDate == null) { - this.xMsImmutabilityPolicyUntilDate = null; - } else { - this.xMsImmutabilityPolicyUntilDate = new DateTimeRfc1123(xMsImmutabilityPolicyUntilDate); - } - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsImmutabilityPolicyMode value. + * @return the requestId value. */ @Generated - public BlobImmutabilityPolicyMode getXMsImmutabilityPolicyMode() { - return this.xMsImmutabilityPolicyMode; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsImmutabilityPolicyMode property: The x-ms-immutability-policy-mode property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsImmutabilityPolicyMode the xMsImmutabilityPolicyMode value to set. - * @return the BlobsSetImmutabilityPolicyHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlobsSetImmutabilityPolicyHeaders - setXMsImmutabilityPolicyMode(BlobImmutabilityPolicyMode xMsImmutabilityPolicyMode) { - this.xMsImmutabilityPolicyMode = xMsImmutabilityPolicyMode; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 30e8a1bbcba65..39f3afc5b5e26 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,42 +14,42 @@ /** * The BlobsSetLegalHoldHeaders model. */ -@Fluent +@Immutable public final class BlobsSetLegalHoldHeaders { /* - * The x-ms-client-request-id property. + * The x-ms-legal-hold property. */ @Generated - private String xMsClientRequestId; + private final Boolean legalHold; /* - * The x-ms-request-id property. + * The Date property. */ @Generated - private String xMsRequestId; + private final DateTimeRfc1123 date; /* * The x-ms-version property. */ @Generated - private String xMsVersion; + private final String version; /* - * The Date property. + * The x-ms-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String requestId; /* - * The x-ms-legal-hold property. + * The x-ms-client-request-id property. */ @Generated - private Boolean xMsLegalHold; - - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private final String clientRequestId; private static final HttpHeaderName X_MS_LEGAL_HOLD = HttpHeaderName.fromString("x-ms-legal-hold"); + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetLegalHoldHeaders class. @@ -57,87 +57,31 @@ public final class BlobsSetLegalHoldHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetLegalHoldHeaders(HttpHeaders rawHeaders) { - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + String legalHold = rawHeaders.getValue(X_MS_LEGAL_HOLD); + if (legalHold != null) { + this.legalHold = Boolean.parseBoolean(legalHold); + } else { + this.legalHold = null; + } String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } - String xMsLegalHold = rawHeaders.getValue(X_MS_LEGAL_HOLD); - if (xMsLegalHold != null) { - this.xMsLegalHold = Boolean.parseBoolean(xMsLegalHold); - } else { - this.xMsLegalHold = null; - } - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsSetLegalHoldHeaders object itself. - */ - @Generated - public BlobsSetLegalHoldHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsRequestId property: The x-ms-request-id property. + * Get the legalHold property: The x-ms-legal-hold property. * - * @return the xMsRequestId value. + * @return the legalHold value. */ @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsSetLegalHoldHeaders object itself. - */ - @Generated - public BlobsSetLegalHoldHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsSetLegalHoldHeaders object itself. - */ - @Generated - public BlobsSetLegalHoldHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public Boolean isLegalHold() { + return this.legalHold; } /** @@ -154,40 +98,32 @@ public OffsetDateTime getDate() { } /** - * Set the date property: The Date property. + * Get the version property: The x-ms-version property. * - * @param date the date value to set. - * @return the BlobsSetLegalHoldHeaders object itself. + * @return the version value. */ @Generated - public BlobsSetLegalHoldHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsLegalHold property: The x-ms-legal-hold property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsLegalHold value. + * @return the requestId value. */ @Generated - public Boolean isXMsLegalHold() { - return this.xMsLegalHold; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsLegalHold property: The x-ms-legal-hold property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsLegalHold the xMsLegalHold value to set. - * @return the BlobsSetLegalHoldHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlobsSetLegalHoldHeaders setXMsLegalHold(Boolean xMsLegalHold) { - this.xMsLegalHold = xMsLegalHold; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 2a5bf5b400257..5581dacab9f36 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,69 +14,67 @@ /** * The BlobsSetMetadataHeaders model. */ -@Fluent +@Immutable public final class BlobsSetMetadataHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* - * The x-ms-client-request-id property. + * The x-ms-version-id property. */ @Generated - private String xMsClientRequestId; + private final String versionId; /* - * The x-ms-request-id property. + * The x-ms-request-server-encrypted property. */ @Generated - private String xMsRequestId; + private final Boolean isServerEncrypted; /* - * The x-ms-version property. + * The x-ms-encryption-key-sha256 property. */ @Generated - private String xMsVersion; + private final String encryptionKeySha256; /* - * The x-ms-version-id property. + * The x-ms-encryption-scope property. */ @Generated - private String xMsVersionId; + private final String encryptionScope; /* * The Date property. */ @Generated - private DateTimeRfc1123 date; + private final DateTimeRfc1123 date; /* - * The x-ms-request-server-encrypted property. + * The x-ms-version property. */ @Generated - private Boolean xMsRequestServerEncrypted; + private final String version; /* - * The x-ms-encryption-key-sha256 property. + * The x-ms-request-id property. */ @Generated - private String xMsEncryptionKeySha256; + private final String requestId; /* - * The x-ms-encryption-scope property. + * The x-ms-client-request-id property. */ @Generated - private String xMsEncryptionScope; - - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); @@ -88,6 +86,8 @@ public final class BlobsSetMetadataHeaders { private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlobsSetMetadataHeaders class. @@ -102,24 +102,24 @@ public BlobsSetMetadataHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); + this.versionId = rawHeaders.getValue(X_MS_VERSION_ID); + String isServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (isServerEncrypted != null) { + this.isServerEncrypted = Boolean.parseBoolean(isServerEncrypted); + } else { + this.isServerEncrypted = null; + } + this.encryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.encryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } - String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); - if (xMsRequestServerEncrypted != null) { - this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); - } else { - this.xMsRequestServerEncrypted = null; - } - this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -132,18 +132,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the BlobsSetMetadataHeaders object itself. - */ - @Generated - public BlobsSetMetadataHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -158,107 +146,43 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the BlobsSetMetadataHeaders object itself. - */ - @Generated - public BlobsSetMetadataHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsSetMetadataHeaders object itself. - */ - @Generated - public BlobsSetMetadataHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. + * Get the versionId property: The x-ms-version-id property. * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsSetMetadataHeaders object itself. + * @return the versionId value. */ @Generated - public BlobsSetMetadataHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; + public String getVersionId() { + return this.versionId; } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the isServerEncrypted property: The x-ms-request-server-encrypted property. * - * @return the xMsVersion value. + * @return the isServerEncrypted value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public Boolean isServerEncrypted() { + return this.isServerEncrypted; } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the encryptionKeySha256 property: The x-ms-encryption-key-sha256 property. * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsSetMetadataHeaders object itself. + * @return the encryptionKeySha256 value. */ @Generated - public BlobsSetMetadataHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getEncryptionKeySha256() { + return this.encryptionKeySha256; } /** - * Get the xMsVersionId property: The x-ms-version-id property. + * Get the encryptionScope property: The x-ms-encryption-scope property. * - * @return the xMsVersionId value. + * @return the encryptionScope value. */ @Generated - public String getXMsVersionId() { - return this.xMsVersionId; - } - - /** - * Set the xMsVersionId property: The x-ms-version-id property. - * - * @param xMsVersionId the xMsVersionId value to set. - * @return the BlobsSetMetadataHeaders object itself. - */ - @Generated - public BlobsSetMetadataHeaders setXMsVersionId(String xMsVersionId) { - this.xMsVersionId = xMsVersionId; - return this; + public String getEncryptionScope() { + return this.encryptionScope; } /** @@ -275,84 +199,32 @@ public OffsetDateTime getDate() { } /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the BlobsSetMetadataHeaders object itself. - */ - @Generated - public BlobsSetMetadataHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @return the xMsRequestServerEncrypted value. - */ - @Generated - public Boolean isXMsRequestServerEncrypted() { - return this.xMsRequestServerEncrypted; - } - - /** - * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. - * @return the BlobsSetMetadataHeaders object itself. - */ - @Generated - public BlobsSetMetadataHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { - this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; - return this; - } - - /** - * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @return the xMsEncryptionKeySha256 value. - */ - @Generated - public String getXMsEncryptionKeySha256() { - return this.xMsEncryptionKeySha256; - } - - /** - * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * Get the version property: The x-ms-version property. * - * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. - * @return the BlobsSetMetadataHeaders object itself. + * @return the version value. */ @Generated - public BlobsSetMetadataHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { - this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsEncryptionScope value. + * @return the requestId value. */ @Generated - public String getXMsEncryptionScope() { - return this.xMsEncryptionScope; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsEncryptionScope the xMsEncryptionScope value to set. - * @return the BlobsSetMetadataHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlobsSetMetadataHeaders setXMsEncryptionScope(String xMsEncryptionScope) { - this.xMsEncryptionScope = xMsEncryptionScope; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 d8b9f74019043..05919a6d9f6ab 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,31 +14,31 @@ /** * The BlobsSetTagsHeaders model. */ -@Fluent +@Immutable public final class BlobsSetTagsHeaders { /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -49,109 +49,57 @@ public final class BlobsSetTagsHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetTagsHeaders(HttpHeaders rawHeaders) { - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsSetTagsHeaders object itself. - */ - @Generated - public BlobsSetTagsHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsSetTagsHeaders object itself. - */ - @Generated - public BlobsSetTagsHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsSetTagsHeaders object itself. + * @return the version value. */ @Generated - public BlobsSetTagsHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the BlobsSetTagsHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlobsSetTagsHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 2d712212ae269..5ae959639cfbc 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 @@ -1,36 +1,44 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; +import com.azure.core.util.DateTimeRfc1123; +import java.time.OffsetDateTime; /** * The BlobsSetTierHeaders model. */ -@Fluent +@Immutable public final class BlobsSetTierHeaders { /* - * The x-ms-client-request-id property. + * The Date property. + */ + @Generated + private final DateTimeRfc1123 date; + + /* + * The x-ms-version property. */ @Generated - private String xMsClientRequestId; + private final String version; /* * The x-ms-request-id property. */ @Generated - private String xMsRequestId; + private final String requestId; /* - * The x-ms-version property. + * The x-ms-client-request-id property. */ @Generated - private String xMsVersion; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -41,74 +49,57 @@ public final class BlobsSetTierHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsSetTierHeaders(HttpHeaders rawHeaders) { - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsSetTierHeaders object itself. - */ - @Generated - public BlobsSetTierHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } else { + this.date = null; + } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsRequestId property: The x-ms-request-id property. + * Get the date property: The Date property. * - * @return the xMsRequestId value. + * @return the date value. */ @Generated - public String getXMsRequestId() { - return this.xMsRequestId; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsRequestId property: The x-ms-request-id property. + * Get the version property: The x-ms-version property. * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsSetTierHeaders object itself. + * @return the version value. */ @Generated - public BlobsSetTierHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsVersion value. + * @return the requestId value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsSetTierHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlobsSetTierHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 deleted file mode 100644 index f07c91163be3c..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsStartCopyFromURLHeaders.java +++ /dev/null @@ -1,326 +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.azure.core.annotation.Generated; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.util.DateTimeRfc1123; -import com.azure.storage.blob.models.CopyStatusType; -import java.time.OffsetDateTime; - -/** - * The BlobsStartCopyFromURLHeaders model. - */ -@Fluent -public final class BlobsStartCopyFromURLHeaders { - /* - * The ETag property. - */ - @Generated - private String eTag; - - /* - * The Last-Modified property. - */ - @Generated - private DateTimeRfc1123 lastModified; - - /* - * The x-ms-client-request-id property. - */ - @Generated - private String xMsClientRequestId; - - /* - * The x-ms-request-id property. - */ - @Generated - private String xMsRequestId; - - /* - * The x-ms-version property. - */ - @Generated - private String xMsVersion; - - /* - * The x-ms-version-id property. - */ - @Generated - private String xMsVersionId; - - /* - * The Date property. - */ - @Generated - private DateTimeRfc1123 date; - - /* - * The x-ms-copy-id property. - */ - @Generated - private String xMsCopyId; - - /* - * The x-ms-copy-status property. - */ - @Generated - private CopyStatusType xMsCopyStatus; - - 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_COPY_ID = HttpHeaderName.fromString("x-ms-copy-id"); - - private static final HttpHeaderName X_MS_COPY_STATUS = HttpHeaderName.fromString("x-ms-copy-status"); - - // 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) { - this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); - String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); - if (lastModified != null) { - this.lastModified = new DateTimeRfc1123(lastModified); - } else { - this.lastModified = null; - } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); - String date = rawHeaders.getValue(HttpHeaderName.DATE); - if (date != null) { - this.date = new DateTimeRfc1123(date); - } else { - this.date = null; - } - this.xMsCopyId = rawHeaders.getValue(X_MS_COPY_ID); - String xMsCopyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); - if (xMsCopyStatus != null) { - this.xMsCopyStatus = CopyStatusType.fromString(xMsCopyStatus); - } else { - this.xMsCopyStatus = null; - } - } - - /** - * Get the eTag property: The ETag property. - * - * @return the eTag value. - */ - @Generated - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the BlobsStartCopyFromURLHeaders object itself. - */ - @Generated - public BlobsStartCopyFromURLHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the lastModified property: The Last-Modified property. - * - * @return the lastModified value. - */ - @Generated - public OffsetDateTime getLastModified() { - if (this.lastModified == null) { - return null; - } - return this.lastModified.getDateTime(); - } - - /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the BlobsStartCopyFromURLHeaders object itself. - */ - @Generated - public BlobsStartCopyFromURLHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsStartCopyFromURLHeaders object itself. - */ - @Generated - public BlobsStartCopyFromURLHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsStartCopyFromURLHeaders object itself. - */ - @Generated - public BlobsStartCopyFromURLHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsStartCopyFromURLHeaders object itself. - */ - @Generated - public BlobsStartCopyFromURLHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the xMsVersionId property: The x-ms-version-id property. - * - * @return the xMsVersionId value. - */ - @Generated - public String getXMsVersionId() { - return this.xMsVersionId; - } - - /** - * Set the xMsVersionId property: The x-ms-version-id property. - * - * @param xMsVersionId the xMsVersionId value to set. - * @return the BlobsStartCopyFromURLHeaders object itself. - */ - @Generated - public BlobsStartCopyFromURLHeaders setXMsVersionId(String xMsVersionId) { - this.xMsVersionId = xMsVersionId; - return this; - } - - /** - * Get the date property: The Date property. - * - * @return the date value. - */ - @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); - } - - /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the BlobsStartCopyFromURLHeaders object itself. - */ - @Generated - public BlobsStartCopyFromURLHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsCopyId property: The x-ms-copy-id property. - * - * @return the xMsCopyId value. - */ - @Generated - public String getXMsCopyId() { - return this.xMsCopyId; - } - - /** - * Set the xMsCopyId property: The x-ms-copy-id property. - * - * @param xMsCopyId the xMsCopyId value to set. - * @return the BlobsStartCopyFromURLHeaders object itself. - */ - @Generated - public BlobsStartCopyFromURLHeaders setXMsCopyId(String xMsCopyId) { - this.xMsCopyId = xMsCopyId; - return this; - } - - /** - * Get the xMsCopyStatus property: The x-ms-copy-status property. - * - * @return the xMsCopyStatus value. - */ - @Generated - public CopyStatusType getXMsCopyStatus() { - return this.xMsCopyStatus; - } - - /** - * Set the xMsCopyStatus property: The x-ms-copy-status property. - * - * @param xMsCopyStatus the xMsCopyStatus value to set. - * @return the BlobsStartCopyFromURLHeaders object itself. - */ - @Generated - public BlobsStartCopyFromURLHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) { - this.xMsCopyStatus = xMsCopyStatus; - return this; - } -} 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 new file mode 100644 index 0000000000000..027d39a91b946 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsStartCopyFromUrlHeaders.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.util.DateTimeRfc1123; +import com.azure.storage.blob.models.CopyStatusType; +import java.time.OffsetDateTime; + +/** + * The BlobsStartCopyFromUrlHeaders model. + */ +@Immutable +public final class BlobsStartCopyFromUrlHeaders { + /* + * The ETag property. + */ + @Generated + private final String eTag; + + /* + * The Last-Modified property. + */ + @Generated + private final DateTimeRfc1123 lastModified; + + /* + * The x-ms-version-id property. + */ + @Generated + private final String versionId; + + /* + * The x-ms-copy-id property. + */ + @Generated + private final String copyId; + + /* + * The x-ms-copy-status property. + */ + @Generated + private final CopyStatusType copyStatus; + + /* + * The Date property. + */ + @Generated + private final DateTimeRfc1123 date; + + /* + * The x-ms-version property. + */ + @Generated + private final String version; + + /* + * The x-ms-request-id property. + */ + @Generated + private final String requestId; + + /* + * The x-ms-client-request-id property. + */ + @Generated + private final String clientRequestId; + + private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); + + private static final HttpHeaderName X_MS_COPY_ID = HttpHeaderName.fromString("x-ms-copy-id"); + + private static final HttpHeaderName X_MS_COPY_STATUS = HttpHeaderName.fromString("x-ms-copy-status"); + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + // 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) { + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } else { + this.lastModified = null; + } + this.versionId = rawHeaders.getValue(X_MS_VERSION_ID); + this.copyId = rawHeaders.getValue(X_MS_COPY_ID); + String copyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); + if (copyStatus != null) { + this.copyStatus = CopyStatusType.fromString(copyStatus); + } else { + this.copyStatus = null; + } + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } else { + this.date = null; + } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); + } + + /** + * Get the eTag property: The ETag property. + * + * @return the eTag value. + */ + @Generated + public String getETag() { + return this.eTag; + } + + /** + * Get the lastModified property: The Last-Modified property. + * + * @return the lastModified value. + */ + @Generated + public OffsetDateTime getLastModified() { + if (this.lastModified == null) { + return null; + } + return this.lastModified.getDateTime(); + } + + /** + * Get the versionId property: The x-ms-version-id property. + * + * @return the versionId value. + */ + @Generated + public String getVersionId() { + return this.versionId; + } + + /** + * Get the copyId property: The x-ms-copy-id property. + * + * @return the copyId value. + */ + @Generated + public String getCopyId() { + return this.copyId; + } + + /** + * Get the copyStatus property: The x-ms-copy-status property. + * + * @return the copyStatus value. + */ + @Generated + public CopyStatusType getCopyStatus() { + return this.copyStatus; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + @Generated + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); + } + + /** + * Get the version property: The x-ms-version property. + * + * @return the version value. + */ + @Generated + public String getVersion() { + return this.version; + } + + /** + * Get the requestId property: The x-ms-request-id property. + * + * @return the requestId value. + */ + @Generated + public String getRequestId() { + return this.requestId; + } + + /** + * Get the clientRequestId property: The x-ms-client-request-id property. + * + * @return the clientRequestId value. + */ + @Generated + public String getClientRequestId() { + return this.clientRequestId; + } +} 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 87e4fc453695e..935d6f9fce994 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,31 +14,31 @@ /** * The BlobsUndeleteHeaders model. */ -@Fluent +@Immutable public final class BlobsUndeleteHeaders { /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -49,109 +49,57 @@ public final class BlobsUndeleteHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlobsUndeleteHeaders(HttpHeaders rawHeaders) { - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlobsUndeleteHeaders object itself. - */ - @Generated - public BlobsUndeleteHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlobsUndeleteHeaders object itself. - */ - @Generated - public BlobsUndeleteHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the BlobsUndeleteHeaders object itself. + * @return the version value. */ @Generated - public BlobsUndeleteHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the BlobsUndeleteHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlobsUndeleteHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 5b521358a5297..fc5457c91f7aa 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; @@ -16,84 +16,82 @@ /** * The BlockBlobsCommitBlockListHeaders model. */ -@Fluent +@Immutable public final class BlockBlobsCommitBlockListHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* * The Content-MD5 property. */ @Generated - private byte[] contentMD5; + private final byte[] contentMd5; /* * The x-ms-content-crc64 property. */ @Generated - private byte[] xMsContentCrc64; + private final byte[] contentCrc64; /* - * The x-ms-client-request-id property. + * The x-ms-version-id property. */ @Generated - private String xMsClientRequestId; + private final String versionId; /* - * The x-ms-request-id property. + * The x-ms-request-server-encrypted property. */ @Generated - private String xMsRequestId; + private final Boolean isServerEncrypted; /* - * The x-ms-version property. + * The x-ms-encryption-key-sha256 property. */ @Generated - private String xMsVersion; + private final String encryptionKeySha256; /* - * The x-ms-version-id property. + * The x-ms-encryption-scope property. */ @Generated - private String xMsVersionId; + private final String encryptionScope; /* * The Date property. */ @Generated - private DateTimeRfc1123 date; + private final DateTimeRfc1123 date; /* - * The x-ms-request-server-encrypted property. + * The x-ms-version property. */ @Generated - private Boolean xMsRequestServerEncrypted; + private final String version; /* - * The x-ms-encryption-key-sha256 property. + * The x-ms-request-id property. */ @Generated - private String xMsEncryptionKeySha256; + private final String requestId; /* - * The x-ms-encryption-scope property. + * The x-ms-client-request-id property. */ @Generated - private String xMsEncryptionScope; + private final String clientRequestId; private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); - 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_REQUEST_SERVER_ENCRYPTED @@ -104,6 +102,8 @@ public final class BlockBlobsCommitBlockListHeaders { private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlockBlobsCommitBlockListHeaders class. @@ -118,36 +118,36 @@ public BlockBlobsCommitBlockListHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); - if (contentMD5 != null) { - this.contentMD5 = Base64.getDecoder().decode(contentMD5); + String contentMd5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMd5 != null) { + this.contentMd5 = Base64.getDecoder().decode(contentMd5); + } else { + this.contentMd5 = null; + } + String contentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (contentCrc64 != null) { + this.contentCrc64 = Base64.getDecoder().decode(contentCrc64); } else { - this.contentMD5 = null; + this.contentCrc64 = null; } - String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); - if (xMsContentCrc64 != null) { - this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); + this.versionId = rawHeaders.getValue(X_MS_VERSION_ID); + String isServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (isServerEncrypted != null) { + this.isServerEncrypted = Boolean.parseBoolean(isServerEncrypted); } else { - this.xMsContentCrc64 = null; + this.isServerEncrypted = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); + this.encryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.encryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } - String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); - if (xMsRequestServerEncrypted != null) { - this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); - } else { - this.xMsRequestServerEncrypted = null; - } - this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -160,18 +160,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the BlockBlobsCommitBlockListHeaders object itself. - */ - @Generated - public BlockBlobsCommitBlockListHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -186,151 +174,63 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the BlockBlobsCommitBlockListHeaders object itself. - */ - @Generated - public BlockBlobsCommitBlockListHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the contentMD5 property: The Content-MD5 property. - * - * @return the contentMD5 value. - */ - @Generated - public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); - } - - /** - * Set the contentMD5 property: The Content-MD5 property. - * - * @param contentMD5 the contentMD5 value to set. - * @return the BlockBlobsCommitBlockListHeaders object itself. - */ - @Generated - public BlockBlobsCommitBlockListHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); - return this; - } - - /** - * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @return the xMsContentCrc64 value. - */ - @Generated - public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); - } - - /** - * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @param xMsContentCrc64 the xMsContentCrc64 value to set. - * @return the BlockBlobsCommitBlockListHeaders object itself. - */ - @Generated - public BlockBlobsCommitBlockListHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * Get the contentMd5 property: The Content-MD5 property. * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlockBlobsCommitBlockListHeaders object itself. + * @return the contentMd5 value. */ @Generated - public BlockBlobsCommitBlockListHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; + public byte[] getContentMd5() { + return CoreUtils.clone(this.contentMd5); } /** - * Get the xMsRequestId property: The x-ms-request-id property. + * Get the contentCrc64 property: The x-ms-content-crc64 property. * - * @return the xMsRequestId value. + * @return the contentCrc64 value. */ @Generated - public String getXMsRequestId() { - return this.xMsRequestId; + public byte[] getContentCrc64() { + return CoreUtils.clone(this.contentCrc64); } /** - * Set the xMsRequestId property: The x-ms-request-id property. + * Get the versionId property: The x-ms-version-id property. * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlockBlobsCommitBlockListHeaders object itself. + * @return the versionId value. */ @Generated - public BlockBlobsCommitBlockListHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; + public String getVersionId() { + return this.versionId; } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the isServerEncrypted property: The x-ms-request-server-encrypted property. * - * @return the xMsVersion value. + * @return the isServerEncrypted value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public Boolean isServerEncrypted() { + return this.isServerEncrypted; } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the encryptionKeySha256 property: The x-ms-encryption-key-sha256 property. * - * @param xMsVersion the xMsVersion value to set. - * @return the BlockBlobsCommitBlockListHeaders object itself. + * @return the encryptionKeySha256 value. */ @Generated - public BlockBlobsCommitBlockListHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getEncryptionKeySha256() { + return this.encryptionKeySha256; } /** - * Get the xMsVersionId property: The x-ms-version-id property. + * Get the encryptionScope property: The x-ms-encryption-scope property. * - * @return the xMsVersionId value. + * @return the encryptionScope value. */ @Generated - public String getXMsVersionId() { - return this.xMsVersionId; - } - - /** - * Set the xMsVersionId property: The x-ms-version-id property. - * - * @param xMsVersionId the xMsVersionId value to set. - * @return the BlockBlobsCommitBlockListHeaders object itself. - */ - @Generated - public BlockBlobsCommitBlockListHeaders setXMsVersionId(String xMsVersionId) { - this.xMsVersionId = xMsVersionId; - return this; + public String getEncryptionScope() { + return this.encryptionScope; } /** @@ -347,84 +247,32 @@ public OffsetDateTime getDate() { } /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the BlockBlobsCommitBlockListHeaders object itself. - */ - @Generated - public BlockBlobsCommitBlockListHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @return the xMsRequestServerEncrypted value. - */ - @Generated - public Boolean isXMsRequestServerEncrypted() { - return this.xMsRequestServerEncrypted; - } - - /** - * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. - * @return the BlockBlobsCommitBlockListHeaders object itself. - */ - @Generated - public BlockBlobsCommitBlockListHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { - this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; - return this; - } - - /** - * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @return the xMsEncryptionKeySha256 value. - */ - @Generated - public String getXMsEncryptionKeySha256() { - return this.xMsEncryptionKeySha256; - } - - /** - * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * Get the version property: The x-ms-version property. * - * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. - * @return the BlockBlobsCommitBlockListHeaders object itself. + * @return the version value. */ @Generated - public BlockBlobsCommitBlockListHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { - this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsEncryptionScope value. + * @return the requestId value. */ @Generated - public String getXMsEncryptionScope() { - return this.xMsEncryptionScope; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsEncryptionScope the xMsEncryptionScope value to set. - * @return the BlockBlobsCommitBlockListHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlockBlobsCommitBlockListHeaders setXMsEncryptionScope(String xMsEncryptionScope) { - this.xMsEncryptionScope = xMsEncryptionScope; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 a13db17fa72e6..7c4db31b32b38 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,55 +14,49 @@ /** * The BlockBlobsGetBlockListHeaders model. */ -@Fluent +@Immutable public final class BlockBlobsGetBlockListHeaders { /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* * The ETag property. */ @Generated - private String eTag; - - /* - * The Content-Type property. - */ - @Generated - private String contentType; + private final String eTag; /* * The x-ms-blob-content-length property. */ @Generated - private Long xMsBlobContentLength; + private final Long blobContentLength; /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_BLOB_CONTENT_LENGTH = HttpHeaderName.fromString("x-ms-blob-content-length"); @@ -83,22 +77,21 @@ public BlockBlobsGetBlockListHeaders(HttpHeaders rawHeaders) { this.lastModified = null; } this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); - this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); - String xMsBlobContentLength = rawHeaders.getValue(X_MS_BLOB_CONTENT_LENGTH); - if (xMsBlobContentLength != null) { - this.xMsBlobContentLength = Long.parseLong(xMsBlobContentLength); + String blobContentLength = rawHeaders.getValue(X_MS_BLOB_CONTENT_LENGTH); + if (blobContentLength != null) { + this.blobContentLength = Long.parseLong(blobContentLength); } else { - this.xMsBlobContentLength = null; + this.blobContentLength = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -114,22 +107,6 @@ public OffsetDateTime getLastModified() { return this.lastModified.getDateTime(); } - /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the BlockBlobsGetBlockListHeaders object itself. - */ - @Generated - public BlockBlobsGetBlockListHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - /** * Get the eTag property: The ETag property. * @@ -141,153 +118,55 @@ public String getETag() { } /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the BlockBlobsGetBlockListHeaders object itself. - */ - @Generated - public BlockBlobsGetBlockListHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the contentType property: The Content-Type property. - * - * @return the contentType value. - */ - @Generated - public String getContentType() { - return this.contentType; - } - - /** - * Set the contentType property: The Content-Type property. - * - * @param contentType the contentType value to set. - * @return the BlockBlobsGetBlockListHeaders object itself. - */ - @Generated - public BlockBlobsGetBlockListHeaders setContentType(String contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the xMsBlobContentLength property: The x-ms-blob-content-length property. - * - * @return the xMsBlobContentLength value. - */ - @Generated - public Long getXMsBlobContentLength() { - return this.xMsBlobContentLength; - } - - /** - * Set the xMsBlobContentLength property: The x-ms-blob-content-length property. - * - * @param xMsBlobContentLength the xMsBlobContentLength value to set. - * @return the BlockBlobsGetBlockListHeaders object itself. - */ - @Generated - public BlockBlobsGetBlockListHeaders setXMsBlobContentLength(Long xMsBlobContentLength) { - this.xMsBlobContentLength = xMsBlobContentLength; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlockBlobsGetBlockListHeaders object itself. - */ - @Generated - public BlockBlobsGetBlockListHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. + * Get the blobContentLength property: The x-ms-blob-content-length property. * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlockBlobsGetBlockListHeaders object itself. + * @return the blobContentLength value. */ @Generated - public BlockBlobsGetBlockListHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; + public Long getBlobContentLength() { + return this.blobContentLength; } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the BlockBlobsGetBlockListHeaders object itself. + * @return the version value. */ @Generated - public BlockBlobsGetBlockListHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the BlockBlobsGetBlockListHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlockBlobsGetBlockListHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 deleted file mode 100644 index 02c212f1e3fab..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsPutBlobFromUrlHeaders.java +++ /dev/null @@ -1,430 +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.azure.core.annotation.Generated; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.DateTimeRfc1123; -import java.time.OffsetDateTime; -import java.util.Base64; - -/** - * The BlockBlobsPutBlobFromUrlHeaders model. - */ -@Fluent -public final class BlockBlobsPutBlobFromUrlHeaders { - /* - * The ETag property. - */ - @Generated - private String eTag; - - /* - * The Last-Modified property. - */ - @Generated - private DateTimeRfc1123 lastModified; - - /* - * The Content-MD5 property. - */ - @Generated - private byte[] contentMD5; - - /* - * The x-ms-content-crc64 property. - */ - @Generated - private byte[] xMsContentCrc64; - - /* - * The x-ms-client-request-id property. - */ - @Generated - private String xMsClientRequestId; - - /* - * The x-ms-request-id property. - */ - @Generated - private String xMsRequestId; - - /* - * The x-ms-version property. - */ - @Generated - private String xMsVersion; - - /* - * The x-ms-version-id property. - */ - @Generated - private String xMsVersionId; - - /* - * The Date property. - */ - @Generated - private DateTimeRfc1123 date; - - /* - * The x-ms-request-server-encrypted property. - */ - @Generated - private Boolean xMsRequestServerEncrypted; - - /* - * The x-ms-encryption-key-sha256 property. - */ - @Generated - private String xMsEncryptionKeySha256; - - /* - * The x-ms-encryption-scope property. - */ - @Generated - private String xMsEncryptionScope; - - private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); - - 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_REQUEST_SERVER_ENCRYPTED - = HttpHeaderName.fromString("x-ms-request-server-encrypted"); - - private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 - = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); - - 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) { - this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); - String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); - if (lastModified != null) { - this.lastModified = new DateTimeRfc1123(lastModified); - } else { - this.lastModified = null; - } - String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); - if (contentMD5 != null) { - this.contentMD5 = Base64.getDecoder().decode(contentMD5); - } else { - this.contentMD5 = null; - } - String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); - if (xMsContentCrc64 != null) { - this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); - } else { - this.xMsContentCrc64 = null; - } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); - String date = rawHeaders.getValue(HttpHeaderName.DATE); - if (date != null) { - this.date = new DateTimeRfc1123(date); - } else { - this.date = null; - } - String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); - if (xMsRequestServerEncrypted != null) { - this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); - } else { - this.xMsRequestServerEncrypted = null; - } - this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); - } - - /** - * Get the eTag property: The ETag property. - * - * @return the eTag value. - */ - @Generated - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the BlockBlobsPutBlobFromUrlHeaders object itself. - */ - @Generated - public BlockBlobsPutBlobFromUrlHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the lastModified property: The Last-Modified property. - * - * @return the lastModified value. - */ - @Generated - public OffsetDateTime getLastModified() { - if (this.lastModified == null) { - return null; - } - return this.lastModified.getDateTime(); - } - - /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the BlockBlobsPutBlobFromUrlHeaders object itself. - */ - @Generated - public BlockBlobsPutBlobFromUrlHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the contentMD5 property: The Content-MD5 property. - * - * @return the contentMD5 value. - */ - @Generated - public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); - } - - /** - * Set the contentMD5 property: The Content-MD5 property. - * - * @param contentMD5 the contentMD5 value to set. - * @return the BlockBlobsPutBlobFromUrlHeaders object itself. - */ - @Generated - public BlockBlobsPutBlobFromUrlHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); - return this; - } - - /** - * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @return the xMsContentCrc64 value. - */ - @Generated - public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); - } - - /** - * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @param xMsContentCrc64 the xMsContentCrc64 value to set. - * @return the BlockBlobsPutBlobFromUrlHeaders object itself. - */ - @Generated - public BlockBlobsPutBlobFromUrlHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlockBlobsPutBlobFromUrlHeaders object itself. - */ - @Generated - public BlockBlobsPutBlobFromUrlHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlockBlobsPutBlobFromUrlHeaders object itself. - */ - @Generated - public BlockBlobsPutBlobFromUrlHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the BlockBlobsPutBlobFromUrlHeaders object itself. - */ - @Generated - public BlockBlobsPutBlobFromUrlHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the xMsVersionId property: The x-ms-version-id property. - * - * @return the xMsVersionId value. - */ - @Generated - public String getXMsVersionId() { - return this.xMsVersionId; - } - - /** - * Set the xMsVersionId property: The x-ms-version-id property. - * - * @param xMsVersionId the xMsVersionId value to set. - * @return the BlockBlobsPutBlobFromUrlHeaders object itself. - */ - @Generated - public BlockBlobsPutBlobFromUrlHeaders setXMsVersionId(String xMsVersionId) { - this.xMsVersionId = xMsVersionId; - return this; - } - - /** - * Get the date property: The Date property. - * - * @return the date value. - */ - @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); - } - - /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the BlockBlobsPutBlobFromUrlHeaders object itself. - */ - @Generated - public BlockBlobsPutBlobFromUrlHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @return the xMsRequestServerEncrypted value. - */ - @Generated - public Boolean isXMsRequestServerEncrypted() { - return this.xMsRequestServerEncrypted; - } - - /** - * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. - * @return the BlockBlobsPutBlobFromUrlHeaders object itself. - */ - @Generated - public BlockBlobsPutBlobFromUrlHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { - this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; - return this; - } - - /** - * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @return the xMsEncryptionKeySha256 value. - */ - @Generated - public String getXMsEncryptionKeySha256() { - return this.xMsEncryptionKeySha256; - } - - /** - * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. - * @return the BlockBlobsPutBlobFromUrlHeaders object itself. - */ - @Generated - public BlockBlobsPutBlobFromUrlHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { - this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; - return this; - } - - /** - * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * - * @return the xMsEncryptionScope value. - */ - @Generated - public String getXMsEncryptionScope() { - return this.xMsEncryptionScope; - } - - /** - * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * - * @param xMsEncryptionScope the xMsEncryptionScope value to set. - * @return the BlockBlobsPutBlobFromUrlHeaders object itself. - */ - @Generated - public BlockBlobsPutBlobFromUrlHeaders setXMsEncryptionScope(String xMsEncryptionScope) { - this.xMsEncryptionScope = xMsEncryptionScope; - return this; - } -} 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 deleted file mode 100644 index b999e937a49e6..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockFromURLHeaders.java +++ /dev/null @@ -1,329 +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.azure.core.annotation.Generated; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.DateTimeRfc1123; -import java.time.OffsetDateTime; -import java.util.Base64; - -/** - * The BlockBlobsStageBlockFromURLHeaders model. - */ -@Fluent -public final class BlockBlobsStageBlockFromURLHeaders { - /* - * The Content-MD5 property. - */ - @Generated - private byte[] contentMD5; - - /* - * The x-ms-content-crc64 property. - */ - @Generated - private byte[] xMsContentCrc64; - - /* - * The x-ms-client-request-id property. - */ - @Generated - private String xMsClientRequestId; - - /* - * The x-ms-request-id property. - */ - @Generated - private String xMsRequestId; - - /* - * The x-ms-version property. - */ - @Generated - private String xMsVersion; - - /* - * The Date property. - */ - @Generated - private DateTimeRfc1123 date; - - /* - * The x-ms-request-server-encrypted property. - */ - @Generated - private Boolean xMsRequestServerEncrypted; - - /* - * The x-ms-encryption-key-sha256 property. - */ - @Generated - private String xMsEncryptionKeySha256; - - /* - * The x-ms-encryption-scope property. - */ - @Generated - private String xMsEncryptionScope; - - private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); - - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - - private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED - = HttpHeaderName.fromString("x-ms-request-server-encrypted"); - - private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 - = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); - - 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) { - String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); - if (contentMD5 != null) { - this.contentMD5 = Base64.getDecoder().decode(contentMD5); - } else { - this.contentMD5 = null; - } - String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); - if (xMsContentCrc64 != null) { - this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); - } else { - this.xMsContentCrc64 = null; - } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - String date = rawHeaders.getValue(HttpHeaderName.DATE); - if (date != null) { - this.date = new DateTimeRfc1123(date); - } else { - this.date = null; - } - String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); - if (xMsRequestServerEncrypted != null) { - this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); - } else { - this.xMsRequestServerEncrypted = null; - } - this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); - } - - /** - * Get the contentMD5 property: The Content-MD5 property. - * - * @return the contentMD5 value. - */ - @Generated - public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); - } - - /** - * Set the contentMD5 property: The Content-MD5 property. - * - * @param contentMD5 the contentMD5 value to set. - * @return the BlockBlobsStageBlockFromURLHeaders object itself. - */ - @Generated - public BlockBlobsStageBlockFromURLHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); - return this; - } - - /** - * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @return the xMsContentCrc64 value. - */ - @Generated - public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); - } - - /** - * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @param xMsContentCrc64 the xMsContentCrc64 value to set. - * @return the BlockBlobsStageBlockFromURLHeaders object itself. - */ - @Generated - public BlockBlobsStageBlockFromURLHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlockBlobsStageBlockFromURLHeaders object itself. - */ - @Generated - public BlockBlobsStageBlockFromURLHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlockBlobsStageBlockFromURLHeaders object itself. - */ - @Generated - public BlockBlobsStageBlockFromURLHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the BlockBlobsStageBlockFromURLHeaders object itself. - */ - @Generated - public BlockBlobsStageBlockFromURLHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the date property: The Date property. - * - * @return the date value. - */ - @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); - } - - /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the BlockBlobsStageBlockFromURLHeaders object itself. - */ - @Generated - public BlockBlobsStageBlockFromURLHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @return the xMsRequestServerEncrypted value. - */ - @Generated - public Boolean isXMsRequestServerEncrypted() { - return this.xMsRequestServerEncrypted; - } - - /** - * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. - * @return the BlockBlobsStageBlockFromURLHeaders object itself. - */ - @Generated - public BlockBlobsStageBlockFromURLHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { - this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; - return this; - } - - /** - * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @return the xMsEncryptionKeySha256 value. - */ - @Generated - public String getXMsEncryptionKeySha256() { - return this.xMsEncryptionKeySha256; - } - - /** - * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. - * @return the BlockBlobsStageBlockFromURLHeaders object itself. - */ - @Generated - public BlockBlobsStageBlockFromURLHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { - this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; - return this; - } - - /** - * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * - * @return the xMsEncryptionScope value. - */ - @Generated - public String getXMsEncryptionScope() { - return this.xMsEncryptionScope; - } - - /** - * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * - * @param xMsEncryptionScope the xMsEncryptionScope value to set. - * @return the BlockBlobsStageBlockFromURLHeaders object itself. - */ - @Generated - public BlockBlobsStageBlockFromURLHeaders setXMsEncryptionScope(String xMsEncryptionScope) { - this.xMsEncryptionScope = xMsEncryptionScope; - return this; - } -} 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 new file mode 100644 index 0000000000000..6b3c7631c7889 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockFromUrlHeaders.java @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.DateTimeRfc1123; +import java.time.OffsetDateTime; +import java.util.Base64; + +/** + * The BlockBlobsStageBlockFromUrlHeaders model. + */ +@Immutable +public final class BlockBlobsStageBlockFromUrlHeaders { + /* + * The Content-MD5 property. + */ + @Generated + private final byte[] contentMd5; + + /* + * The x-ms-content-crc64 property. + */ + @Generated + private final byte[] contentCrc64; + + /* + * The x-ms-request-server-encrypted property. + */ + @Generated + private final Boolean isServerEncrypted; + + /* + * The x-ms-encryption-key-sha256 property. + */ + @Generated + private final String encryptionKeySha256; + + /* + * The x-ms-encryption-scope property. + */ + @Generated + private final String encryptionScope; + + /* + * The Date property. + */ + @Generated + private final DateTimeRfc1123 date; + + /* + * The x-ms-version property. + */ + @Generated + private final String version; + + /* + * The x-ms-request-id property. + */ + @Generated + private final String requestId; + + /* + * The x-ms-client-request-id property. + */ + @Generated + private final String clientRequestId; + + private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); + + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + // 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) { + String contentMd5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMd5 != null) { + this.contentMd5 = Base64.getDecoder().decode(contentMd5); + } else { + this.contentMd5 = null; + } + String contentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (contentCrc64 != null) { + this.contentCrc64 = Base64.getDecoder().decode(contentCrc64); + } else { + this.contentCrc64 = null; + } + String isServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (isServerEncrypted != null) { + this.isServerEncrypted = Boolean.parseBoolean(isServerEncrypted); + } else { + this.isServerEncrypted = null; + } + this.encryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.encryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } else { + this.date = null; + } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); + } + + /** + * Get the contentMd5 property: The Content-MD5 property. + * + * @return the contentMd5 value. + */ + @Generated + public byte[] getContentMd5() { + return CoreUtils.clone(this.contentMd5); + } + + /** + * Get the contentCrc64 property: The x-ms-content-crc64 property. + * + * @return the contentCrc64 value. + */ + @Generated + public byte[] getContentCrc64() { + return CoreUtils.clone(this.contentCrc64); + } + + /** + * Get the isServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @return the isServerEncrypted value. + */ + @Generated + public Boolean isServerEncrypted() { + return this.isServerEncrypted; + } + + /** + * Get the encryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the encryptionKeySha256 value. + */ + @Generated + public String getEncryptionKeySha256() { + return this.encryptionKeySha256; + } + + /** + * Get the encryptionScope property: The x-ms-encryption-scope property. + * + * @return the encryptionScope value. + */ + @Generated + public String getEncryptionScope() { + return this.encryptionScope; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + @Generated + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); + } + + /** + * Get the version property: The x-ms-version property. + * + * @return the version value. + */ + @Generated + public String getVersion() { + return this.version; + } + + /** + * Get the requestId property: The x-ms-request-id property. + * + * @return the requestId value. + */ + @Generated + public String getRequestId() { + return this.requestId; + } + + /** + * Get the clientRequestId property: The x-ms-client-request-id property. + * + * @return the clientRequestId value. + */ + @Generated + public String getClientRequestId() { + return this.clientRequestId; + } +} 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 83a37945ee43a..6e7ea4d2e9eb1 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; @@ -16,69 +16,67 @@ /** * The BlockBlobsStageBlockHeaders model. */ -@Fluent +@Immutable public final class BlockBlobsStageBlockHeaders { /* * The Content-MD5 property. */ @Generated - private byte[] contentMD5; + private final byte[] contentMd5; /* - * The x-ms-client-request-id property. + * The x-ms-content-crc64 property. */ @Generated - private String xMsClientRequestId; + private final byte[] contentCrc64; /* - * The x-ms-request-id property. + * The x-ms-request-server-encrypted property. */ @Generated - private String xMsRequestId; + private final Boolean isServerEncrypted; /* - * The x-ms-version property. + * The x-ms-encryption-key-sha256 property. */ @Generated - private String xMsVersion; + private final String encryptionKeySha256; /* - * The Date property. + * The x-ms-encryption-scope property. */ @Generated - private DateTimeRfc1123 date; + private final String encryptionScope; /* - * The x-ms-content-crc64 property. + * The x-ms-structured-body property. */ @Generated - private byte[] xMsContentCrc64; + private final String structuredBodyType; /* - * The x-ms-request-server-encrypted property. + * The Date property. */ @Generated - private Boolean xMsRequestServerEncrypted; + private final DateTimeRfc1123 date; /* - * The x-ms-encryption-key-sha256 property. + * The x-ms-version property. */ @Generated - private String xMsEncryptionKeySha256; + private final String version; /* - * The x-ms-encryption-scope property. + * The x-ms-request-id property. */ @Generated - private String xMsEncryptionScope; + private final String requestId; /* - * The x-ms-structured-body property. + * The x-ms-client-request-id property. */ @Generated - private String xMsStructuredBody; - - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private final String clientRequestId; private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); @@ -92,6 +90,8 @@ public final class BlockBlobsStageBlockHeaders { private static final HttpHeaderName X_MS_STRUCTURED_BODY = HttpHeaderName.fromString("x-ms-structured-body"); + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlockBlobsStageBlockHeaders class. @@ -99,124 +99,96 @@ public final class BlockBlobsStageBlockHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BlockBlobsStageBlockHeaders(HttpHeaders rawHeaders) { - String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); - if (contentMD5 != null) { - this.contentMD5 = Base64.getDecoder().decode(contentMD5); + String contentMd5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMd5 != null) { + this.contentMd5 = Base64.getDecoder().decode(contentMd5); } else { - this.contentMD5 = null; + this.contentMd5 = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - String date = rawHeaders.getValue(HttpHeaderName.DATE); - if (date != null) { - this.date = new DateTimeRfc1123(date); + String contentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (contentCrc64 != null) { + this.contentCrc64 = Base64.getDecoder().decode(contentCrc64); } else { - this.date = null; + this.contentCrc64 = null; } - String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); - if (xMsContentCrc64 != null) { - this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); + String isServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (isServerEncrypted != null) { + this.isServerEncrypted = Boolean.parseBoolean(isServerEncrypted); } else { - this.xMsContentCrc64 = null; + this.isServerEncrypted = null; } - String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); - if (xMsRequestServerEncrypted != null) { - this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); + this.encryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.encryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + this.structuredBodyType = rawHeaders.getValue(X_MS_STRUCTURED_BODY); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); } else { - this.xMsRequestServerEncrypted = null; + this.date = null; } - this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); - this.xMsStructuredBody = rawHeaders.getValue(X_MS_STRUCTURED_BODY); - } - - /** - * Get the contentMD5 property: The Content-MD5 property. - * - * @return the contentMD5 value. - */ - @Generated - public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Set the contentMD5 property: The Content-MD5 property. + * Get the contentMd5 property: The Content-MD5 property. * - * @param contentMD5 the contentMD5 value to set. - * @return the BlockBlobsStageBlockHeaders object itself. + * @return the contentMd5 value. */ @Generated - public BlockBlobsStageBlockHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); - return this; + public byte[] getContentMd5() { + return CoreUtils.clone(this.contentMd5); } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * Get the contentCrc64 property: The x-ms-content-crc64 property. * - * @return the xMsClientRequestId value. + * @return the contentCrc64 value. */ @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; + public byte[] getContentCrc64() { + return CoreUtils.clone(this.contentCrc64); } /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * Get the isServerEncrypted property: The x-ms-request-server-encrypted property. * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlockBlobsStageBlockHeaders object itself. + * @return the isServerEncrypted value. */ @Generated - public BlockBlobsStageBlockHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; + public Boolean isServerEncrypted() { + return this.isServerEncrypted; } /** - * Get the xMsRequestId property: The x-ms-request-id property. + * Get the encryptionKeySha256 property: The x-ms-encryption-key-sha256 property. * - * @return the xMsRequestId value. + * @return the encryptionKeySha256 value. */ @Generated - public String getXMsRequestId() { - return this.xMsRequestId; + public String getEncryptionKeySha256() { + return this.encryptionKeySha256; } /** - * Set the xMsRequestId property: The x-ms-request-id property. + * Get the encryptionScope property: The x-ms-encryption-scope property. * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlockBlobsStageBlockHeaders object itself. + * @return the encryptionScope value. */ @Generated - public BlockBlobsStageBlockHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; + public String getEncryptionScope() { + return this.encryptionScope; } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the structuredBodyType property: The x-ms-structured-body property. * - * @return the xMsVersion value. + * @return the structuredBodyType value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the BlockBlobsStageBlockHeaders object itself. - */ - @Generated - public BlockBlobsStageBlockHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getStructuredBodyType() { + return this.structuredBodyType; } /** @@ -233,128 +205,32 @@ public OffsetDateTime getDate() { } /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the BlockBlobsStageBlockHeaders object itself. - */ - @Generated - public BlockBlobsStageBlockHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @return the xMsContentCrc64 value. - */ - @Generated - public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); - } - - /** - * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @param xMsContentCrc64 the xMsContentCrc64 value to set. - * @return the BlockBlobsStageBlockHeaders object itself. - */ - @Generated - public BlockBlobsStageBlockHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); - return this; - } - - /** - * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @return the xMsRequestServerEncrypted value. - */ - @Generated - public Boolean isXMsRequestServerEncrypted() { - return this.xMsRequestServerEncrypted; - } - - /** - * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. - * @return the BlockBlobsStageBlockHeaders object itself. - */ - @Generated - public BlockBlobsStageBlockHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { - this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; - return this; - } - - /** - * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @return the xMsEncryptionKeySha256 value. - */ - @Generated - public String getXMsEncryptionKeySha256() { - return this.xMsEncryptionKeySha256; - } - - /** - * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. - * @return the BlockBlobsStageBlockHeaders object itself. - */ - @Generated - public BlockBlobsStageBlockHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { - this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; - return this; - } - - /** - * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * - * @return the xMsEncryptionScope value. - */ - @Generated - public String getXMsEncryptionScope() { - return this.xMsEncryptionScope; - } - - /** - * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. + * Get the version property: The x-ms-version property. * - * @param xMsEncryptionScope the xMsEncryptionScope value to set. - * @return the BlockBlobsStageBlockHeaders object itself. + * @return the version value. */ @Generated - public BlockBlobsStageBlockHeaders setXMsEncryptionScope(String xMsEncryptionScope) { - this.xMsEncryptionScope = xMsEncryptionScope; - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsStructuredBody property: The x-ms-structured-body property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsStructuredBody value. + * @return the requestId value. */ @Generated - public String getXMsStructuredBody() { - return this.xMsStructuredBody; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsStructuredBody property: The x-ms-structured-body property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsStructuredBody the xMsStructuredBody value to set. - * @return the BlockBlobsStageBlockHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlockBlobsStageBlockHeaders setXMsStructuredBody(String xMsStructuredBody) { - this.xMsStructuredBody = xMsStructuredBody; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadBlobFromUrlHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadBlobFromUrlHeaders.java new file mode 100644 index 0000000000000..4ed5bcf844b35 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadBlobFromUrlHeaders.java @@ -0,0 +1,278 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.DateTimeRfc1123; +import java.time.OffsetDateTime; +import java.util.Base64; + +/** + * The BlockBlobsUploadBlobFromUrlHeaders model. + */ +@Immutable +public final class BlockBlobsUploadBlobFromUrlHeaders { + /* + * The ETag property. + */ + @Generated + private final String eTag; + + /* + * The Last-Modified property. + */ + @Generated + private final DateTimeRfc1123 lastModified; + + /* + * The Content-MD5 property. + */ + @Generated + private final byte[] contentMd5; + + /* + * The x-ms-content-crc64 property. + */ + @Generated + private final byte[] contentCrc64; + + /* + * The x-ms-version-id property. + */ + @Generated + private final String versionId; + + /* + * The x-ms-request-server-encrypted property. + */ + @Generated + private final Boolean isServerEncrypted; + + /* + * The x-ms-encryption-key-sha256 property. + */ + @Generated + private final String encryptionKeySha256; + + /* + * The x-ms-encryption-scope property. + */ + @Generated + private final String encryptionScope; + + /* + * The Date property. + */ + @Generated + private final DateTimeRfc1123 date; + + /* + * The x-ms-version property. + */ + @Generated + private final String version; + + /* + * The x-ms-request-id property. + */ + @Generated + private final String requestId; + + /* + * The x-ms-client-request-id property. + */ + @Generated + private final String clientRequestId; + + private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); + + private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); + + private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of BlockBlobsUploadBlobFromUrlHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public BlockBlobsUploadBlobFromUrlHeaders(HttpHeaders rawHeaders) { + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } else { + this.lastModified = null; + } + String contentMd5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMd5 != null) { + this.contentMd5 = Base64.getDecoder().decode(contentMd5); + } else { + this.contentMd5 = null; + } + String contentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (contentCrc64 != null) { + this.contentCrc64 = Base64.getDecoder().decode(contentCrc64); + } else { + this.contentCrc64 = null; + } + this.versionId = rawHeaders.getValue(X_MS_VERSION_ID); + String isServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (isServerEncrypted != null) { + this.isServerEncrypted = Boolean.parseBoolean(isServerEncrypted); + } else { + this.isServerEncrypted = null; + } + this.encryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.encryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } else { + this.date = null; + } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); + } + + /** + * Get the eTag property: The ETag property. + * + * @return the eTag value. + */ + @Generated + public String getETag() { + return this.eTag; + } + + /** + * Get the lastModified property: The Last-Modified property. + * + * @return the lastModified value. + */ + @Generated + public OffsetDateTime getLastModified() { + if (this.lastModified == null) { + return null; + } + return this.lastModified.getDateTime(); + } + + /** + * Get the contentMd5 property: The Content-MD5 property. + * + * @return the contentMd5 value. + */ + @Generated + public byte[] getContentMd5() { + return CoreUtils.clone(this.contentMd5); + } + + /** + * Get the contentCrc64 property: The x-ms-content-crc64 property. + * + * @return the contentCrc64 value. + */ + @Generated + public byte[] getContentCrc64() { + return CoreUtils.clone(this.contentCrc64); + } + + /** + * Get the versionId property: The x-ms-version-id property. + * + * @return the versionId value. + */ + @Generated + public String getVersionId() { + return this.versionId; + } + + /** + * Get the isServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @return the isServerEncrypted value. + */ + @Generated + public Boolean isServerEncrypted() { + return this.isServerEncrypted; + } + + /** + * Get the encryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the encryptionKeySha256 value. + */ + @Generated + public String getEncryptionKeySha256() { + return this.encryptionKeySha256; + } + + /** + * Get the encryptionScope property: The x-ms-encryption-scope property. + * + * @return the encryptionScope value. + */ + @Generated + public String getEncryptionScope() { + return this.encryptionScope; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + @Generated + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); + } + + /** + * Get the version property: The x-ms-version property. + * + * @return the version value. + */ + @Generated + public String getVersion() { + return this.version; + } + + /** + * Get the requestId property: The x-ms-request-id property. + * + * @return the requestId value. + */ + @Generated + public String getRequestId() { + return this.requestId; + } + + /** + * Get the clientRequestId property: The x-ms-client-request-id property. + * + * @return the clientRequestId value. + */ + @Generated + public String getClientRequestId() { + return this.clientRequestId; + } +} 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 63fa2cd2212d9..e504f9d2ba272 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; @@ -16,90 +16,88 @@ /** * The BlockBlobsUploadHeaders model. */ -@Fluent +@Immutable public final class BlockBlobsUploadHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* * The Content-MD5 property. */ @Generated - private byte[] contentMD5; + private final byte[] contentMd5; /* * The x-ms-content-crc64 property. */ @Generated - private byte[] xMsContentCrc64; + private final byte[] contentCrc64; /* - * The x-ms-client-request-id property. + * The x-ms-version-id property. */ @Generated - private String xMsClientRequestId; + private final String versionId; /* - * The x-ms-request-id property. + * The x-ms-request-server-encrypted property. */ @Generated - private String xMsRequestId; + private final Boolean isServerEncrypted; /* - * The x-ms-version property. + * The x-ms-encryption-key-sha256 property. */ @Generated - private String xMsVersion; + private final String encryptionKeySha256; /* - * The x-ms-version-id property. + * The x-ms-encryption-scope property. */ @Generated - private String xMsVersionId; + private final String encryptionScope; /* - * The Date property. + * The x-ms-structured-body property. */ @Generated - private DateTimeRfc1123 date; + private final String structuredBodyType; /* - * The x-ms-request-server-encrypted property. + * The Date property. */ @Generated - private Boolean xMsRequestServerEncrypted; + private final DateTimeRfc1123 date; /* - * The x-ms-encryption-key-sha256 property. + * The x-ms-version property. */ @Generated - private String xMsEncryptionKeySha256; + private final String version; /* - * The x-ms-encryption-scope property. + * The x-ms-request-id property. */ @Generated - private String xMsEncryptionScope; + private final String requestId; /* - * The x-ms-structured-body property. + * The x-ms-client-request-id property. */ @Generated - private String xMsStructuredBody; + private final String clientRequestId; private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); - 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_REQUEST_SERVER_ENCRYPTED @@ -112,6 +110,8 @@ public final class BlockBlobsUploadHeaders { private static final HttpHeaderName X_MS_STRUCTURED_BODY = HttpHeaderName.fromString("x-ms-structured-body"); + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + // HttpHeaders containing the raw property values. /** * Creates an instance of BlockBlobsUploadHeaders class. @@ -126,37 +126,37 @@ public BlockBlobsUploadHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); - if (contentMD5 != null) { - this.contentMD5 = Base64.getDecoder().decode(contentMD5); + String contentMd5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMd5 != null) { + this.contentMd5 = Base64.getDecoder().decode(contentMd5); + } else { + this.contentMd5 = null; + } + String contentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (contentCrc64 != null) { + this.contentCrc64 = Base64.getDecoder().decode(contentCrc64); } else { - this.contentMD5 = null; + this.contentCrc64 = null; } - String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); - if (xMsContentCrc64 != null) { - this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); + this.versionId = rawHeaders.getValue(X_MS_VERSION_ID); + String isServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (isServerEncrypted != null) { + this.isServerEncrypted = Boolean.parseBoolean(isServerEncrypted); } else { - this.xMsContentCrc64 = null; + this.isServerEncrypted = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); + this.encryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.encryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + this.structuredBodyType = rawHeaders.getValue(X_MS_STRUCTURED_BODY); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } - String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); - if (xMsRequestServerEncrypted != null) { - this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); - } else { - this.xMsRequestServerEncrypted = null; - } - this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); - this.xMsStructuredBody = rawHeaders.getValue(X_MS_STRUCTURED_BODY); + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -169,18 +169,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the BlockBlobsUploadHeaders object itself. - */ - @Generated - public BlockBlobsUploadHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -195,151 +183,73 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the BlockBlobsUploadHeaders object itself. - */ - @Generated - public BlockBlobsUploadHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the contentMD5 property: The Content-MD5 property. - * - * @return the contentMD5 value. - */ - @Generated - public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); - } - - /** - * Set the contentMD5 property: The Content-MD5 property. - * - * @param contentMD5 the contentMD5 value to set. - * @return the BlockBlobsUploadHeaders object itself. - */ - @Generated - public BlockBlobsUploadHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); - return this; - } - - /** - * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @return the xMsContentCrc64 value. - */ - @Generated - public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); - } - - /** - * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @param xMsContentCrc64 the xMsContentCrc64 value to set. - * @return the BlockBlobsUploadHeaders object itself. - */ - @Generated - public BlockBlobsUploadHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * Get the contentMd5 property: The Content-MD5 property. * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the BlockBlobsUploadHeaders object itself. + * @return the contentMd5 value. */ @Generated - public BlockBlobsUploadHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; + public byte[] getContentMd5() { + return CoreUtils.clone(this.contentMd5); } /** - * Get the xMsRequestId property: The x-ms-request-id property. + * Get the contentCrc64 property: The x-ms-content-crc64 property. * - * @return the xMsRequestId value. + * @return the contentCrc64 value. */ @Generated - public String getXMsRequestId() { - return this.xMsRequestId; + public byte[] getContentCrc64() { + return CoreUtils.clone(this.contentCrc64); } /** - * Set the xMsRequestId property: The x-ms-request-id property. + * Get the versionId property: The x-ms-version-id property. * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BlockBlobsUploadHeaders object itself. + * @return the versionId value. */ @Generated - public BlockBlobsUploadHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; + public String getVersionId() { + return this.versionId; } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the isServerEncrypted property: The x-ms-request-server-encrypted property. * - * @return the xMsVersion value. + * @return the isServerEncrypted value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public Boolean isServerEncrypted() { + return this.isServerEncrypted; } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the encryptionKeySha256 property: The x-ms-encryption-key-sha256 property. * - * @param xMsVersion the xMsVersion value to set. - * @return the BlockBlobsUploadHeaders object itself. + * @return the encryptionKeySha256 value. */ @Generated - public BlockBlobsUploadHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getEncryptionKeySha256() { + return this.encryptionKeySha256; } /** - * Get the xMsVersionId property: The x-ms-version-id property. + * Get the encryptionScope property: The x-ms-encryption-scope property. * - * @return the xMsVersionId value. + * @return the encryptionScope value. */ @Generated - public String getXMsVersionId() { - return this.xMsVersionId; + public String getEncryptionScope() { + return this.encryptionScope; } /** - * Set the xMsVersionId property: The x-ms-version-id property. + * Get the structuredBodyType property: The x-ms-structured-body property. * - * @param xMsVersionId the xMsVersionId value to set. - * @return the BlockBlobsUploadHeaders object itself. + * @return the structuredBodyType value. */ @Generated - public BlockBlobsUploadHeaders setXMsVersionId(String xMsVersionId) { - this.xMsVersionId = xMsVersionId; - return this; + public String getStructuredBodyType() { + return this.structuredBodyType; } /** @@ -356,106 +266,32 @@ public OffsetDateTime getDate() { } /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the BlockBlobsUploadHeaders object itself. - */ - @Generated - public BlockBlobsUploadHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @return the xMsRequestServerEncrypted value. - */ - @Generated - public Boolean isXMsRequestServerEncrypted() { - return this.xMsRequestServerEncrypted; - } - - /** - * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. - * @return the BlockBlobsUploadHeaders object itself. - */ - @Generated - public BlockBlobsUploadHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { - this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; - return this; - } - - /** - * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @return the xMsEncryptionKeySha256 value. - */ - @Generated - public String getXMsEncryptionKeySha256() { - return this.xMsEncryptionKeySha256; - } - - /** - * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. - * @return the BlockBlobsUploadHeaders object itself. - */ - @Generated - public BlockBlobsUploadHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { - this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; - return this; - } - - /** - * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * - * @return the xMsEncryptionScope value. - */ - @Generated - public String getXMsEncryptionScope() { - return this.xMsEncryptionScope; - } - - /** - * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. + * Get the version property: The x-ms-version property. * - * @param xMsEncryptionScope the xMsEncryptionScope value to set. - * @return the BlockBlobsUploadHeaders object itself. + * @return the version value. */ @Generated - public BlockBlobsUploadHeaders setXMsEncryptionScope(String xMsEncryptionScope) { - this.xMsEncryptionScope = xMsEncryptionScope; - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsStructuredBody property: The x-ms-structured-body property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsStructuredBody value. + * @return the requestId value. */ @Generated - public String getXMsStructuredBody() { - return this.xMsStructuredBody; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsStructuredBody property: The x-ms-structured-body property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsStructuredBody the xMsStructuredBody value to set. - * @return the BlockBlobsUploadHeaders object itself. + * @return the clientRequestId value. */ @Generated - public BlockBlobsUploadHeaders setXMsStructuredBody(String xMsStructuredBody) { - this.xMsStructuredBody = xMsStructuredBody; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 f793dcf8edc05..5b8cad49bc365 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,49 +14,49 @@ /** * The ContainersAcquireLeaseHeaders model. */ -@Fluent +@Immutable public final class ContainersAcquireLeaseHeaders { /* - * The ETag property. + * The x-ms-lease-id property. */ @Generated - private String eTag; + private final String leaseId; /* - * The Last-Modified property. + * The ETag property. */ @Generated - private DateTimeRfc1123 lastModified; + private final String eTag; /* - * The x-ms-lease-id property. + * The Last-Modified property. */ @Generated - private String xMsLeaseId; + private final DateTimeRfc1123 lastModified; /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); @@ -69,6 +69,7 @@ public final class ContainersAcquireLeaseHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersAcquireLeaseHeaders(HttpHeaders rawHeaders) { + this.leaseId = rawHeaders.getValue(X_MS_LEASE_ID); this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); if (lastModified != null) { @@ -76,38 +77,35 @@ public ContainersAcquireLeaseHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - this.xMsLeaseId = rawHeaders.getValue(X_MS_LEASE_ID); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the eTag property: The ETag property. + * Get the leaseId property: The x-ms-lease-id property. * - * @return the eTag value. + * @return the leaseId value. */ @Generated - public String getETag() { - return this.eTag; + public String getLeaseId() { + return this.leaseId; } /** - * Set the eTag property: The ETag property. + * Get the eTag property: The ETag property. * - * @param eTag the eTag value to set. - * @return the ContainersAcquireLeaseHeaders object itself. + * @return the eTag value. */ @Generated - public ContainersAcquireLeaseHeaders setETag(String eTag) { - this.eTag = eTag; - return this; + public String getETag() { + return this.eTag; } /** @@ -124,135 +122,45 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. + * Get the date property: The Date property. * - * @param lastModified the lastModified value to set. - * @return the ContainersAcquireLeaseHeaders object itself. + * @return the date value. */ @Generated - public ContainersAcquireLeaseHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); + public OffsetDateTime getDate() { + if (this.date == null) { + return null; } - return this; - } - - /** - * Get the xMsLeaseId property: The x-ms-lease-id property. - * - * @return the xMsLeaseId value. - */ - @Generated - public String getXMsLeaseId() { - return this.xMsLeaseId; - } - - /** - * Set the xMsLeaseId property: The x-ms-lease-id property. - * - * @param xMsLeaseId the xMsLeaseId value to set. - * @return the ContainersAcquireLeaseHeaders object itself. - */ - @Generated - public ContainersAcquireLeaseHeaders setXMsLeaseId(String xMsLeaseId) { - this.xMsLeaseId = xMsLeaseId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ContainersAcquireLeaseHeaders object itself. - */ - @Generated - public ContainersAcquireLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ContainersAcquireLeaseHeaders object itself. - */ - @Generated - public ContainersAcquireLeaseHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; + return this.date.getDateTime(); } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @return the xMsVersion value. + * @return the version value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public String getVersion() { + return this.version; } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the requestId property: The x-ms-request-id property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ContainersAcquireLeaseHeaders object itself. + * @return the requestId value. */ @Generated - public ContainersAcquireLeaseHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getRequestId() { + return this.requestId; } /** - * Get the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @return the date value. + * @return the clientRequestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); - } - - /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the ContainersAcquireLeaseHeaders object itself. - */ - @Generated - public ContainersAcquireLeaseHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 fa3cbfd4d603b..0b010553387a9 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,49 +14,49 @@ /** * The ContainersBreakLeaseHeaders model. */ -@Fluent +@Immutable public final class ContainersBreakLeaseHeaders { /* - * The ETag property. + * The x-ms-lease-time property. */ @Generated - private String eTag; + private final Integer leaseTime; /* - * The Last-Modified property. + * The ETag property. */ @Generated - private DateTimeRfc1123 lastModified; + private final String eTag; /* - * The x-ms-lease-time property. + * The Last-Modified property. */ @Generated - private Integer xMsLeaseTime; + private final DateTimeRfc1123 lastModified; /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_LEASE_TIME = HttpHeaderName.fromString("x-ms-lease-time"); @@ -69,6 +69,12 @@ public final class ContainersBreakLeaseHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersBreakLeaseHeaders(HttpHeaders rawHeaders) { + String leaseTime = rawHeaders.getValue(X_MS_LEASE_TIME); + if (leaseTime != null) { + this.leaseTime = Integer.parseInt(leaseTime); + } else { + this.leaseTime = null; + } this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); if (lastModified != null) { @@ -76,43 +82,35 @@ public ContainersBreakLeaseHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - String xMsLeaseTime = rawHeaders.getValue(X_MS_LEASE_TIME); - if (xMsLeaseTime != null) { - this.xMsLeaseTime = Integer.parseInt(xMsLeaseTime); - } else { - this.xMsLeaseTime = null; - } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the eTag property: The ETag property. + * Get the leaseTime property: The x-ms-lease-time property. * - * @return the eTag value. + * @return the leaseTime value. */ @Generated - public String getETag() { - return this.eTag; + public Integer getLeaseTime() { + return this.leaseTime; } /** - * Set the eTag property: The ETag property. + * Get the eTag property: The ETag property. * - * @param eTag the eTag value to set. - * @return the ContainersBreakLeaseHeaders object itself. + * @return the eTag value. */ @Generated - public ContainersBreakLeaseHeaders setETag(String eTag) { - this.eTag = eTag; - return this; + public String getETag() { + return this.eTag; } /** @@ -129,135 +127,45 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. + * Get the date property: The Date property. * - * @param lastModified the lastModified value to set. - * @return the ContainersBreakLeaseHeaders object itself. + * @return the date value. */ @Generated - public ContainersBreakLeaseHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); + public OffsetDateTime getDate() { + if (this.date == null) { + return null; } - return this; - } - - /** - * Get the xMsLeaseTime property: The x-ms-lease-time property. - * - * @return the xMsLeaseTime value. - */ - @Generated - public Integer getXMsLeaseTime() { - return this.xMsLeaseTime; - } - - /** - * Set the xMsLeaseTime property: The x-ms-lease-time property. - * - * @param xMsLeaseTime the xMsLeaseTime value to set. - * @return the ContainersBreakLeaseHeaders object itself. - */ - @Generated - public ContainersBreakLeaseHeaders setXMsLeaseTime(Integer xMsLeaseTime) { - this.xMsLeaseTime = xMsLeaseTime; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ContainersBreakLeaseHeaders object itself. - */ - @Generated - public ContainersBreakLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ContainersBreakLeaseHeaders object itself. - */ - @Generated - public ContainersBreakLeaseHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ContainersBreakLeaseHeaders object itself. + * @return the version value. */ @Generated - public ContainersBreakLeaseHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the ContainersBreakLeaseHeaders object itself. + * @return the clientRequestId value. */ @Generated - public ContainersBreakLeaseHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 d4d56430b99e8..ddf5cb32661b6 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,49 +14,49 @@ /** * The ContainersChangeLeaseHeaders model. */ -@Fluent +@Immutable public final class ContainersChangeLeaseHeaders { /* - * The ETag property. + * The x-ms-lease-id property. */ @Generated - private String eTag; + private final String leaseId; /* - * The Last-Modified property. + * The ETag property. */ @Generated - private DateTimeRfc1123 lastModified; + private final String eTag; /* - * The x-ms-lease-id property. + * The Last-Modified property. */ @Generated - private String xMsLeaseId; + private final DateTimeRfc1123 lastModified; /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); @@ -69,6 +69,7 @@ public final class ContainersChangeLeaseHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersChangeLeaseHeaders(HttpHeaders rawHeaders) { + this.leaseId = rawHeaders.getValue(X_MS_LEASE_ID); this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); if (lastModified != null) { @@ -76,38 +77,35 @@ public ContainersChangeLeaseHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - this.xMsLeaseId = rawHeaders.getValue(X_MS_LEASE_ID); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the eTag property: The ETag property. + * Get the leaseId property: The x-ms-lease-id property. * - * @return the eTag value. + * @return the leaseId value. */ @Generated - public String getETag() { - return this.eTag; + public String getLeaseId() { + return this.leaseId; } /** - * Set the eTag property: The ETag property. + * Get the eTag property: The ETag property. * - * @param eTag the eTag value to set. - * @return the ContainersChangeLeaseHeaders object itself. + * @return the eTag value. */ @Generated - public ContainersChangeLeaseHeaders setETag(String eTag) { - this.eTag = eTag; - return this; + public String getETag() { + return this.eTag; } /** @@ -124,135 +122,45 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. + * Get the date property: The Date property. * - * @param lastModified the lastModified value to set. - * @return the ContainersChangeLeaseHeaders object itself. + * @return the date value. */ @Generated - public ContainersChangeLeaseHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); + public OffsetDateTime getDate() { + if (this.date == null) { + return null; } - return this; - } - - /** - * Get the xMsLeaseId property: The x-ms-lease-id property. - * - * @return the xMsLeaseId value. - */ - @Generated - public String getXMsLeaseId() { - return this.xMsLeaseId; - } - - /** - * Set the xMsLeaseId property: The x-ms-lease-id property. - * - * @param xMsLeaseId the xMsLeaseId value to set. - * @return the ContainersChangeLeaseHeaders object itself. - */ - @Generated - public ContainersChangeLeaseHeaders setXMsLeaseId(String xMsLeaseId) { - this.xMsLeaseId = xMsLeaseId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ContainersChangeLeaseHeaders object itself. - */ - @Generated - public ContainersChangeLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ContainersChangeLeaseHeaders object itself. - */ - @Generated - public ContainersChangeLeaseHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; + return this.date.getDateTime(); } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @return the xMsVersion value. + * @return the version value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public String getVersion() { + return this.version; } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the requestId property: The x-ms-request-id property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ContainersChangeLeaseHeaders object itself. + * @return the requestId value. */ @Generated - public ContainersChangeLeaseHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getRequestId() { + return this.requestId; } /** - * Get the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @return the date value. + * @return the clientRequestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); - } - - /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the ContainersChangeLeaseHeaders object itself. - */ - @Generated - public ContainersChangeLeaseHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 63759461052ca..758df5846955b 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,43 +14,43 @@ /** * The ContainersCreateHeaders model. */ -@Fluent +@Immutable public final class ContainersCreateHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -68,15 +68,15 @@ public ContainersCreateHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -89,18 +89,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the ContainersCreateHeaders object itself. - */ - @Generated - public ContainersCreateHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -115,113 +103,45 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. + * Get the date property: The Date property. * - * @param lastModified the lastModified value to set. - * @return the ContainersCreateHeaders object itself. + * @return the date value. */ @Generated - public ContainersCreateHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); + public OffsetDateTime getDate() { + if (this.date == null) { + return null; } - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ContainersCreateHeaders object itself. - */ - @Generated - public ContainersCreateHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ContainersCreateHeaders object itself. - */ - @Generated - public ContainersCreateHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ContainersCreateHeaders object itself. + * @return the version value. */ @Generated - public ContainersCreateHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the ContainersCreateHeaders object itself. + * @return the clientRequestId value. */ @Generated - public ContainersCreateHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateSessionHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateSessionHeaders.java new file mode 100644 index 0000000000000..66c86f9646d04 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateSessionHeaders.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.util.DateTimeRfc1123; +import java.time.OffsetDateTime; + +/** + * The ContainersCreateSessionHeaders model. + */ +@Immutable +public final class ContainersCreateSessionHeaders { + /* + * The Date property. + */ + @Generated + private final DateTimeRfc1123 date; + + /* + * The x-ms-version property. + */ + @Generated + private final String version; + + /* + * The x-ms-request-id property. + */ + @Generated + private final String requestId; + + /* + * The x-ms-client-request-id property. + */ + @Generated + private final String clientRequestId; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ContainersCreateSessionHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ContainersCreateSessionHeaders(HttpHeaders rawHeaders) { + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } else { + this.date = null; + } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + @Generated + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); + } + + /** + * Get the version property: The x-ms-version property. + * + * @return the version value. + */ + @Generated + public String getVersion() { + return this.version; + } + + /** + * Get the requestId property: The x-ms-request-id property. + * + * @return the requestId value. + */ + @Generated + public String getRequestId() { + return this.requestId; + } + + /** + * Get the clientRequestId property: The x-ms-client-request-id property. + * + * @return the clientRequestId value. + */ + @Generated + public String getClientRequestId() { + return this.clientRequestId; + } +} 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 8f0f363206bd8..28416f24dd432 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,31 +14,31 @@ /** * The ContainersDeleteHeaders model. */ -@Fluent +@Immutable public final class ContainersDeleteHeaders { /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -49,109 +49,57 @@ public final class ContainersDeleteHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersDeleteHeaders(HttpHeaders rawHeaders) { - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ContainersDeleteHeaders object itself. - */ - @Generated - public ContainersDeleteHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ContainersDeleteHeaders object itself. - */ - @Generated - public ContainersDeleteHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ContainersDeleteHeaders object itself. + * @return the version value. */ @Generated - public ContainersDeleteHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the ContainersDeleteHeaders object itself. + * @return the clientRequestId value. */ @Generated - public ContainersDeleteHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 10af12b85fd3c..9713269116ef7 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,31 +14,31 @@ /** * The ContainersFilterBlobsHeaders model. */ -@Fluent +@Immutable public final class ContainersFilterBlobsHeaders { /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -49,109 +49,57 @@ public final class ContainersFilterBlobsHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersFilterBlobsHeaders(HttpHeaders rawHeaders) { - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ContainersFilterBlobsHeaders object itself. - */ - @Generated - public ContainersFilterBlobsHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ContainersFilterBlobsHeaders object itself. - */ - @Generated - public ContainersFilterBlobsHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ContainersFilterBlobsHeaders object itself. + * @return the version value. */ @Generated - public ContainersFilterBlobsHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the ContainersFilterBlobsHeaders object itself. + * @return the clientRequestId value. */ @Generated - public ContainersFilterBlobsHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 68a8ecd3114c9..b9d8e193bd6ec 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -15,49 +15,49 @@ /** * The ContainersGetAccessPolicyHeaders model. */ -@Fluent +@Immutable public final class ContainersGetAccessPolicyHeaders { /* * The x-ms-blob-public-access property. */ @Generated - private PublicAccessType xMsBlobPublicAccess; + private final PublicAccessType access; /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_BLOB_PUBLIC_ACCESS = HttpHeaderName.fromString("x-ms-blob-public-access"); @@ -70,11 +70,11 @@ public final class ContainersGetAccessPolicyHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersGetAccessPolicyHeaders(HttpHeaders rawHeaders) { - String xMsBlobPublicAccess = rawHeaders.getValue(X_MS_BLOB_PUBLIC_ACCESS); - if (xMsBlobPublicAccess != null) { - this.xMsBlobPublicAccess = PublicAccessType.fromString(xMsBlobPublicAccess); + String access = rawHeaders.getValue(X_MS_BLOB_PUBLIC_ACCESS); + if (access != null) { + this.access = PublicAccessType.fromString(access); } else { - this.xMsBlobPublicAccess = null; + this.access = null; } this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); @@ -83,37 +83,25 @@ public ContainersGetAccessPolicyHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsBlobPublicAccess property: The x-ms-blob-public-access property. - * - * @return the xMsBlobPublicAccess value. - */ - @Generated - public PublicAccessType getXMsBlobPublicAccess() { - return this.xMsBlobPublicAccess; - } - - /** - * Set the xMsBlobPublicAccess property: The x-ms-blob-public-access property. + * Get the access property: The x-ms-blob-public-access property. * - * @param xMsBlobPublicAccess the xMsBlobPublicAccess value to set. - * @return the ContainersGetAccessPolicyHeaders object itself. + * @return the access value. */ @Generated - public ContainersGetAccessPolicyHeaders setXMsBlobPublicAccess(PublicAccessType xMsBlobPublicAccess) { - this.xMsBlobPublicAccess = xMsBlobPublicAccess; - return this; + public PublicAccessType getAccess() { + return this.access; } /** @@ -126,18 +114,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the ContainersGetAccessPolicyHeaders object itself. - */ - @Generated - public ContainersGetAccessPolicyHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -152,113 +128,45 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. + * Get the date property: The Date property. * - * @param lastModified the lastModified value to set. - * @return the ContainersGetAccessPolicyHeaders object itself. + * @return the date value. */ @Generated - public ContainersGetAccessPolicyHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); + public OffsetDateTime getDate() { + if (this.date == null) { + return null; } - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ContainersGetAccessPolicyHeaders object itself. - */ - @Generated - public ContainersGetAccessPolicyHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ContainersGetAccessPolicyHeaders object itself. - */ - @Generated - public ContainersGetAccessPolicyHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ContainersGetAccessPolicyHeaders object itself. + * @return the version value. */ @Generated - public ContainersGetAccessPolicyHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the ContainersGetAccessPolicyHeaders object itself. + * @return the clientRequestId value. */ @Generated - public ContainersGetAccessPolicyHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 7219bb30751e3..33cf82debc709 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -16,51 +16,49 @@ /** * The ContainersGetAccountInfoHeaders model. */ -@Fluent +@Immutable public final class ContainersGetAccountInfoHeaders { /* - * The x-ms-client-request-id property. + * The x-ms-sku-name property. */ @Generated - private String xMsClientRequestId; + private final SkuName skuName; /* - * The x-ms-request-id property. + * The x-ms-account-kind property. */ @Generated - private String xMsRequestId; + private final AccountKind accountKind; /* - * The x-ms-version property. + * The x-ms-is-hns-enabled property. */ @Generated - private String xMsVersion; + private final Boolean isHierarchicalNamespaceEnabled; /* * The Date property. */ @Generated - private DateTimeRfc1123 date; + private final DateTimeRfc1123 date; /* - * The x-ms-sku-name property. + * The x-ms-version property. */ @Generated - private SkuName xMsSkuName; + private final String version; /* - * The x-ms-account-kind property. + * The x-ms-request-id property. */ @Generated - private AccountKind xMsAccountKind; + private final String requestId; /* - * The x-ms-is-hns-enabled property. + * The x-ms-client-request-id property. */ @Generated - private Boolean xMsIsHnsEnabled; - - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private final String clientRequestId; private static final HttpHeaderName X_MS_SKU_NAME = HttpHeaderName.fromString("x-ms-sku-name"); @@ -68,6 +66,8 @@ public final class ContainersGetAccountInfoHeaders { private static final HttpHeaderName X_MS_IS_HNS_ENABLED = HttpHeaderName.fromString("x-ms-is-hns-enabled"); + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersGetAccountInfoHeaders class. @@ -75,99 +75,63 @@ public final class ContainersGetAccountInfoHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersGetAccountInfoHeaders(HttpHeaders rawHeaders) { - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - String date = rawHeaders.getValue(HttpHeaderName.DATE); - if (date != null) { - this.date = new DateTimeRfc1123(date); + String skuName = rawHeaders.getValue(X_MS_SKU_NAME); + if (skuName != null) { + this.skuName = SkuName.fromString(skuName); } else { - this.date = null; + this.skuName = null; } - String xMsSkuName = rawHeaders.getValue(X_MS_SKU_NAME); - if (xMsSkuName != null) { - this.xMsSkuName = SkuName.fromString(xMsSkuName); + String accountKind = rawHeaders.getValue(X_MS_ACCOUNT_KIND); + if (accountKind != null) { + this.accountKind = AccountKind.fromString(accountKind); } else { - this.xMsSkuName = null; + this.accountKind = null; } - String xMsAccountKind = rawHeaders.getValue(X_MS_ACCOUNT_KIND); - if (xMsAccountKind != null) { - this.xMsAccountKind = AccountKind.fromString(xMsAccountKind); + String isHierarchicalNamespaceEnabled = rawHeaders.getValue(X_MS_IS_HNS_ENABLED); + if (isHierarchicalNamespaceEnabled != null) { + this.isHierarchicalNamespaceEnabled = Boolean.parseBoolean(isHierarchicalNamespaceEnabled); } else { - this.xMsAccountKind = null; + this.isHierarchicalNamespaceEnabled = null; } - String xMsIsHnsEnabled = rawHeaders.getValue(X_MS_IS_HNS_ENABLED); - if (xMsIsHnsEnabled != null) { - this.xMsIsHnsEnabled = Boolean.parseBoolean(xMsIsHnsEnabled); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); } else { - this.xMsIsHnsEnabled = null; + this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ContainersGetAccountInfoHeaders object itself. - */ - @Generated - public ContainersGetAccountInfoHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. + * Get the skuName property: The x-ms-sku-name property. * - * @return the xMsRequestId value. + * @return the skuName value. */ @Generated - public String getXMsRequestId() { - return this.xMsRequestId; + public SkuName getSkuName() { + return this.skuName; } /** - * Set the xMsRequestId property: The x-ms-request-id property. + * Get the accountKind property: The x-ms-account-kind property. * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ContainersGetAccountInfoHeaders object itself. + * @return the accountKind value. */ @Generated - public ContainersGetAccountInfoHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; + public AccountKind getAccountKind() { + return this.accountKind; } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the isHierarchicalNamespaceEnabled property: The x-ms-is-hns-enabled property. * - * @return the xMsVersion value. + * @return the isHierarchicalNamespaceEnabled value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the ContainersGetAccountInfoHeaders object itself. - */ - @Generated - public ContainersGetAccountInfoHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public Boolean isHierarchicalNamespaceEnabled() { + return this.isHierarchicalNamespaceEnabled; } /** @@ -184,84 +148,32 @@ public OffsetDateTime getDate() { } /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the ContainersGetAccountInfoHeaders object itself. - */ - @Generated - public ContainersGetAccountInfoHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsSkuName property: The x-ms-sku-name property. - * - * @return the xMsSkuName value. - */ - @Generated - public SkuName getXMsSkuName() { - return this.xMsSkuName; - } - - /** - * Set the xMsSkuName property: The x-ms-sku-name property. - * - * @param xMsSkuName the xMsSkuName value to set. - * @return the ContainersGetAccountInfoHeaders object itself. - */ - @Generated - public ContainersGetAccountInfoHeaders setXMsSkuName(SkuName xMsSkuName) { - this.xMsSkuName = xMsSkuName; - return this; - } - - /** - * Get the xMsAccountKind property: The x-ms-account-kind property. - * - * @return the xMsAccountKind value. - */ - @Generated - public AccountKind getXMsAccountKind() { - return this.xMsAccountKind; - } - - /** - * Set the xMsAccountKind property: The x-ms-account-kind property. + * Get the version property: The x-ms-version property. * - * @param xMsAccountKind the xMsAccountKind value to set. - * @return the ContainersGetAccountInfoHeaders object itself. + * @return the version value. */ @Generated - public ContainersGetAccountInfoHeaders setXMsAccountKind(AccountKind xMsAccountKind) { - this.xMsAccountKind = xMsAccountKind; - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsIsHnsEnabled value. + * @return the requestId value. */ @Generated - public Boolean isXMsIsHnsEnabled() { - return this.xMsIsHnsEnabled; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsIsHnsEnabled the xMsIsHnsEnabled value to set. - * @return the ContainersGetAccountInfoHeaders object itself. + * @return the clientRequestId value. */ @Generated - public ContainersGetAccountInfoHeaders setXMsIsHnsEnabled(Boolean xMsIsHnsEnabled) { - this.xMsIsHnsEnabled = xMsIsHnsEnabled; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 2ca1fc2bac898..29337b12e58f6 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -15,108 +15,109 @@ import com.azure.storage.blob.models.PublicAccessType; import java.time.OffsetDateTime; import java.util.LinkedHashMap; +import java.util.Locale; import java.util.Map; /** * The ContainersGetPropertiesHeaders model. */ -@Fluent +@Immutable public final class ContainersGetPropertiesHeaders { /* * The x-ms-meta- property. */ @Generated - private Map xMsMeta; + private final Map metadata; /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* * The x-ms-lease-duration property. */ @Generated - private LeaseDurationType xMsLeaseDuration; + private final LeaseDurationType duration; /* * The x-ms-lease-state property. */ @Generated - private LeaseStateType xMsLeaseState; + private final LeaseStateType leaseState; /* * The x-ms-lease-status property. */ @Generated - private LeaseStatusType xMsLeaseStatus; + private final LeaseStatusType leaseStatus; /* - * The x-ms-client-request-id property. + * The x-ms-blob-public-access property. */ @Generated - private String xMsClientRequestId; + private final PublicAccessType access; /* - * The x-ms-request-id property. + * The x-ms-has-immutability-policy property. */ @Generated - private String xMsRequestId; + private final Boolean hasImmutabilityPolicy; /* - * The x-ms-version property. + * The x-ms-has-legal-hold property. */ @Generated - private String xMsVersion; + private final Boolean hasLegalHold; /* - * The Date property. + * The x-ms-default-encryption-scope property. */ @Generated - private DateTimeRfc1123 date; + private final String defaultEncryptionScope; /* - * The x-ms-blob-public-access property. + * The x-ms-deny-encryption-scope-override property. */ @Generated - private PublicAccessType xMsBlobPublicAccess; + private final Boolean preventEncryptionScopeOverride; /* - * The x-ms-has-immutability-policy property. + * The x-ms-immutable-storage-with-versioning-enabled property. */ @Generated - private Boolean xMsHasImmutabilityPolicy; + private final Boolean isImmutableStorageWithVersioningEnabled; /* - * The x-ms-has-legal-hold property. + * The Date property. */ @Generated - private Boolean xMsHasLegalHold; + private final DateTimeRfc1123 date; /* - * The x-ms-default-encryption-scope property. + * The x-ms-version property. */ @Generated - private String xMsDefaultEncryptionScope; + private final String version; /* - * The x-ms-deny-encryption-scope-override property. + * The x-ms-request-id property. */ @Generated - private Boolean xMsDenyEncryptionScopeOverride; + private final String requestId; /* - * The x-ms-immutable-storage-with-versioning-enabled property. + * The x-ms-client-request-id property. */ @Generated - private Boolean xMsImmutableStorageWithVersioningEnabled; + private final String clientRequestId; private static final HttpHeaderName X_MS_LEASE_DURATION = HttpHeaderName.fromString("x-ms-lease-duration"); @@ -124,8 +125,6 @@ public final class ContainersGetPropertiesHeaders { 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_BLOB_PUBLIC_ACCESS = HttpHeaderName.fromString("x-ms-blob-public-access"); private static final HttpHeaderName X_MS_HAS_IMMUTABILITY_POLICY @@ -142,6 +141,8 @@ public final class ContainersGetPropertiesHeaders { 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_VERSION = HttpHeaderName.fromString("x-ms-version"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ContainersGetPropertiesHeaders class. @@ -156,97 +157,86 @@ public ContainersGetPropertiesHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - String xMsLeaseDuration = rawHeaders.getValue(X_MS_LEASE_DURATION); - if (xMsLeaseDuration != null) { - this.xMsLeaseDuration = LeaseDurationType.fromString(xMsLeaseDuration); + String duration = rawHeaders.getValue(X_MS_LEASE_DURATION); + if (duration != null) { + this.duration = LeaseDurationType.fromString(duration); } else { - this.xMsLeaseDuration = null; + this.duration = null; } - String xMsLeaseState = rawHeaders.getValue(X_MS_LEASE_STATE); - if (xMsLeaseState != null) { - this.xMsLeaseState = LeaseStateType.fromString(xMsLeaseState); + String leaseState = rawHeaders.getValue(X_MS_LEASE_STATE); + if (leaseState != null) { + this.leaseState = LeaseStateType.fromString(leaseState); } else { - this.xMsLeaseState = null; + this.leaseState = null; } - String xMsLeaseStatus = rawHeaders.getValue(X_MS_LEASE_STATUS); - if (xMsLeaseStatus != null) { - this.xMsLeaseStatus = LeaseStatusType.fromString(xMsLeaseStatus); + String leaseStatus = rawHeaders.getValue(X_MS_LEASE_STATUS); + if (leaseStatus != null) { + this.leaseStatus = LeaseStatusType.fromString(leaseStatus); } else { - this.xMsLeaseStatus = null; + this.leaseStatus = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - String date = rawHeaders.getValue(HttpHeaderName.DATE); - if (date != null) { - this.date = new DateTimeRfc1123(date); + String access = rawHeaders.getValue(X_MS_BLOB_PUBLIC_ACCESS); + if (access != null) { + this.access = PublicAccessType.fromString(access); } else { - this.date = null; + this.access = null; } - String xMsBlobPublicAccess = rawHeaders.getValue(X_MS_BLOB_PUBLIC_ACCESS); - if (xMsBlobPublicAccess != null) { - this.xMsBlobPublicAccess = PublicAccessType.fromString(xMsBlobPublicAccess); + String hasImmutabilityPolicy = rawHeaders.getValue(X_MS_HAS_IMMUTABILITY_POLICY); + if (hasImmutabilityPolicy != null) { + this.hasImmutabilityPolicy = Boolean.parseBoolean(hasImmutabilityPolicy); } else { - this.xMsBlobPublicAccess = null; + this.hasImmutabilityPolicy = null; } - String xMsHasImmutabilityPolicy = rawHeaders.getValue(X_MS_HAS_IMMUTABILITY_POLICY); - if (xMsHasImmutabilityPolicy != null) { - this.xMsHasImmutabilityPolicy = Boolean.parseBoolean(xMsHasImmutabilityPolicy); + String hasLegalHold = rawHeaders.getValue(X_MS_HAS_LEGAL_HOLD); + if (hasLegalHold != null) { + this.hasLegalHold = Boolean.parseBoolean(hasLegalHold); } else { - this.xMsHasImmutabilityPolicy = null; + this.hasLegalHold = null; } - String xMsHasLegalHold = rawHeaders.getValue(X_MS_HAS_LEGAL_HOLD); - if (xMsHasLegalHold != null) { - this.xMsHasLegalHold = Boolean.parseBoolean(xMsHasLegalHold); + this.defaultEncryptionScope = rawHeaders.getValue(X_MS_DEFAULT_ENCRYPTION_SCOPE); + String preventEncryptionScopeOverride = rawHeaders.getValue(X_MS_DENY_ENCRYPTION_SCOPE_OVERRIDE); + if (preventEncryptionScopeOverride != null) { + this.preventEncryptionScopeOverride = Boolean.parseBoolean(preventEncryptionScopeOverride); } else { - this.xMsHasLegalHold = null; + this.preventEncryptionScopeOverride = null; } - this.xMsDefaultEncryptionScope = rawHeaders.getValue(X_MS_DEFAULT_ENCRYPTION_SCOPE); - String xMsDenyEncryptionScopeOverride = rawHeaders.getValue(X_MS_DENY_ENCRYPTION_SCOPE_OVERRIDE); - if (xMsDenyEncryptionScopeOverride != null) { - this.xMsDenyEncryptionScopeOverride = Boolean.parseBoolean(xMsDenyEncryptionScopeOverride); + String isImmutableStorageWithVersioningEnabled + = rawHeaders.getValue(X_MS_IMMUTABLE_STORAGE_WITH_VERSIONING_ENABLED); + if (isImmutableStorageWithVersioningEnabled != null) { + this.isImmutableStorageWithVersioningEnabled + = Boolean.parseBoolean(isImmutableStorageWithVersioningEnabled); } else { - this.xMsDenyEncryptionScopeOverride = null; + this.isImmutableStorageWithVersioningEnabled = null; } - String xMsImmutableStorageWithVersioningEnabled - = rawHeaders.getValue(X_MS_IMMUTABLE_STORAGE_WITH_VERSIONING_ENABLED); - if (xMsImmutableStorageWithVersioningEnabled != null) { - this.xMsImmutableStorageWithVersioningEnabled - = Boolean.parseBoolean(xMsImmutableStorageWithVersioningEnabled); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); } else { - this.xMsImmutableStorageWithVersioningEnabled = null; + this.date = null; } - Map xMsMetaHeaderCollection = new LinkedHashMap<>(); + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); + Map metadataHeaderCollection = new LinkedHashMap<>(); rawHeaders.stream().forEach(header -> { String headerName = header.getName(); - if (headerName.startsWith("x-ms-meta-")) { - xMsMetaHeaderCollection.put(headerName.substring(10), header.getValue()); + String headerNameLowerCase = headerName.toLowerCase(Locale.ROOT); + if (headerNameLowerCase.startsWith("x-ms-meta-")) { + metadataHeaderCollection.put(headerName.substring(10), header.getValue()); } }); - this.xMsMeta = xMsMetaHeaderCollection; + this.metadata = metadataHeaderCollection; } /** - * Get the xMsMeta property: The x-ms-meta- property. + * Get the metadata property: The x-ms-meta- property. * - * @return the xMsMeta value. + * @return the metadata value. */ @Generated - public Map getXMsMeta() { - return this.xMsMeta; - } - - /** - * Set the xMsMeta property: The x-ms-meta- property. - * - * @param xMsMeta the xMsMeta value to set. - * @return the ContainersGetPropertiesHeaders object itself. - */ - @Generated - public ContainersGetPropertiesHeaders setXMsMeta(Map xMsMeta) { - this.xMsMeta = xMsMeta; - return this; + public Map getMetadata() { + return this.metadata; } /** @@ -259,18 +249,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the ContainersGetPropertiesHeaders object itself. - */ - @Generated - public ContainersGetPropertiesHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -285,151 +263,94 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. + * Get the duration property: The x-ms-lease-duration property. * - * @param lastModified the lastModified value to set. - * @return the ContainersGetPropertiesHeaders object itself. + * @return the duration value. */ @Generated - public ContainersGetPropertiesHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; + public LeaseDurationType getDuration() { + return this.duration; } /** - * Get the xMsLeaseDuration property: The x-ms-lease-duration property. + * Get the leaseState property: The x-ms-lease-state property. * - * @return the xMsLeaseDuration value. + * @return the leaseState value. */ @Generated - public LeaseDurationType getXMsLeaseDuration() { - return this.xMsLeaseDuration; + public LeaseStateType getLeaseState() { + return this.leaseState; } /** - * Set the xMsLeaseDuration property: The x-ms-lease-duration property. + * Get the leaseStatus property: The x-ms-lease-status property. * - * @param xMsLeaseDuration the xMsLeaseDuration value to set. - * @return the ContainersGetPropertiesHeaders object itself. + * @return the leaseStatus value. */ @Generated - public ContainersGetPropertiesHeaders setXMsLeaseDuration(LeaseDurationType xMsLeaseDuration) { - this.xMsLeaseDuration = xMsLeaseDuration; - return this; + public LeaseStatusType getLeaseStatus() { + return this.leaseStatus; } /** - * Get the xMsLeaseState property: The x-ms-lease-state property. + * Get the access property: The x-ms-blob-public-access property. * - * @return the xMsLeaseState value. + * @return the access value. */ @Generated - public LeaseStateType getXMsLeaseState() { - return this.xMsLeaseState; + public PublicAccessType getAccess() { + return this.access; } /** - * Set the xMsLeaseState property: The x-ms-lease-state property. + * Get the hasImmutabilityPolicy property: The x-ms-has-immutability-policy property. * - * @param xMsLeaseState the xMsLeaseState value to set. - * @return the ContainersGetPropertiesHeaders object itself. + * @return the hasImmutabilityPolicy value. */ @Generated - public ContainersGetPropertiesHeaders setXMsLeaseState(LeaseStateType xMsLeaseState) { - this.xMsLeaseState = xMsLeaseState; - return this; + public Boolean isHasImmutabilityPolicy() { + return this.hasImmutabilityPolicy; } /** - * Get the xMsLeaseStatus property: The x-ms-lease-status property. + * Get the hasLegalHold property: The x-ms-has-legal-hold property. * - * @return the xMsLeaseStatus value. + * @return the hasLegalHold value. */ @Generated - public LeaseStatusType getXMsLeaseStatus() { - return this.xMsLeaseStatus; + public Boolean isHasLegalHold() { + return this.hasLegalHold; } /** - * Set the xMsLeaseStatus property: The x-ms-lease-status property. + * Get the defaultEncryptionScope property: The x-ms-default-encryption-scope property. * - * @param xMsLeaseStatus the xMsLeaseStatus value to set. - * @return the ContainersGetPropertiesHeaders object itself. + * @return the defaultEncryptionScope value. */ @Generated - public ContainersGetPropertiesHeaders setXMsLeaseStatus(LeaseStatusType xMsLeaseStatus) { - this.xMsLeaseStatus = xMsLeaseStatus; - return this; + public String getDefaultEncryptionScope() { + return this.defaultEncryptionScope; } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * Get the preventEncryptionScopeOverride property: The x-ms-deny-encryption-scope-override property. * - * @return the xMsClientRequestId value. + * @return the preventEncryptionScopeOverride value. */ @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; + public Boolean isPreventEncryptionScopeOverride() { + return this.preventEncryptionScopeOverride; } /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ContainersGetPropertiesHeaders object itself. - */ - @Generated - public ContainersGetPropertiesHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ContainersGetPropertiesHeaders object itself. - */ - @Generated - public ContainersGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. + * Get the isImmutableStorageWithVersioningEnabled property: The x-ms-immutable-storage-with-versioning-enabled + * property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ContainersGetPropertiesHeaders object itself. + * @return the isImmutableStorageWithVersioningEnabled value. */ @Generated - public ContainersGetPropertiesHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public Boolean isImmutableStorageWithVersioningEnabled() { + return this.isImmutableStorageWithVersioningEnabled; } /** @@ -446,153 +367,32 @@ public OffsetDateTime getDate() { } /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the ContainersGetPropertiesHeaders object itself. - */ - @Generated - public ContainersGetPropertiesHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsBlobPublicAccess property: The x-ms-blob-public-access property. - * - * @return the xMsBlobPublicAccess value. - */ - @Generated - public PublicAccessType getXMsBlobPublicAccess() { - return this.xMsBlobPublicAccess; - } - - /** - * Set the xMsBlobPublicAccess property: The x-ms-blob-public-access property. - * - * @param xMsBlobPublicAccess the xMsBlobPublicAccess value to set. - * @return the ContainersGetPropertiesHeaders object itself. - */ - @Generated - public ContainersGetPropertiesHeaders setXMsBlobPublicAccess(PublicAccessType xMsBlobPublicAccess) { - this.xMsBlobPublicAccess = xMsBlobPublicAccess; - return this; - } - - /** - * Get the xMsHasImmutabilityPolicy property: The x-ms-has-immutability-policy property. - * - * @return the xMsHasImmutabilityPolicy value. - */ - @Generated - public Boolean isXMsHasImmutabilityPolicy() { - return this.xMsHasImmutabilityPolicy; - } - - /** - * Set the xMsHasImmutabilityPolicy property: The x-ms-has-immutability-policy property. - * - * @param xMsHasImmutabilityPolicy the xMsHasImmutabilityPolicy value to set. - * @return the ContainersGetPropertiesHeaders object itself. - */ - @Generated - public ContainersGetPropertiesHeaders setXMsHasImmutabilityPolicy(Boolean xMsHasImmutabilityPolicy) { - this.xMsHasImmutabilityPolicy = xMsHasImmutabilityPolicy; - return this; - } - - /** - * Get the xMsHasLegalHold property: The x-ms-has-legal-hold property. - * - * @return the xMsHasLegalHold value. - */ - @Generated - public Boolean isXMsHasLegalHold() { - return this.xMsHasLegalHold; - } - - /** - * Set the xMsHasLegalHold property: The x-ms-has-legal-hold property. + * Get the version property: The x-ms-version property. * - * @param xMsHasLegalHold the xMsHasLegalHold value to set. - * @return the ContainersGetPropertiesHeaders object itself. + * @return the version value. */ @Generated - public ContainersGetPropertiesHeaders setXMsHasLegalHold(Boolean xMsHasLegalHold) { - this.xMsHasLegalHold = xMsHasLegalHold; - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsDefaultEncryptionScope property: The x-ms-default-encryption-scope property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsDefaultEncryptionScope value. + * @return the requestId value. */ @Generated - public String getXMsDefaultEncryptionScope() { - return this.xMsDefaultEncryptionScope; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsDefaultEncryptionScope property: The x-ms-default-encryption-scope property. - * - * @param xMsDefaultEncryptionScope the xMsDefaultEncryptionScope value to set. - * @return the ContainersGetPropertiesHeaders object itself. - */ - @Generated - public ContainersGetPropertiesHeaders setXMsDefaultEncryptionScope(String xMsDefaultEncryptionScope) { - this.xMsDefaultEncryptionScope = xMsDefaultEncryptionScope; - return this; - } - - /** - * Get the xMsDenyEncryptionScopeOverride property: The x-ms-deny-encryption-scope-override property. - * - * @return the xMsDenyEncryptionScopeOverride value. - */ - @Generated - public Boolean isXMsDenyEncryptionScopeOverride() { - return this.xMsDenyEncryptionScopeOverride; - } - - /** - * Set the xMsDenyEncryptionScopeOverride property: The x-ms-deny-encryption-scope-override property. - * - * @param xMsDenyEncryptionScopeOverride the xMsDenyEncryptionScopeOverride value to set. - * @return the ContainersGetPropertiesHeaders object itself. - */ - @Generated - public ContainersGetPropertiesHeaders setXMsDenyEncryptionScopeOverride(Boolean xMsDenyEncryptionScopeOverride) { - this.xMsDenyEncryptionScopeOverride = xMsDenyEncryptionScopeOverride; - return this; - } - - /** - * Get the xMsImmutableStorageWithVersioningEnabled property: The x-ms-immutable-storage-with-versioning-enabled - * property. - * - * @return the xMsImmutableStorageWithVersioningEnabled value. - */ - @Generated - public Boolean isXMsImmutableStorageWithVersioningEnabled() { - return this.xMsImmutableStorageWithVersioningEnabled; - } - - /** - * Set the xMsImmutableStorageWithVersioningEnabled property: The x-ms-immutable-storage-with-versioning-enabled - * property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsImmutableStorageWithVersioningEnabled the xMsImmutableStorageWithVersioningEnabled value to set. - * @return the ContainersGetPropertiesHeaders object itself. + * @return the clientRequestId value. */ @Generated - public ContainersGetPropertiesHeaders - setXMsImmutableStorageWithVersioningEnabled(Boolean xMsImmutableStorageWithVersioningEnabled) { - this.xMsImmutableStorageWithVersioningEnabled = xMsImmutableStorageWithVersioningEnabled; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentApacheArrowHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentApacheArrowHeaders.java deleted file mode 100644 index d137f165b8de3..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentApacheArrowHeaders.java +++ /dev/null @@ -1,186 +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.azure.core.annotation.Generated; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.util.DateTimeRfc1123; -import java.time.OffsetDateTime; - -/** - * The ContainersListBlobFlatSegmentApacheArrowHeaders model. - */ -@Fluent -public final class ContainersListBlobFlatSegmentApacheArrowHeaders { - /* - * The Content-Type property. - */ - @Generated - private String contentType; - - /* - * The x-ms-client-request-id property. - */ - @Generated - private String xMsClientRequestId; - - /* - * The x-ms-request-id property. - */ - @Generated - private String xMsRequestId; - - /* - * The x-ms-version property. - */ - @Generated - private String xMsVersion; - - /* - * The Date property. - */ - @Generated - private DateTimeRfc1123 date; - - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of ContainersListBlobFlatSegmentApacheArrowHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public ContainersListBlobFlatSegmentApacheArrowHeaders(HttpHeaders rawHeaders) { - this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - String date = rawHeaders.getValue(HttpHeaderName.DATE); - if (date != null) { - this.date = new DateTimeRfc1123(date); - } else { - this.date = null; - } - } - - /** - * Get the contentType property: The Content-Type property. - * - * @return the contentType value. - */ - @Generated - public String getContentType() { - return this.contentType; - } - - /** - * Set the contentType property: The Content-Type property. - * - * @param contentType the contentType value to set. - * @return the ContainersListBlobFlatSegmentApacheArrowHeaders object itself. - */ - @Generated - public ContainersListBlobFlatSegmentApacheArrowHeaders setContentType(String contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ContainersListBlobFlatSegmentApacheArrowHeaders object itself. - */ - @Generated - public ContainersListBlobFlatSegmentApacheArrowHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ContainersListBlobFlatSegmentApacheArrowHeaders object itself. - */ - @Generated - public ContainersListBlobFlatSegmentApacheArrowHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the ContainersListBlobFlatSegmentApacheArrowHeaders object itself. - */ - @Generated - public ContainersListBlobFlatSegmentApacheArrowHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the date property: The Date property. - * - * @return the date value. - */ - @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); - } - - /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the ContainersListBlobFlatSegmentApacheArrowHeaders object itself. - */ - @Generated - public ContainersListBlobFlatSegmentApacheArrowHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } -} 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 b67c953f2a480..349ce16c813a8 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,37 +14,31 @@ /** * The ContainersListBlobFlatSegmentHeaders model. */ -@Fluent +@Immutable public final class ContainersListBlobFlatSegmentHeaders { /* - * The Content-Type property. + * The Date property. */ @Generated - private String contentType; + private final DateTimeRfc1123 date; /* - * The x-ms-client-request-id property. + * The x-ms-version property. */ @Generated - private String xMsClientRequestId; + private final String version; /* * The x-ms-request-id property. */ @Generated - private String xMsRequestId; - - /* - * The x-ms-version property. - */ - @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -55,132 +49,57 @@ public final class ContainersListBlobFlatSegmentHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersListBlobFlatSegmentHeaders(HttpHeaders rawHeaders) { - this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the contentType property: The Content-Type property. - * - * @return the contentType value. - */ - @Generated - public String getContentType() { - return this.contentType; - } - - /** - * Set the contentType property: The Content-Type property. - * - * @param contentType the contentType value to set. - * @return the ContainersListBlobFlatSegmentHeaders object itself. - */ - @Generated - public ContainersListBlobFlatSegmentHeaders setContentType(String contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ContainersListBlobFlatSegmentHeaders object itself. - */ - @Generated - public ContainersListBlobFlatSegmentHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ContainersListBlobFlatSegmentHeaders object itself. - */ - @Generated - public ContainersListBlobFlatSegmentHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ContainersListBlobFlatSegmentHeaders object itself. + * @return the version value. */ @Generated - public ContainersListBlobFlatSegmentHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the ContainersListBlobFlatSegmentHeaders object itself. + * @return the clientRequestId value. */ @Generated - public ContainersListBlobFlatSegmentHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentApacheArrowHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentApacheArrowHeaders.java deleted file mode 100644 index 8c18650a8be58..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentApacheArrowHeaders.java +++ /dev/null @@ -1,186 +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.azure.core.annotation.Generated; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.util.DateTimeRfc1123; -import java.time.OffsetDateTime; - -/** - * The ContainersListBlobHierarchySegmentApacheArrowHeaders model. - */ -@Fluent -public final class ContainersListBlobHierarchySegmentApacheArrowHeaders { - /* - * The Content-Type property. - */ - @Generated - private String contentType; - - /* - * The x-ms-client-request-id property. - */ - @Generated - private String xMsClientRequestId; - - /* - * The x-ms-request-id property. - */ - @Generated - private String xMsRequestId; - - /* - * The x-ms-version property. - */ - @Generated - private String xMsVersion; - - /* - * The Date property. - */ - @Generated - private DateTimeRfc1123 date; - - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of ContainersListBlobHierarchySegmentApacheArrowHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public ContainersListBlobHierarchySegmentApacheArrowHeaders(HttpHeaders rawHeaders) { - this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - String date = rawHeaders.getValue(HttpHeaderName.DATE); - if (date != null) { - this.date = new DateTimeRfc1123(date); - } else { - this.date = null; - } - } - - /** - * Get the contentType property: The Content-Type property. - * - * @return the contentType value. - */ - @Generated - public String getContentType() { - return this.contentType; - } - - /** - * Set the contentType property: The Content-Type property. - * - * @param contentType the contentType value to set. - * @return the ContainersListBlobHierarchySegmentApacheArrowHeaders object itself. - */ - @Generated - public ContainersListBlobHierarchySegmentApacheArrowHeaders setContentType(String contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ContainersListBlobHierarchySegmentApacheArrowHeaders object itself. - */ - @Generated - public ContainersListBlobHierarchySegmentApacheArrowHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ContainersListBlobHierarchySegmentApacheArrowHeaders object itself. - */ - @Generated - public ContainersListBlobHierarchySegmentApacheArrowHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the ContainersListBlobHierarchySegmentApacheArrowHeaders object itself. - */ - @Generated - public ContainersListBlobHierarchySegmentApacheArrowHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the date property: The Date property. - * - * @return the date value. - */ - @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); - } - - /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the ContainersListBlobHierarchySegmentApacheArrowHeaders object itself. - */ - @Generated - public ContainersListBlobHierarchySegmentApacheArrowHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } -} 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 0d5452ae07af4..b85f22290b3f6 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,37 +14,31 @@ /** * The ContainersListBlobHierarchySegmentHeaders model. */ -@Fluent +@Immutable public final class ContainersListBlobHierarchySegmentHeaders { /* - * The Content-Type property. + * The Date property. */ @Generated - private String contentType; + private final DateTimeRfc1123 date; /* - * The x-ms-client-request-id property. + * The x-ms-version property. */ @Generated - private String xMsClientRequestId; + private final String version; /* * The x-ms-request-id property. */ @Generated - private String xMsRequestId; - - /* - * The x-ms-version property. - */ - @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -55,132 +49,57 @@ public final class ContainersListBlobHierarchySegmentHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersListBlobHierarchySegmentHeaders(HttpHeaders rawHeaders) { - this.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the contentType property: The Content-Type property. - * - * @return the contentType value. - */ - @Generated - public String getContentType() { - return this.contentType; - } - - /** - * Set the contentType property: The Content-Type property. - * - * @param contentType the contentType value to set. - * @return the ContainersListBlobHierarchySegmentHeaders object itself. - */ - @Generated - public ContainersListBlobHierarchySegmentHeaders setContentType(String contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ContainersListBlobHierarchySegmentHeaders object itself. - */ - @Generated - public ContainersListBlobHierarchySegmentHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ContainersListBlobHierarchySegmentHeaders object itself. - */ - @Generated - public ContainersListBlobHierarchySegmentHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ContainersListBlobHierarchySegmentHeaders object itself. + * @return the version value. */ @Generated - public ContainersListBlobHierarchySegmentHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the ContainersListBlobHierarchySegmentHeaders object itself. + * @return the clientRequestId value. */ @Generated - public ContainersListBlobHierarchySegmentHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 1ed0d97d47dd3..13a39ee446e97 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,43 +14,43 @@ /** * The ContainersReleaseLeaseHeaders model. */ -@Fluent +@Immutable public final class ContainersReleaseLeaseHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -68,15 +68,15 @@ public ContainersReleaseLeaseHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -89,18 +89,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the ContainersReleaseLeaseHeaders object itself. - */ - @Generated - public ContainersReleaseLeaseHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -115,113 +103,45 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. + * Get the date property: The Date property. * - * @param lastModified the lastModified value to set. - * @return the ContainersReleaseLeaseHeaders object itself. + * @return the date value. */ @Generated - public ContainersReleaseLeaseHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); + public OffsetDateTime getDate() { + if (this.date == null) { + return null; } - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ContainersReleaseLeaseHeaders object itself. - */ - @Generated - public ContainersReleaseLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ContainersReleaseLeaseHeaders object itself. - */ - @Generated - public ContainersReleaseLeaseHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ContainersReleaseLeaseHeaders object itself. + * @return the version value. */ @Generated - public ContainersReleaseLeaseHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the ContainersReleaseLeaseHeaders object itself. + * @return the clientRequestId value. */ @Generated - public ContainersReleaseLeaseHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 415b4bc70f891..9d4ed263bd03e 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,31 +14,31 @@ /** * The ContainersRenameHeaders model. */ -@Fluent +@Immutable public final class ContainersRenameHeaders { /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -49,109 +49,57 @@ public final class ContainersRenameHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersRenameHeaders(HttpHeaders rawHeaders) { - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ContainersRenameHeaders object itself. - */ - @Generated - public ContainersRenameHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ContainersRenameHeaders object itself. - */ - @Generated - public ContainersRenameHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ContainersRenameHeaders object itself. + * @return the version value. */ @Generated - public ContainersRenameHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the ContainersRenameHeaders object itself. + * @return the clientRequestId value. */ @Generated - public ContainersRenameHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 e912394d27318..e3037f8074e32 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,49 +14,49 @@ /** * The ContainersRenewLeaseHeaders model. */ -@Fluent +@Immutable public final class ContainersRenewLeaseHeaders { /* - * The ETag property. + * The x-ms-lease-id property. */ @Generated - private String eTag; + private final String leaseId; /* - * The Last-Modified property. + * The ETag property. */ @Generated - private DateTimeRfc1123 lastModified; + private final String eTag; /* - * The x-ms-lease-id property. + * The Last-Modified property. */ @Generated - private String xMsLeaseId; + private final DateTimeRfc1123 lastModified; /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_LEASE_ID = HttpHeaderName.fromString("x-ms-lease-id"); @@ -69,6 +69,7 @@ public final class ContainersRenewLeaseHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersRenewLeaseHeaders(HttpHeaders rawHeaders) { + this.leaseId = rawHeaders.getValue(X_MS_LEASE_ID); this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); if (lastModified != null) { @@ -76,38 +77,35 @@ public ContainersRenewLeaseHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - this.xMsLeaseId = rawHeaders.getValue(X_MS_LEASE_ID); - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the eTag property: The ETag property. + * Get the leaseId property: The x-ms-lease-id property. * - * @return the eTag value. + * @return the leaseId value. */ @Generated - public String getETag() { - return this.eTag; + public String getLeaseId() { + return this.leaseId; } /** - * Set the eTag property: The ETag property. + * Get the eTag property: The ETag property. * - * @param eTag the eTag value to set. - * @return the ContainersRenewLeaseHeaders object itself. + * @return the eTag value. */ @Generated - public ContainersRenewLeaseHeaders setETag(String eTag) { - this.eTag = eTag; - return this; + public String getETag() { + return this.eTag; } /** @@ -124,135 +122,45 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. + * Get the date property: The Date property. * - * @param lastModified the lastModified value to set. - * @return the ContainersRenewLeaseHeaders object itself. + * @return the date value. */ @Generated - public ContainersRenewLeaseHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); + public OffsetDateTime getDate() { + if (this.date == null) { + return null; } - return this; - } - - /** - * Get the xMsLeaseId property: The x-ms-lease-id property. - * - * @return the xMsLeaseId value. - */ - @Generated - public String getXMsLeaseId() { - return this.xMsLeaseId; - } - - /** - * Set the xMsLeaseId property: The x-ms-lease-id property. - * - * @param xMsLeaseId the xMsLeaseId value to set. - * @return the ContainersRenewLeaseHeaders object itself. - */ - @Generated - public ContainersRenewLeaseHeaders setXMsLeaseId(String xMsLeaseId) { - this.xMsLeaseId = xMsLeaseId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ContainersRenewLeaseHeaders object itself. - */ - @Generated - public ContainersRenewLeaseHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ContainersRenewLeaseHeaders object itself. - */ - @Generated - public ContainersRenewLeaseHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; + return this.date.getDateTime(); } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @return the xMsVersion value. + * @return the version value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public String getVersion() { + return this.version; } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the requestId property: The x-ms-request-id property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ContainersRenewLeaseHeaders object itself. + * @return the requestId value. */ @Generated - public ContainersRenewLeaseHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getRequestId() { + return this.requestId; } /** - * Get the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @return the date value. + * @return the clientRequestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); - } - - /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the ContainersRenewLeaseHeaders object itself. - */ - @Generated - public ContainersRenewLeaseHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 71e1c37da3b0a..4e92e275ae9b7 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,31 +14,31 @@ /** * The ContainersRestoreHeaders model. */ -@Fluent +@Immutable public final class ContainersRestoreHeaders { /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -49,109 +49,57 @@ public final class ContainersRestoreHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ContainersRestoreHeaders(HttpHeaders rawHeaders) { - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ContainersRestoreHeaders object itself. - */ - @Generated - public ContainersRestoreHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ContainersRestoreHeaders object itself. - */ - @Generated - public ContainersRestoreHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ContainersRestoreHeaders object itself. + * @return the version value. */ @Generated - public ContainersRestoreHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the ContainersRestoreHeaders object itself. + * @return the clientRequestId value. */ @Generated - public ContainersRestoreHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 b24c359aca421..da7899fb8c442 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,43 +14,43 @@ /** * The ContainersSetAccessPolicyHeaders model. */ -@Fluent +@Immutable public final class ContainersSetAccessPolicyHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -68,15 +68,15 @@ public ContainersSetAccessPolicyHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -89,18 +89,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the ContainersSetAccessPolicyHeaders object itself. - */ - @Generated - public ContainersSetAccessPolicyHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -115,113 +103,45 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. + * Get the date property: The Date property. * - * @param lastModified the lastModified value to set. - * @return the ContainersSetAccessPolicyHeaders object itself. + * @return the date value. */ @Generated - public ContainersSetAccessPolicyHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); + public OffsetDateTime getDate() { + if (this.date == null) { + return null; } - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ContainersSetAccessPolicyHeaders object itself. - */ - @Generated - public ContainersSetAccessPolicyHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ContainersSetAccessPolicyHeaders object itself. - */ - @Generated - public ContainersSetAccessPolicyHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ContainersSetAccessPolicyHeaders object itself. + * @return the version value. */ @Generated - public ContainersSetAccessPolicyHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the ContainersSetAccessPolicyHeaders object itself. + * @return the clientRequestId value. */ @Generated - public ContainersSetAccessPolicyHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 0f3d27df92649..b16d643fb98a0 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,43 +14,43 @@ /** * The ContainersSetMetadataHeaders model. */ -@Fluent +@Immutable public final class ContainersSetMetadataHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -68,15 +68,15 @@ public ContainersSetMetadataHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -89,18 +89,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the ContainersSetMetadataHeaders object itself. - */ - @Generated - public ContainersSetMetadataHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -115,113 +103,45 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. + * Get the date property: The Date property. * - * @param lastModified the lastModified value to set. - * @return the ContainersSetMetadataHeaders object itself. + * @return the date value. */ @Generated - public ContainersSetMetadataHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); + public OffsetDateTime getDate() { + if (this.date == null) { + return null; } - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ContainersSetMetadataHeaders object itself. - */ - @Generated - public ContainersSetMetadataHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ContainersSetMetadataHeaders object itself. - */ - @Generated - public ContainersSetMetadataHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ContainersSetMetadataHeaders object itself. + * @return the version value. */ @Generated - public ContainersSetMetadataHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the ContainersSetMetadataHeaders object itself. + * @return the clientRequestId value. */ @Generated - public ContainersSetMetadataHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 deleted file mode 100644 index 7ac6da03dad5b..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersSubmitBatchHeaders.java +++ /dev/null @@ -1,114 +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.azure.core.annotation.Generated; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The ContainersSubmitBatchHeaders model. - */ -@Fluent -public final class ContainersSubmitBatchHeaders { - /* - * The Content-Type property. - */ - @Generated - private String contentType; - - /* - * The x-ms-request-id property. - */ - @Generated - private String xMsRequestId; - - /* - * The x-ms-version property. - */ - @Generated - private String xMsVersion; - - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - - // 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.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - } - - /** - * Get the contentType property: The Content-Type property. - * - * @return the contentType value. - */ - @Generated - public String getContentType() { - return this.contentType; - } - - /** - * Set the contentType property: The Content-Type property. - * - * @param contentType the contentType value to set. - * @return the ContainersSubmitBatchHeaders object itself. - */ - @Generated - public ContainersSubmitBatchHeaders setContentType(String contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ContainersSubmitBatchHeaders object itself. - */ - @Generated - public ContainersSubmitBatchHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the ContainersSubmitBatchHeaders object itself. - */ - @Generated - public ContainersSubmitBatchHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/CreateSessionConfiguration.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/CreateSessionConfiguration.java index b52e86f169cd6..e844d7695aec4 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/CreateSessionConfiguration.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/CreateSessionConfiguration.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -14,21 +14,24 @@ import javax.xml.stream.XMLStreamException; /** - * The CreateSessionConfiguration model. + * The configuration used to create a session. */ -@Fluent +@Immutable public final class CreateSessionConfiguration implements XmlSerializable { /* * The type of authentication required to create the session. The only type currently supported is HMAC. */ @Generated - private AuthenticationType authenticationType; + private final AuthenticationType authenticationType; /** * Creates an instance of CreateSessionConfiguration class. + * + * @param authenticationType the authenticationType value to set. */ @Generated - public CreateSessionConfiguration() { + public CreateSessionConfiguration(AuthenticationType authenticationType) { + this.authenticationType = authenticationType; } /** @@ -42,19 +45,6 @@ public AuthenticationType getAuthenticationType() { return this.authenticationType; } - /** - * Set the authenticationType property: The type of authentication required to create the session. The only type - * currently supported is HMAC. - * - * @param authenticationType the authenticationType value to set. - * @return the CreateSessionConfiguration object itself. - */ - @Generated - public CreateSessionConfiguration setAuthenticationType(AuthenticationType authenticationType) { - this.authenticationType = authenticationType; - return this; - } - @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @@ -78,6 +68,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt * @param xmlReader The XmlReader being read. * @return An instance of CreateSessionConfiguration 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 CreateSessionConfiguration. */ @Generated @@ -93,6 +84,7 @@ public static CreateSessionConfiguration fromXml(XmlReader xmlReader) throws XML * cases where the model can deserialize from different root element names. * @return An instance of CreateSessionConfiguration 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 CreateSessionConfiguration. */ @Generated @@ -101,19 +93,17 @@ public static CreateSessionConfiguration fromXml(XmlReader xmlReader, String roo String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "CreateSessionRequest" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - CreateSessionConfiguration deserializedCreateSessionConfiguration = new CreateSessionConfiguration(); + AuthenticationType authenticationType = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); if ("AuthenticationType".equals(elementName.getLocalPart())) { - deserializedCreateSessionConfiguration.authenticationType - = AuthenticationType.fromString(reader.getStringElement()); + authenticationType = AuthenticationType.fromString(reader.getStringElement()); } else { reader.skipElement(); } } - - return deserializedCreateSessionConfiguration; + return new CreateSessionConfiguration(authenticationType); }); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/CreateSessionResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/CreateSessionResponse.java index 610080c98fd46..4f62e327ea638 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/CreateSessionResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/CreateSessionResponse.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.util.DateTimeRfc1123; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; @@ -17,9 +17,9 @@ import javax.xml.stream.XMLStreamException; /** - * The CreateSessionResponse model. + * The response of the Create Session API. */ -@Fluent +@Immutable public final class CreateSessionResponse implements XmlSerializable { /* * A unique identifier for the created session. @@ -28,7 +28,7 @@ public final class CreateSessionResponse implements XmlSerializable { @@ -37,7 +37,7 @@ public final class DelimitedTextConfiguration implements XmlSerializable { /** - * Static value layout for DownloadHint. + * The blob layout can be retrieved with the Get Blob Layout operation. */ @Generated public static final DownloadHint LAYOUT = fromString("layout"); 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 ab931763b58e9..7db4978cdaa8a 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 @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// This file is not generated. The Blob TypeSpec does not describe it, so it is maintained by hand; +// edits here are preserved across regeneration. package com.azure.storage.blob.implementation.models; 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 fa46acc754e0e..dfeace3257bd8 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -14,49 +14,54 @@ import javax.xml.stream.XMLStreamException; /** - * Blob info from a Filter Blobs API call. + * The filtered blob item. */ -@Fluent +@Immutable public final class FilterBlobItem implements XmlSerializable { /* - * The Name property. + * The name of the blob. */ @Generated - private String name; + private final String name; /* - * The ContainerName property. + * The name of the container. */ @Generated - private String containerName; + private final String containerName; /* - * Blob tags + * The tags of the blob. */ @Generated private BlobTags tags; /* - * The VersionId property. + * The version ID of the blob. */ @Generated private String versionId; /* - * The IsCurrentVersion property. + * Whether it is the current version of the blob. */ @Generated private Boolean isCurrentVersion; /** * Creates an instance of FilterBlobItem class. + * + * @param name the name value to set. + * @param containerName the containerName value to set. */ @Generated - public FilterBlobItem() { + private FilterBlobItem(String name, String containerName) { + this.name = name; + this.containerName = containerName; } /** - * Get the name property: The Name property. + * Get the name property: The name of the blob. * * @return the name value. */ @@ -66,19 +71,7 @@ public String getName() { } /** - * Set the name property: The Name property. - * - * @param name the name value to set. - * @return the FilterBlobItem object itself. - */ - @Generated - public FilterBlobItem setName(String name) { - this.name = name; - return this; - } - - /** - * Get the containerName property: The ContainerName property. + * Get the containerName property: The name of the container. * * @return the containerName value. */ @@ -88,19 +81,7 @@ public String getContainerName() { } /** - * Set the containerName property: The ContainerName property. - * - * @param containerName the containerName value to set. - * @return the FilterBlobItem object itself. - */ - @Generated - public FilterBlobItem setContainerName(String containerName) { - this.containerName = containerName; - return this; - } - - /** - * Get the tags property: Blob tags. + * Get the tags property: The tags of the blob. * * @return the tags value. */ @@ -110,19 +91,7 @@ public BlobTags getTags() { } /** - * Set the tags property: Blob tags. - * - * @param tags the tags value to set. - * @return the FilterBlobItem object itself. - */ - @Generated - public FilterBlobItem setTags(BlobTags tags) { - this.tags = tags; - return this; - } - - /** - * Get the versionId property: The VersionId property. + * Get the versionId property: The version ID of the blob. * * @return the versionId value. */ @@ -132,19 +101,7 @@ public String getVersionId() { } /** - * Set the versionId property: The VersionId property. - * - * @param versionId the versionId value to set. - * @return the FilterBlobItem object itself. - */ - @Generated - public FilterBlobItem setVersionId(String versionId) { - this.versionId = versionId; - return this; - } - - /** - * Get the isCurrentVersion property: The IsCurrentVersion property. + * Get the isCurrentVersion property: Whether it is the current version of the blob. * * @return the isCurrentVersion value. */ @@ -153,18 +110,6 @@ public Boolean isCurrentVersion() { return this.isCurrentVersion; } - /** - * Set the isCurrentVersion property: The IsCurrentVersion property. - * - * @param isCurrentVersion the isCurrentVersion value to set. - * @return the FilterBlobItem object itself. - */ - @Generated - public FilterBlobItem setIsCurrentVersion(Boolean isCurrentVersion) { - this.isCurrentVersion = isCurrentVersion; - return this; - } - @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @@ -190,6 +135,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt * @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. */ @Generated @@ -205,30 +151,39 @@ public static FilterBlobItem fromXml(XmlReader xmlReader) throws XMLStreamExcept * 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. */ @Generated public static FilterBlobItem fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "Blob" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - FilterBlobItem deserializedFilterBlobItem = new FilterBlobItem(); + String name = null; + String containerName = null; + BlobTags tags = null; + String versionId = null; + Boolean isCurrentVersion = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); if ("Name".equals(elementName.getLocalPart())) { - deserializedFilterBlobItem.name = reader.getStringElement(); + name = reader.getStringElement(); } else if ("ContainerName".equals(elementName.getLocalPart())) { - deserializedFilterBlobItem.containerName = reader.getStringElement(); + containerName = reader.getStringElement(); } else if ("Tags".equals(elementName.getLocalPart())) { - deserializedFilterBlobItem.tags = BlobTags.fromXml(reader, "Tags"); + tags = BlobTags.fromXml(reader, "Tags"); } else if ("VersionId".equals(elementName.getLocalPart())) { - deserializedFilterBlobItem.versionId = reader.getStringElement(); + versionId = reader.getStringElement(); } else if ("IsCurrentVersion".equals(elementName.getLocalPart())) { - deserializedFilterBlobItem.isCurrentVersion = reader.getNullableElement(Boolean::parseBoolean); + isCurrentVersion = reader.getNullableElement(Boolean::parseBoolean); } else { reader.skipElement(); } } + FilterBlobItem deserializedFilterBlobItem = new FilterBlobItem(name, containerName); + deserializedFilterBlobItem.tags = tags; + deserializedFilterBlobItem.versionId = versionId; + deserializedFilterBlobItem.isCurrentVersion = isCurrentVersion; 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 635b4d9dccdc1..b5bf9f954b186 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 @@ -1,58 +1,67 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; 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.Collections; import java.util.List; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; /** - * The result of a Filter Blobs API call. + * The result of the Find Blobs by Tags API. */ -@Fluent +@Immutable public final class FilterBlobSegment implements XmlSerializable { /* - * The ServiceEndpoint property. + * The service endpoint. */ @Generated - private String serviceEndpoint; + private final String serviceEndpoint; /* - * The Where property. + * The filter expression for the blobs. */ @Generated - private String where; + private final String where; /* - * The Blobs property. + * The list of filtered blobs. */ @Generated - private List blobs; + private final List blobItems; /* - * The NextMarker property. + * An opaque string value that identifies the portion of the result set to be returned with the next operation. Use + * this value in the next request to continue the listing operation. */ @Generated private String nextMarker; /** * Creates an instance of FilterBlobSegment class. + * + * @param serviceEndpoint the serviceEndpoint value to set. + * @param where the where value to set. + * @param blobItems the blobItems value to set. */ @Generated - public FilterBlobSegment() { + private FilterBlobSegment(String serviceEndpoint, String where, List blobItems) { + this.serviceEndpoint = serviceEndpoint; + this.where = where; + this.blobItems = blobItems; } /** - * Get the serviceEndpoint property: The ServiceEndpoint property. + * Get the serviceEndpoint property: The service endpoint. * * @return the serviceEndpoint value. */ @@ -62,19 +71,7 @@ public String getServiceEndpoint() { } /** - * Set the serviceEndpoint property: The ServiceEndpoint property. - * - * @param serviceEndpoint the serviceEndpoint value to set. - * @return the FilterBlobSegment object itself. - */ - @Generated - public FilterBlobSegment setServiceEndpoint(String serviceEndpoint) { - this.serviceEndpoint = serviceEndpoint; - return this; - } - - /** - * Get the where property: The Where property. + * Get the where property: The filter expression for the blobs. * * @return the where value. */ @@ -84,44 +81,21 @@ public String getWhere() { } /** - * Set the where property: The Where property. + * Get the blobItems property: The list of filtered blobs. * - * @param where the where value to set. - * @return the FilterBlobSegment object itself. + * @return the blobItems value. */ @Generated - public FilterBlobSegment setWhere(String where) { - this.where = where; - return this; - } - - /** - * Get the blobs property: The Blobs property. - * - * @return the blobs value. - */ - @Generated - public List getBlobs() { - if (this.blobs == null) { - this.blobs = new ArrayList<>(); + public List getBlobItems() { + if (this.blobItems == null) { + return Collections.emptyList(); } - return this.blobs; - } - - /** - * Set the blobs property: The Blobs property. - * - * @param blobs the blobs value to set. - * @return the FilterBlobSegment object itself. - */ - @Generated - public FilterBlobSegment setBlobs(List blobs) { - this.blobs = blobs; - return this; + return this.blobItems; } /** - * Get the nextMarker property: The NextMarker property. + * Get the nextMarker property: An opaque string value that identifies the portion of the result set to be returned + * with the next operation. Use this value in the next request to continue the listing operation. * * @return the nextMarker value. */ @@ -130,18 +104,6 @@ public String getNextMarker() { return this.nextMarker; } - /** - * Set the nextMarker property: The NextMarker property. - * - * @param nextMarker the nextMarker value to set. - * @return the FilterBlobSegment object itself. - */ - @Generated - public FilterBlobSegment setNextMarker(String nextMarker) { - this.nextMarker = nextMarker; - return this; - } - @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @@ -155,9 +117,9 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringAttribute("ServiceEndpoint", this.serviceEndpoint); xmlWriter.writeStringElement("Where", this.where); - if (this.blobs != null) { + if (this.blobItems != null) { xmlWriter.writeStartElement("Blobs"); - for (FilterBlobItem element : this.blobs) { + for (FilterBlobItem element : this.blobItems) { xmlWriter.writeXml(element, "Blob"); } xmlWriter.writeEndElement(); @@ -172,6 +134,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt * @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. */ @Generated @@ -187,6 +150,7 @@ public static FilterBlobSegment fromXml(XmlReader xmlReader) throws XMLStreamExc * 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. */ @Generated @@ -194,31 +158,35 @@ public static FilterBlobSegment fromXml(XmlReader xmlReader, String rootElementN String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "EnumerationResults" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - FilterBlobSegment deserializedFilterBlobSegment = new FilterBlobSegment(); - deserializedFilterBlobSegment.serviceEndpoint = reader.getStringAttribute(null, "ServiceEndpoint"); + String where = null; + List blobItems = null; + String nextMarker = null; + String serviceEndpoint = reader.getStringAttribute(null, "ServiceEndpoint"); while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); if ("Where".equals(elementName.getLocalPart())) { - deserializedFilterBlobSegment.where = reader.getStringElement(); + 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<>(); + if (blobItems == null) { + blobItems = new ArrayList<>(); } - deserializedFilterBlobSegment.blobs.add(FilterBlobItem.fromXml(reader, "Blob")); + blobItems.add(FilterBlobItem.fromXml(reader, "Blob")); } else { reader.skipElement(); } } } else if ("NextMarker".equals(elementName.getLocalPart())) { - deserializedFilterBlobSegment.nextMarker = reader.getStringElement(); + nextMarker = reader.getStringElement(); } else { reader.skipElement(); } } + FilterBlobSegment deserializedFilterBlobSegment = new FilterBlobSegment(serviceEndpoint, where, blobItems); + deserializedFilterBlobSegment.nextMarker = nextMarker; 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 0d835b59d578a..888603817ed7c 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 @@ -1,20 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; /** - * Defines values for FilterBlobsIncludeItem. + * Specifies what type of blobs should be returned as part of the filter operation. */ public enum FilterBlobsIncludeItem { /** - * Enum value none. + * The filter includes no versions. */ NONE("none"), /** - * Enum value versions. + * The filter includes versions. */ VERSIONS("versions"); 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/JsonTextConfigurationInternal.java similarity index 64% rename from sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/JsonTextConfiguration.java rename to sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/JsonTextConfigurationInternal.java index f73d4f4709045..9c8b0b354c33d 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/JsonTextConfigurationInternal.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; @@ -14,10 +14,10 @@ import javax.xml.stream.XMLStreamException; /** - * json text configuration. + * Represents the JSON text configuration. */ @Fluent -public final class JsonTextConfiguration implements XmlSerializable { +public final class JsonTextConfigurationInternal implements XmlSerializable { /* * The string used to separate records. */ @@ -25,10 +25,10 @@ public final class JsonTextConfiguration implements XmlSerializable { - JsonTextConfiguration deserializedJsonTextConfiguration = new JsonTextConfiguration(); + JsonTextConfigurationInternal deserializedJsonTextConfigurationInternal + = new JsonTextConfigurationInternal(); while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); if ("RecordSeparator".equals(elementName.getLocalPart())) { - deserializedJsonTextConfiguration.recordSeparator = reader.getStringElement(); + deserializedJsonTextConfigurationInternal.recordSeparator = reader.getStringElement(); } else { reader.skipElement(); } } - return deserializedJsonTextConfiguration; + return deserializedJsonTextConfigurationInternal; }); } } 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 757afc2948247..782d2edc0c2c4 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 @@ -1,74 +1,86 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; 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.Collections; +import java.util.List; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; /** - * An enumeration of blobs. + * The result of the List Blobs API. */ -@Fluent +@Immutable public final class ListBlobsFlatSegmentResponse implements XmlSerializable { /* - * The ServiceEndpoint property. + * The service endpoint. */ @Generated - private String serviceEndpoint; + private final String serviceEndpoint; /* - * The ContainerName property. + * The container name. */ @Generated - private String containerName; + private final String containerName; /* - * The Prefix property. + * The prefix of the list operation. */ @Generated private String prefix; /* - * The Marker property. + * An opaque string value that identifies the portion of the result set returned with this operation. */ @Generated private String marker; /* - * The MaxResults property. + * The maximum number of blobs to be returned with this operation. */ @Generated - private int maxResults; + private Integer maxResults; /* - * The Segment property. + * The list of blobs. */ @Generated - private BlobFlatListSegment segment; + private final List blobItems; /* - * The NextMarker property. + * An opaque string value that identifies the portion of the result set to be returned with the next operation. Use + * this value in the next request to continue the listing operation. */ @Generated private String nextMarker; /** * Creates an instance of ListBlobsFlatSegmentResponse class. + * + * @param serviceEndpoint the serviceEndpoint value to set. + * @param containerName the containerName value to set. + * @param blobItems the blobItems value to set. */ @Generated - public ListBlobsFlatSegmentResponse() { + private ListBlobsFlatSegmentResponse(String serviceEndpoint, String containerName, + List blobItems) { + this.serviceEndpoint = serviceEndpoint; + this.containerName = containerName; + this.blobItems = blobItems; } /** - * Get the serviceEndpoint property: The ServiceEndpoint property. + * Get the serviceEndpoint property: The service endpoint. * * @return the serviceEndpoint value. */ @@ -78,19 +90,7 @@ public String getServiceEndpoint() { } /** - * Set the serviceEndpoint property: The ServiceEndpoint property. - * - * @param serviceEndpoint the serviceEndpoint value to set. - * @return the ListBlobsFlatSegmentResponse object itself. - */ - @Generated - public ListBlobsFlatSegmentResponse setServiceEndpoint(String serviceEndpoint) { - this.serviceEndpoint = serviceEndpoint; - return this; - } - - /** - * Get the containerName property: The ContainerName property. + * Get the containerName property: The container name. * * @return the containerName value. */ @@ -100,19 +100,7 @@ public String getContainerName() { } /** - * Set the containerName property: The ContainerName property. - * - * @param containerName the containerName value to set. - * @return the ListBlobsFlatSegmentResponse object itself. - */ - @Generated - public ListBlobsFlatSegmentResponse setContainerName(String containerName) { - this.containerName = containerName; - return this; - } - - /** - * Get the prefix property: The Prefix property. + * Get the prefix property: The prefix of the list operation. * * @return the prefix value. */ @@ -122,19 +110,8 @@ public String getPrefix() { } /** - * Set the prefix property: The Prefix property. - * - * @param prefix the prefix value to set. - * @return the ListBlobsFlatSegmentResponse object itself. - */ - @Generated - public ListBlobsFlatSegmentResponse setPrefix(String prefix) { - this.prefix = prefix; - return this; - } - - /** - * Get the marker property: The Marker property. + * Get the marker property: An opaque string value that identifies the portion of the result set returned with this + * operation. * * @return the marker value. */ @@ -144,63 +121,31 @@ public String getMarker() { } /** - * Set the marker property: The Marker property. - * - * @param marker the marker value to set. - * @return the ListBlobsFlatSegmentResponse object itself. - */ - @Generated - public ListBlobsFlatSegmentResponse setMarker(String marker) { - this.marker = marker; - return this; - } - - /** - * Get the maxResults property: The MaxResults property. + * Get the maxResults property: The maximum number of blobs to be returned with this operation. * * @return the maxResults value. */ @Generated - public int getMaxResults() { + public Integer getMaxResults() { return this.maxResults; } /** - * Set the maxResults property: The MaxResults property. - * - * @param maxResults the maxResults value to set. - * @return the ListBlobsFlatSegmentResponse object itself. - */ - @Generated - public ListBlobsFlatSegmentResponse setMaxResults(int maxResults) { - this.maxResults = maxResults; - return this; - } - - /** - * Get the segment property: The Segment property. + * Get the blobItems property: The list of blobs. * - * @return the segment value. + * @return the blobItems value. */ @Generated - public BlobFlatListSegment getSegment() { - return this.segment; + public List getBlobItems() { + if (this.blobItems == null) { + return Collections.emptyList(); + } + return this.blobItems; } /** - * Set the segment property: The Segment property. - * - * @param segment the segment value to set. - * @return the ListBlobsFlatSegmentResponse object itself. - */ - @Generated - public ListBlobsFlatSegmentResponse setSegment(BlobFlatListSegment segment) { - this.segment = segment; - return this; - } - - /** - * Get the nextMarker property: The NextMarker property. + * Get the nextMarker property: An opaque string value that identifies the portion of the result set to be returned + * with the next operation. Use this value in the next request to continue the listing operation. * * @return the nextMarker value. */ @@ -209,18 +154,6 @@ public String getNextMarker() { return this.nextMarker; } - /** - * Set the nextMarker property: The NextMarker property. - * - * @param nextMarker the nextMarker value to set. - * @return the ListBlobsFlatSegmentResponse object itself. - */ - @Generated - public ListBlobsFlatSegmentResponse setNextMarker(String nextMarker) { - this.nextMarker = nextMarker; - return this; - } - @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @@ -236,8 +169,14 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt 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.writeNumberElement("MaxResults", this.maxResults); + if (this.blobItems != null) { + xmlWriter.writeStartElement("Blobs"); + for (BlobItemInternal element : this.blobItems) { + xmlWriter.writeXml(element, "Blob"); + } + xmlWriter.writeEndElement(); + } xmlWriter.writeStringElement("NextMarker", this.nextMarker); return xmlWriter.writeEndElement(); } @@ -248,6 +187,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt * @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. */ @Generated @@ -263,6 +203,7 @@ public static ListBlobsFlatSegmentResponse fromXml(XmlReader xmlReader) throws X * 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. */ @Generated @@ -271,27 +212,46 @@ public static ListBlobsFlatSegmentResponse fromXml(XmlReader xmlReader, String r String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "EnumerationResults" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - ListBlobsFlatSegmentResponse deserializedListBlobsFlatSegmentResponse = new ListBlobsFlatSegmentResponse(); - deserializedListBlobsFlatSegmentResponse.serviceEndpoint - = reader.getStringAttribute(null, "ServiceEndpoint"); - deserializedListBlobsFlatSegmentResponse.containerName = reader.getStringAttribute(null, "ContainerName"); + String prefix = null; + String marker = null; + Integer maxResults = null; + List blobItems = null; + String nextMarker = null; + String serviceEndpoint = reader.getStringAttribute(null, "ServiceEndpoint"); + String containerName = reader.getStringAttribute(null, "ContainerName"); while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); if ("Prefix".equals(elementName.getLocalPart())) { - deserializedListBlobsFlatSegmentResponse.prefix = reader.getStringElement(); + prefix = reader.getStringElement(); } else if ("Marker".equals(elementName.getLocalPart())) { - deserializedListBlobsFlatSegmentResponse.marker = reader.getStringElement(); + marker = reader.getStringElement(); } else if ("MaxResults".equals(elementName.getLocalPart())) { - deserializedListBlobsFlatSegmentResponse.maxResults = reader.getIntElement(); + maxResults = reader.getNullableElement(Integer::parseInt); } else if ("Blobs".equals(elementName.getLocalPart())) { - deserializedListBlobsFlatSegmentResponse.segment = BlobFlatListSegment.fromXml(reader, "Blobs"); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + elementName = reader.getElementName(); + if ("Blob".equals(elementName.getLocalPart())) { + if (blobItems == null) { + blobItems = new ArrayList<>(); + } + blobItems.add(BlobItemInternal.fromXml(reader, "Blob")); + } else { + reader.skipElement(); + } + } } else if ("NextMarker".equals(elementName.getLocalPart())) { - deserializedListBlobsFlatSegmentResponse.nextMarker = reader.getStringElement(); + nextMarker = reader.getStringElement(); } else { reader.skipElement(); } } + ListBlobsFlatSegmentResponse deserializedListBlobsFlatSegmentResponse + = new ListBlobsFlatSegmentResponse(serviceEndpoint, containerName, blobItems); + deserializedListBlobsFlatSegmentResponse.prefix = prefix; + deserializedListBlobsFlatSegmentResponse.marker = marker; + deserializedListBlobsFlatSegmentResponse.maxResults = maxResults; + deserializedListBlobsFlatSegmentResponse.nextMarker = nextMarker; 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 7bb7df3a779a9..77916c799b9e1 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -14,67 +14,76 @@ import javax.xml.stream.XMLStreamException; /** - * An enumeration of blobs. + * The result of the List Blobs Hierarchical API. */ -@Fluent +@Immutable public final class ListBlobsHierarchySegmentResponse implements XmlSerializable { /* - * The ServiceEndpoint property. + * The service endpoint. */ @Generated - private String serviceEndpoint; + private final String serviceEndpoint; /* - * The ContainerName property. + * The container name. */ @Generated - private String containerName; + private final String containerName; /* - * The Prefix property. + * The delimiter of the blobs. */ @Generated - private String prefix; + private String delimiter; /* - * The Marker property. + * The prefix of the blobs. */ @Generated - private String marker; + private String prefix; /* - * The MaxResults property. + * An opaque string value that identifies the portion of the result set returned with this operation. */ @Generated - private int maxResults; + private String marker; /* - * The Delimiter property. + * The maximum number of blobs to be returned with this operation. */ @Generated - private String delimiter; + private Integer maxResults; /* - * The Segment property. + * The list of hierarchical blobs. */ @Generated - private BlobHierarchyListSegment segment; + private final BlobHierarchyListSegment hierarchicalList; /* - * The NextMarker property. + * An opaque string value that identifies the portion of the result set to be returned with the next operation. Use + * this value in the next request to continue the listing operation. */ @Generated private String nextMarker; /** * Creates an instance of ListBlobsHierarchySegmentResponse class. + * + * @param serviceEndpoint the serviceEndpoint value to set. + * @param containerName the containerName value to set. + * @param hierarchicalList the hierarchicalList value to set. */ @Generated - public ListBlobsHierarchySegmentResponse() { + private ListBlobsHierarchySegmentResponse(String serviceEndpoint, String containerName, + BlobHierarchyListSegment hierarchicalList) { + this.serviceEndpoint = serviceEndpoint; + this.containerName = containerName; + this.hierarchicalList = hierarchicalList; } /** - * Get the serviceEndpoint property: The ServiceEndpoint property. + * Get the serviceEndpoint property: The service endpoint. * * @return the serviceEndpoint value. */ @@ -84,19 +93,7 @@ public String getServiceEndpoint() { } /** - * Set the serviceEndpoint property: The ServiceEndpoint property. - * - * @param serviceEndpoint the serviceEndpoint value to set. - * @return the ListBlobsHierarchySegmentResponse object itself. - */ - @Generated - public ListBlobsHierarchySegmentResponse setServiceEndpoint(String serviceEndpoint) { - this.serviceEndpoint = serviceEndpoint; - return this; - } - - /** - * Get the containerName property: The ContainerName property. + * Get the containerName property: The container name. * * @return the containerName value. */ @@ -106,19 +103,17 @@ public String getContainerName() { } /** - * Set the containerName property: The ContainerName property. + * Get the delimiter property: The delimiter of the blobs. * - * @param containerName the containerName value to set. - * @return the ListBlobsHierarchySegmentResponse object itself. + * @return the delimiter value. */ @Generated - public ListBlobsHierarchySegmentResponse setContainerName(String containerName) { - this.containerName = containerName; - return this; + public String getDelimiter() { + return this.delimiter; } /** - * Get the prefix property: The Prefix property. + * Get the prefix property: The prefix of the blobs. * * @return the prefix value. */ @@ -128,19 +123,8 @@ public String getPrefix() { } /** - * Set the prefix property: The Prefix property. - * - * @param prefix the prefix value to set. - * @return the ListBlobsHierarchySegmentResponse object itself. - */ - @Generated - public ListBlobsHierarchySegmentResponse setPrefix(String prefix) { - this.prefix = prefix; - return this; - } - - /** - * Get the marker property: The Marker property. + * Get the marker property: An opaque string value that identifies the portion of the result set returned with this + * operation. * * @return the marker value. */ @@ -150,85 +134,28 @@ public String getMarker() { } /** - * Set the marker property: The Marker property. - * - * @param marker the marker value to set. - * @return the ListBlobsHierarchySegmentResponse object itself. - */ - @Generated - public ListBlobsHierarchySegmentResponse setMarker(String marker) { - this.marker = marker; - return this; - } - - /** - * Get the maxResults property: The MaxResults property. + * Get the maxResults property: The maximum number of blobs to be returned with this operation. * * @return the maxResults value. */ @Generated - public int getMaxResults() { + public Integer getMaxResults() { return this.maxResults; } /** - * Set the maxResults property: The MaxResults property. + * Get the hierarchicalList property: The list of hierarchical blobs. * - * @param maxResults the maxResults value to set. - * @return the ListBlobsHierarchySegmentResponse object itself. + * @return the hierarchicalList value. */ @Generated - public ListBlobsHierarchySegmentResponse setMaxResults(int maxResults) { - this.maxResults = maxResults; - return this; + public BlobHierarchyListSegment getHierarchicalList() { + return this.hierarchicalList; } /** - * Get the delimiter property: The Delimiter property. - * - * @return the delimiter value. - */ - @Generated - public String getDelimiter() { - return this.delimiter; - } - - /** - * Set the delimiter property: The Delimiter property. - * - * @param delimiter the delimiter value to set. - * @return the ListBlobsHierarchySegmentResponse object itself. - */ - @Generated - public ListBlobsHierarchySegmentResponse setDelimiter(String delimiter) { - this.delimiter = delimiter; - return this; - } - - /** - * Get the segment property: The Segment property. - * - * @return the segment value. - */ - @Generated - public BlobHierarchyListSegment getSegment() { - return this.segment; - } - - /** - * Set the segment property: The Segment property. - * - * @param segment the segment value to set. - * @return the ListBlobsHierarchySegmentResponse object itself. - */ - @Generated - public ListBlobsHierarchySegmentResponse setSegment(BlobHierarchyListSegment segment) { - this.segment = segment; - return this; - } - - /** - * Get the nextMarker property: The NextMarker property. + * Get the nextMarker property: An opaque string value that identifies the portion of the result set to be returned + * with the next operation. Use this value in the next request to continue the listing operation. * * @return the nextMarker value. */ @@ -237,18 +164,6 @@ public String getNextMarker() { return this.nextMarker; } - /** - * Set the nextMarker property: The NextMarker property. - * - * @param nextMarker the nextMarker value to set. - * @return the ListBlobsHierarchySegmentResponse object itself. - */ - @Generated - public ListBlobsHierarchySegmentResponse setNextMarker(String nextMarker) { - this.nextMarker = nextMarker; - return this; - } - @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @@ -262,11 +177,11 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringAttribute("ServiceEndpoint", this.serviceEndpoint); xmlWriter.writeStringAttribute("ContainerName", this.containerName); + xmlWriter.writeStringElement("Delimiter", this.delimiter); 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.writeNumberElement("MaxResults", this.maxResults); + xmlWriter.writeXml(this.hierarchicalList, "Blobs"); xmlWriter.writeStringElement("NextMarker", this.nextMarker); return xmlWriter.writeEndElement(); } @@ -277,6 +192,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt * @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. */ @Generated @@ -292,6 +208,7 @@ public static ListBlobsHierarchySegmentResponse fromXml(XmlReader xmlReader) thr * 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. */ @Generated @@ -300,32 +217,40 @@ public static ListBlobsHierarchySegmentResponse fromXml(XmlReader xmlReader, Str String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "EnumerationResults" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - ListBlobsHierarchySegmentResponse deserializedListBlobsHierarchySegmentResponse - = new ListBlobsHierarchySegmentResponse(); - deserializedListBlobsHierarchySegmentResponse.serviceEndpoint - = reader.getStringAttribute(null, "ServiceEndpoint"); - deserializedListBlobsHierarchySegmentResponse.containerName - = reader.getStringAttribute(null, "ContainerName"); + String delimiter = null; + String prefix = null; + String marker = null; + Integer maxResults = null; + BlobHierarchyListSegment hierarchicalList = null; + String nextMarker = null; + String serviceEndpoint = reader.getStringAttribute(null, "ServiceEndpoint"); + String containerName = reader.getStringAttribute(null, "ContainerName"); while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); - if ("Prefix".equals(elementName.getLocalPart())) { - deserializedListBlobsHierarchySegmentResponse.prefix = reader.getStringElement(); + if ("Delimiter".equals(elementName.getLocalPart())) { + delimiter = reader.getStringElement(); + } else if ("Prefix".equals(elementName.getLocalPart())) { + prefix = reader.getStringElement(); } else if ("Marker".equals(elementName.getLocalPart())) { - deserializedListBlobsHierarchySegmentResponse.marker = reader.getStringElement(); + marker = reader.getStringElement(); } else if ("MaxResults".equals(elementName.getLocalPart())) { - deserializedListBlobsHierarchySegmentResponse.maxResults = reader.getIntElement(); - } else if ("Delimiter".equals(elementName.getLocalPart())) { - deserializedListBlobsHierarchySegmentResponse.delimiter = reader.getStringElement(); + maxResults = reader.getNullableElement(Integer::parseInt); } else if ("Blobs".equals(elementName.getLocalPart())) { - deserializedListBlobsHierarchySegmentResponse.segment - = BlobHierarchyListSegment.fromXml(reader, "Blobs"); + hierarchicalList = BlobHierarchyListSegment.fromXml(reader, "Blobs"); } else if ("NextMarker".equals(elementName.getLocalPart())) { - deserializedListBlobsHierarchySegmentResponse.nextMarker = reader.getStringElement(); + nextMarker = reader.getStringElement(); } else { reader.skipElement(); } } + ListBlobsHierarchySegmentResponse deserializedListBlobsHierarchySegmentResponse + = new ListBlobsHierarchySegmentResponse(serviceEndpoint, containerName, hierarchicalList); + deserializedListBlobsHierarchySegmentResponse.delimiter = delimiter; + deserializedListBlobsHierarchySegmentResponse.prefix = prefix; + deserializedListBlobsHierarchySegmentResponse.marker = marker; + deserializedListBlobsHierarchySegmentResponse.maxResults = maxResults; + deserializedListBlobsHierarchySegmentResponse.nextMarker = nextMarker; 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 fa5ce19f72af4..6dff2714ce37c 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; @@ -16,73 +16,61 @@ /** * The PageBlobsClearPagesHeaders model. */ -@Fluent +@Immutable public final class PageBlobsClearPagesHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* * The Content-MD5 property. */ @Generated - private byte[] contentMD5; + private final byte[] contentMd5; /* * The x-ms-content-crc64 property. */ @Generated - private byte[] xMsContentCrc64; + private final byte[] contentCrc64; /* * The x-ms-blob-sequence-number property. */ @Generated - private Long xMsBlobSequenceNumber; + private final Long blobSequenceNumber; /* - * The x-ms-client-request-id property. - */ - @Generated - private String xMsClientRequestId; - - /* - * The x-ms-request-id property. + * The Date property. */ @Generated - private String xMsRequestId; + private final DateTimeRfc1123 date; /* * The x-ms-version property. */ @Generated - private String xMsVersion; + private final String version; /* - * The Date property. - */ - @Generated - private DateTimeRfc1123 date; - - /* - * The x-ms-request-server-encrypted property. + * The x-ms-request-id property. */ @Generated - private Boolean xMsRequestServerEncrypted; + private final String requestId; /* - * The x-ms-encryption-key-sha256 property. + * The x-ms-client-request-id property. */ @Generated - private String xMsEncryptionKeySha256; + private final String clientRequestId; private static final HttpHeaderName X_MS_CONTENT_CRC64 = HttpHeaderName.fromString("x-ms-content-crc64"); @@ -91,12 +79,6 @@ public final class PageBlobsClearPagesHeaders { private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED - = HttpHeaderName.fromString("x-ms-request-server-encrypted"); - - private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 - = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); - // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsClearPagesHeaders class. @@ -111,40 +93,33 @@ public PageBlobsClearPagesHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); - if (contentMD5 != null) { - this.contentMD5 = Base64.getDecoder().decode(contentMD5); + String contentMd5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMd5 != null) { + this.contentMd5 = Base64.getDecoder().decode(contentMd5); } else { - this.contentMD5 = null; + this.contentMd5 = null; } - String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); - if (xMsContentCrc64 != null) { - this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); + String contentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (contentCrc64 != null) { + this.contentCrc64 = Base64.getDecoder().decode(contentCrc64); } else { - this.xMsContentCrc64 = null; + this.contentCrc64 = null; } - String xMsBlobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); - if (xMsBlobSequenceNumber != null) { - this.xMsBlobSequenceNumber = Long.parseLong(xMsBlobSequenceNumber); + String blobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); + if (blobSequenceNumber != null) { + this.blobSequenceNumber = Long.parseLong(blobSequenceNumber); } else { - this.xMsBlobSequenceNumber = null; + this.blobSequenceNumber = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } - String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); - if (xMsRequestServerEncrypted != null) { - this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); - } else { - this.xMsRequestServerEncrypted = null; - } - this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -157,18 +132,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the PageBlobsClearPagesHeaders object itself. - */ - @Generated - public PageBlobsClearPagesHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -183,151 +146,33 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the PageBlobsClearPagesHeaders object itself. - */ - @Generated - public PageBlobsClearPagesHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the contentMD5 property: The Content-MD5 property. - * - * @return the contentMD5 value. - */ - @Generated - public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); - } - - /** - * Set the contentMD5 property: The Content-MD5 property. - * - * @param contentMD5 the contentMD5 value to set. - * @return the PageBlobsClearPagesHeaders object itself. - */ - @Generated - public PageBlobsClearPagesHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); - return this; - } - - /** - * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @return the xMsContentCrc64 value. - */ - @Generated - public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); - } - - /** - * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. + * Get the contentMd5 property: The Content-MD5 property. * - * @param xMsContentCrc64 the xMsContentCrc64 value to set. - * @return the PageBlobsClearPagesHeaders object itself. + * @return the contentMd5 value. */ @Generated - public PageBlobsClearPagesHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); - return this; + public byte[] getContentMd5() { + return CoreUtils.clone(this.contentMd5); } /** - * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. + * Get the contentCrc64 property: The x-ms-content-crc64 property. * - * @return the xMsBlobSequenceNumber value. + * @return the contentCrc64 value. */ @Generated - public Long getXMsBlobSequenceNumber() { - return this.xMsBlobSequenceNumber; + public byte[] getContentCrc64() { + return CoreUtils.clone(this.contentCrc64); } /** - * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. + * Get the blobSequenceNumber property: The x-ms-blob-sequence-number property. * - * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. - * @return the PageBlobsClearPagesHeaders object itself. + * @return the blobSequenceNumber value. */ @Generated - public PageBlobsClearPagesHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { - this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the PageBlobsClearPagesHeaders object itself. - */ - @Generated - public PageBlobsClearPagesHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the PageBlobsClearPagesHeaders object itself. - */ - @Generated - public PageBlobsClearPagesHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the PageBlobsClearPagesHeaders object itself. - */ - @Generated - public PageBlobsClearPagesHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public Long getBlobSequenceNumber() { + return this.blobSequenceNumber; } /** @@ -344,62 +189,32 @@ public OffsetDateTime getDate() { } /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the PageBlobsClearPagesHeaders object itself. - */ - @Generated - public PageBlobsClearPagesHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @return the xMsRequestServerEncrypted value. - */ - @Generated - public Boolean isXMsRequestServerEncrypted() { - return this.xMsRequestServerEncrypted; - } - - /** - * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. + * Get the version property: The x-ms-version property. * - * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. - * @return the PageBlobsClearPagesHeaders object itself. + * @return the version value. */ @Generated - public PageBlobsClearPagesHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { - this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsEncryptionKeySha256 value. + * @return the requestId value. */ @Generated - public String getXMsEncryptionKeySha256() { - return this.xMsEncryptionKeySha256; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. - * @return the PageBlobsClearPagesHeaders object itself. + * @return the clientRequestId value. */ @Generated - public PageBlobsClearPagesHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { - this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 eef2bd5c1e91c..547b3e6b8194f 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -15,62 +15,62 @@ /** * The PageBlobsCopyIncrementalHeaders model. */ -@Fluent +@Immutable public final class PageBlobsCopyIncrementalHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* - * The x-ms-client-request-id property. + * The x-ms-copy-id property. */ @Generated - private String xMsClientRequestId; + private final String copyId; /* - * The x-ms-request-id property. + * The x-ms-copy-status property. */ @Generated - private String xMsRequestId; + private final CopyStatusType copyStatus; /* - * The x-ms-version property. + * The Date property. */ @Generated - private String xMsVersion; + private final DateTimeRfc1123 date; /* - * The Date property. + * The x-ms-version property. */ @Generated - private DateTimeRfc1123 date; + private final String version; /* - * The x-ms-copy-id property. + * The x-ms-request-id property. */ @Generated - private String xMsCopyId; + private final String requestId; /* - * The x-ms-copy-status property. + * The x-ms-client-request-id property. */ @Generated - private CopyStatusType xMsCopyStatus; - - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private final String clientRequestId; private static final HttpHeaderName X_MS_COPY_ID = HttpHeaderName.fromString("x-ms-copy-id"); private static final HttpHeaderName X_MS_COPY_STATUS = HttpHeaderName.fromString("x-ms-copy-status"); + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsCopyIncrementalHeaders class. @@ -85,22 +85,22 @@ public PageBlobsCopyIncrementalHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.copyId = rawHeaders.getValue(X_MS_COPY_ID); + String copyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); + if (copyStatus != null) { + this.copyStatus = CopyStatusType.fromString(copyStatus); + } else { + this.copyStatus = null; + } String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } - this.xMsCopyId = rawHeaders.getValue(X_MS_COPY_ID); - String xMsCopyStatus = rawHeaders.getValue(X_MS_COPY_STATUS); - if (xMsCopyStatus != null) { - this.xMsCopyStatus = CopyStatusType.fromString(xMsCopyStatus); - } else { - this.xMsCopyStatus = null; - } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -113,18 +113,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the PageBlobsCopyIncrementalHeaders object itself. - */ - @Generated - public PageBlobsCopyIncrementalHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -139,85 +127,23 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the PageBlobsCopyIncrementalHeaders object itself. - */ - @Generated - public PageBlobsCopyIncrementalHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the PageBlobsCopyIncrementalHeaders object itself. - */ - @Generated - public PageBlobsCopyIncrementalHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the PageBlobsCopyIncrementalHeaders object itself. - */ - @Generated - public PageBlobsCopyIncrementalHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the copyId property: The x-ms-copy-id property. * - * @return the xMsVersion value. + * @return the copyId value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public String getCopyId() { + return this.copyId; } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the copyStatus property: The x-ms-copy-status property. * - * @param xMsVersion the xMsVersion value to set. - * @return the PageBlobsCopyIncrementalHeaders object itself. + * @return the copyStatus value. */ @Generated - public PageBlobsCopyIncrementalHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public CopyStatusType getCopyStatus() { + return this.copyStatus; } /** @@ -234,62 +160,32 @@ public OffsetDateTime getDate() { } /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the PageBlobsCopyIncrementalHeaders object itself. - */ - @Generated - public PageBlobsCopyIncrementalHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsCopyId property: The x-ms-copy-id property. - * - * @return the xMsCopyId value. - */ - @Generated - public String getXMsCopyId() { - return this.xMsCopyId; - } - - /** - * Set the xMsCopyId property: The x-ms-copy-id property. + * Get the version property: The x-ms-version property. * - * @param xMsCopyId the xMsCopyId value to set. - * @return the PageBlobsCopyIncrementalHeaders object itself. + * @return the version value. */ @Generated - public PageBlobsCopyIncrementalHeaders setXMsCopyId(String xMsCopyId) { - this.xMsCopyId = xMsCopyId; - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsCopyStatus property: The x-ms-copy-status property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsCopyStatus value. + * @return the requestId value. */ @Generated - public CopyStatusType getXMsCopyStatus() { - return this.xMsCopyStatus; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsCopyStatus property: The x-ms-copy-status property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsCopyStatus the xMsCopyStatus value to set. - * @return the PageBlobsCopyIncrementalHeaders object itself. + * @return the clientRequestId value. */ @Generated - public PageBlobsCopyIncrementalHeaders setXMsCopyStatus(CopyStatusType xMsCopyStatus) { - this.xMsCopyStatus = xMsCopyStatus; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 370cc506dec05..4a204603a11d1 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; @@ -16,75 +16,73 @@ /** * The PageBlobsCreateHeaders model. */ -@Fluent +@Immutable public final class PageBlobsCreateHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* * The Content-MD5 property. */ @Generated - private byte[] contentMD5; + private final byte[] contentMd5; /* - * The x-ms-client-request-id property. + * The x-ms-version-id property. */ @Generated - private String xMsClientRequestId; + private final String versionId; /* - * The x-ms-request-id property. + * The x-ms-request-server-encrypted property. */ @Generated - private String xMsRequestId; + private final Boolean isServerEncrypted; /* - * The x-ms-version property. + * The x-ms-encryption-key-sha256 property. */ @Generated - private String xMsVersion; + private final String encryptionKeySha256; /* - * The x-ms-version-id property. + * The x-ms-encryption-scope property. */ @Generated - private String xMsVersionId; + private final String encryptionScope; /* * The Date property. */ @Generated - private DateTimeRfc1123 date; + private final DateTimeRfc1123 date; /* - * The x-ms-request-server-encrypted property. + * The x-ms-version property. */ @Generated - private Boolean xMsRequestServerEncrypted; + private final String version; /* - * The x-ms-encryption-key-sha256 property. + * The x-ms-request-id property. */ @Generated - private String xMsEncryptionKeySha256; + private final String requestId; /* - * The x-ms-encryption-scope property. + * The x-ms-client-request-id property. */ @Generated - private String xMsEncryptionScope; - - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION_ID = HttpHeaderName.fromString("x-ms-version-id"); @@ -96,6 +94,8 @@ public final class PageBlobsCreateHeaders { private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsCreateHeaders class. @@ -110,30 +110,30 @@ public PageBlobsCreateHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); - if (contentMD5 != null) { - this.contentMD5 = Base64.getDecoder().decode(contentMD5); + String contentMd5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMd5 != null) { + this.contentMd5 = Base64.getDecoder().decode(contentMd5); } else { - this.contentMD5 = null; + this.contentMd5 = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - this.xMsVersionId = rawHeaders.getValue(X_MS_VERSION_ID); + this.versionId = rawHeaders.getValue(X_MS_VERSION_ID); + String isServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (isServerEncrypted != null) { + this.isServerEncrypted = Boolean.parseBoolean(isServerEncrypted); + } else { + this.isServerEncrypted = null; + } + this.encryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.encryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } - String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); - if (xMsRequestServerEncrypted != null) { - this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); - } else { - this.xMsRequestServerEncrypted = null; - } - this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -146,18 +146,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the PageBlobsCreateHeaders object itself. - */ - @Generated - public PageBlobsCreateHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -172,129 +160,53 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the PageBlobsCreateHeaders object itself. - */ - @Generated - public PageBlobsCreateHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the contentMD5 property: The Content-MD5 property. - * - * @return the contentMD5 value. - */ - @Generated - public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); - } - - /** - * Set the contentMD5 property: The Content-MD5 property. - * - * @param contentMD5 the contentMD5 value to set. - * @return the PageBlobsCreateHeaders object itself. - */ - @Generated - public PageBlobsCreateHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the PageBlobsCreateHeaders object itself. - */ - @Generated - public PageBlobsCreateHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. + * Get the contentMd5 property: The Content-MD5 property. * - * @param xMsRequestId the xMsRequestId value to set. - * @return the PageBlobsCreateHeaders object itself. + * @return the contentMd5 value. */ @Generated - public PageBlobsCreateHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; + public byte[] getContentMd5() { + return CoreUtils.clone(this.contentMd5); } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the versionId property: The x-ms-version-id property. * - * @return the xMsVersion value. + * @return the versionId value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public String getVersionId() { + return this.versionId; } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the isServerEncrypted property: The x-ms-request-server-encrypted property. * - * @param xMsVersion the xMsVersion value to set. - * @return the PageBlobsCreateHeaders object itself. + * @return the isServerEncrypted value. */ @Generated - public PageBlobsCreateHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public Boolean isServerEncrypted() { + return this.isServerEncrypted; } /** - * Get the xMsVersionId property: The x-ms-version-id property. + * Get the encryptionKeySha256 property: The x-ms-encryption-key-sha256 property. * - * @return the xMsVersionId value. + * @return the encryptionKeySha256 value. */ @Generated - public String getXMsVersionId() { - return this.xMsVersionId; + public String getEncryptionKeySha256() { + return this.encryptionKeySha256; } /** - * Set the xMsVersionId property: The x-ms-version-id property. + * Get the encryptionScope property: The x-ms-encryption-scope property. * - * @param xMsVersionId the xMsVersionId value to set. - * @return the PageBlobsCreateHeaders object itself. + * @return the encryptionScope value. */ @Generated - public PageBlobsCreateHeaders setXMsVersionId(String xMsVersionId) { - this.xMsVersionId = xMsVersionId; - return this; + public String getEncryptionScope() { + return this.encryptionScope; } /** @@ -311,84 +223,32 @@ public OffsetDateTime getDate() { } /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the PageBlobsCreateHeaders object itself. - */ - @Generated - public PageBlobsCreateHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @return the xMsRequestServerEncrypted value. - */ - @Generated - public Boolean isXMsRequestServerEncrypted() { - return this.xMsRequestServerEncrypted; - } - - /** - * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. - * @return the PageBlobsCreateHeaders object itself. - */ - @Generated - public PageBlobsCreateHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { - this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; - return this; - } - - /** - * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @return the xMsEncryptionKeySha256 value. - */ - @Generated - public String getXMsEncryptionKeySha256() { - return this.xMsEncryptionKeySha256; - } - - /** - * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * Get the version property: The x-ms-version property. * - * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. - * @return the PageBlobsCreateHeaders object itself. + * @return the version value. */ @Generated - public PageBlobsCreateHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { - this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsEncryptionScope value. + * @return the requestId value. */ @Generated - public String getXMsEncryptionScope() { - return this.xMsEncryptionScope; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsEncryptionScope the xMsEncryptionScope value to set. - * @return the PageBlobsCreateHeaders object itself. + * @return the clientRequestId value. */ @Generated - public PageBlobsCreateHeaders setXMsEncryptionScope(String xMsEncryptionScope) { - this.xMsEncryptionScope = xMsEncryptionScope; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 307c6972d7665..e7324a0afc5a7 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,49 +14,49 @@ /** * The PageBlobsGetPageRangesDiffHeaders model. */ -@Fluent +@Immutable public final class PageBlobsGetPageRangesDiffHeaders { /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The x-ms-blob-content-length property. */ @Generated - private Long xMsBlobContentLength; + private final Long blobContentLength; /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_BLOB_CONTENT_LENGTH = HttpHeaderName.fromString("x-ms-blob-content-length"); @@ -77,21 +77,21 @@ public PageBlobsGetPageRangesDiffHeaders(HttpHeaders rawHeaders) { this.lastModified = null; } this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); - String xMsBlobContentLength = rawHeaders.getValue(X_MS_BLOB_CONTENT_LENGTH); - if (xMsBlobContentLength != null) { - this.xMsBlobContentLength = Long.parseLong(xMsBlobContentLength); + String blobContentLength = rawHeaders.getValue(X_MS_BLOB_CONTENT_LENGTH); + if (blobContentLength != null) { + this.blobContentLength = Long.parseLong(blobContentLength); } else { - this.xMsBlobContentLength = null; + this.blobContentLength = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -107,22 +107,6 @@ public OffsetDateTime getLastModified() { return this.lastModified.getDateTime(); } - /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the PageBlobsGetPageRangesDiffHeaders object itself. - */ - @Generated - public PageBlobsGetPageRangesDiffHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - /** * Get the eTag property: The ETag property. * @@ -134,131 +118,55 @@ public String getETag() { } /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the PageBlobsGetPageRangesDiffHeaders object itself. - */ - @Generated - public PageBlobsGetPageRangesDiffHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the xMsBlobContentLength property: The x-ms-blob-content-length property. - * - * @return the xMsBlobContentLength value. - */ - @Generated - public Long getXMsBlobContentLength() { - return this.xMsBlobContentLength; - } - - /** - * Set the xMsBlobContentLength property: The x-ms-blob-content-length property. - * - * @param xMsBlobContentLength the xMsBlobContentLength value to set. - * @return the PageBlobsGetPageRangesDiffHeaders object itself. - */ - @Generated - public PageBlobsGetPageRangesDiffHeaders setXMsBlobContentLength(Long xMsBlobContentLength) { - this.xMsBlobContentLength = xMsBlobContentLength; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * Get the blobContentLength property: The x-ms-blob-content-length property. * - * @return the xMsClientRequestId value. + * @return the blobContentLength value. */ @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; + public Long getBlobContentLength() { + return this.blobContentLength; } /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the PageBlobsGetPageRangesDiffHeaders object itself. - */ - @Generated - public PageBlobsGetPageRangesDiffHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the PageBlobsGetPageRangesDiffHeaders object itself. - */ - @Generated - public PageBlobsGetPageRangesDiffHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the PageBlobsGetPageRangesDiffHeaders object itself. + * @return the version value. */ @Generated - public PageBlobsGetPageRangesDiffHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the PageBlobsGetPageRangesDiffHeaders object itself. + * @return the clientRequestId value. */ @Generated - public PageBlobsGetPageRangesDiffHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 deleted file mode 100644 index 606b00cead314..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffNextHeaders.java +++ /dev/null @@ -1,202 +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.azure.core.util.DateTimeRfc1123; -import java.time.OffsetDateTime; - -/** The PageBlobsGetPageRangesDiffNextHeaders model. */ -@Fluent -public final class PageBlobsGetPageRangesDiffNextHeaders { - /* - * The x-ms-version property. - */ - private String xMsVersion; - - /* - * The x-ms-blob-content-length property. - */ - private Long xMsBlobContentLength; - - /* - * The ETag property. - */ - private String eTag; - - /* - * The Last-Modified property. - */ - private DateTimeRfc1123 lastModified; - - /* - * The x-ms-request-id property. - */ - private String xMsRequestId; - - /* - * The x-ms-client-request-id property. - */ - private String xMsClientRequestId; - - /* - * The Date property. - */ - private DateTimeRfc1123 dateProperty; - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the PageBlobsGetPageRangesDiffNextHeaders object itself. - */ - public PageBlobsGetPageRangesDiffNextHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the xMsBlobContentLength property: The x-ms-blob-content-length property. - * - * @return the xMsBlobContentLength value. - */ - public Long getXMsBlobContentLength() { - return this.xMsBlobContentLength; - } - - /** - * Set the xMsBlobContentLength property: The x-ms-blob-content-length property. - * - * @param xMsBlobContentLength the xMsBlobContentLength value to set. - * @return the PageBlobsGetPageRangesDiffNextHeaders object itself. - */ - public PageBlobsGetPageRangesDiffNextHeaders setXMsBlobContentLength(Long xMsBlobContentLength) { - this.xMsBlobContentLength = xMsBlobContentLength; - return this; - } - - /** - * Get the eTag property: The ETag property. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the PageBlobsGetPageRangesDiffNextHeaders object itself. - */ - public PageBlobsGetPageRangesDiffNextHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the lastModified property: The Last-Modified property. - * - * @return the lastModified value. - */ - public OffsetDateTime getLastModified() { - if (this.lastModified == null) { - return null; - } - return this.lastModified.getDateTime(); - } - - /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the PageBlobsGetPageRangesDiffNextHeaders object itself. - */ - public PageBlobsGetPageRangesDiffNextHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the PageBlobsGetPageRangesDiffNextHeaders object itself. - */ - public PageBlobsGetPageRangesDiffNextHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the PageBlobsGetPageRangesDiffNextHeaders object itself. - */ - public PageBlobsGetPageRangesDiffNextHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the dateProperty property: The Date property. - * - * @return the dateProperty value. - */ - public OffsetDateTime getDateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); - } - - /** - * Set the dateProperty property: The Date property. - * - * @param dateProperty the dateProperty value to set. - * @return the PageBlobsGetPageRangesDiffNextHeaders object itself. - */ - public PageBlobsGetPageRangesDiffNextHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } -} 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 eefa57fb48cc6..8dfeb258e41bb 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,49 +14,49 @@ /** * The PageBlobsGetPageRangesHeaders model. */ -@Fluent +@Immutable public final class PageBlobsGetPageRangesHeaders { /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The x-ms-blob-content-length property. */ @Generated - private Long xMsBlobContentLength; + private final Long blobContentLength; /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_BLOB_CONTENT_LENGTH = HttpHeaderName.fromString("x-ms-blob-content-length"); @@ -77,21 +77,21 @@ public PageBlobsGetPageRangesHeaders(HttpHeaders rawHeaders) { this.lastModified = null; } this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); - String xMsBlobContentLength = rawHeaders.getValue(X_MS_BLOB_CONTENT_LENGTH); - if (xMsBlobContentLength != null) { - this.xMsBlobContentLength = Long.parseLong(xMsBlobContentLength); + String blobContentLength = rawHeaders.getValue(X_MS_BLOB_CONTENT_LENGTH); + if (blobContentLength != null) { + this.blobContentLength = Long.parseLong(blobContentLength); } else { - this.xMsBlobContentLength = null; + this.blobContentLength = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -107,22 +107,6 @@ public OffsetDateTime getLastModified() { return this.lastModified.getDateTime(); } - /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the PageBlobsGetPageRangesHeaders object itself. - */ - @Generated - public PageBlobsGetPageRangesHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - /** * Get the eTag property: The ETag property. * @@ -134,131 +118,55 @@ public String getETag() { } /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the PageBlobsGetPageRangesHeaders object itself. - */ - @Generated - public PageBlobsGetPageRangesHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the xMsBlobContentLength property: The x-ms-blob-content-length property. - * - * @return the xMsBlobContentLength value. - */ - @Generated - public Long getXMsBlobContentLength() { - return this.xMsBlobContentLength; - } - - /** - * Set the xMsBlobContentLength property: The x-ms-blob-content-length property. - * - * @param xMsBlobContentLength the xMsBlobContentLength value to set. - * @return the PageBlobsGetPageRangesHeaders object itself. - */ - @Generated - public PageBlobsGetPageRangesHeaders setXMsBlobContentLength(Long xMsBlobContentLength) { - this.xMsBlobContentLength = xMsBlobContentLength; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * Get the blobContentLength property: The x-ms-blob-content-length property. * - * @return the xMsClientRequestId value. + * @return the blobContentLength value. */ @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; + public Long getBlobContentLength() { + return this.blobContentLength; } /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the PageBlobsGetPageRangesHeaders object itself. - */ - @Generated - public PageBlobsGetPageRangesHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the PageBlobsGetPageRangesHeaders object itself. - */ - @Generated - public PageBlobsGetPageRangesHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the PageBlobsGetPageRangesHeaders object itself. + * @return the version value. */ @Generated - public PageBlobsGetPageRangesHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the PageBlobsGetPageRangesHeaders object itself. + * @return the clientRequestId value. */ @Generated - public PageBlobsGetPageRangesHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 deleted file mode 100644 index e48b103d8d4a4..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesNextHeaders.java +++ /dev/null @@ -1,202 +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.azure.core.util.DateTimeRfc1123; -import java.time.OffsetDateTime; - -/** The PageBlobsGetPageRangesNextHeaders model. */ -@Fluent -public final class PageBlobsGetPageRangesNextHeaders { - /* - * The x-ms-version property. - */ - private String xMsVersion; - - /* - * The x-ms-blob-content-length property. - */ - private Long xMsBlobContentLength; - - /* - * The ETag property. - */ - private String eTag; - - /* - * The Last-Modified property. - */ - private DateTimeRfc1123 lastModified; - - /* - * The x-ms-request-id property. - */ - private String xMsRequestId; - - /* - * The x-ms-client-request-id property. - */ - private String xMsClientRequestId; - - /* - * The Date property. - */ - private DateTimeRfc1123 dateProperty; - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the PageBlobsGetPageRangesNextHeaders object itself. - */ - public PageBlobsGetPageRangesNextHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the xMsBlobContentLength property: The x-ms-blob-content-length property. - * - * @return the xMsBlobContentLength value. - */ - public Long getXMsBlobContentLength() { - return this.xMsBlobContentLength; - } - - /** - * Set the xMsBlobContentLength property: The x-ms-blob-content-length property. - * - * @param xMsBlobContentLength the xMsBlobContentLength value to set. - * @return the PageBlobsGetPageRangesNextHeaders object itself. - */ - public PageBlobsGetPageRangesNextHeaders setXMsBlobContentLength(Long xMsBlobContentLength) { - this.xMsBlobContentLength = xMsBlobContentLength; - return this; - } - - /** - * Get the eTag property: The ETag property. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the PageBlobsGetPageRangesNextHeaders object itself. - */ - public PageBlobsGetPageRangesNextHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the lastModified property: The Last-Modified property. - * - * @return the lastModified value. - */ - public OffsetDateTime getLastModified() { - if (this.lastModified == null) { - return null; - } - return this.lastModified.getDateTime(); - } - - /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the PageBlobsGetPageRangesNextHeaders object itself. - */ - public PageBlobsGetPageRangesNextHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the PageBlobsGetPageRangesNextHeaders object itself. - */ - public PageBlobsGetPageRangesNextHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the PageBlobsGetPageRangesNextHeaders object itself. - */ - public PageBlobsGetPageRangesNextHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the dateProperty property: The Date property. - * - * @return the dateProperty value. - */ - public OffsetDateTime getDateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); - } - - /** - * Set the dateProperty property: The Date property. - * - * @param dateProperty the dateProperty value to set. - * @return the PageBlobsGetPageRangesNextHeaders object itself. - */ - public PageBlobsGetPageRangesNextHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } -} 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 d5628ca6ac54e..af308fc4e192e 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,49 +14,49 @@ /** * The PageBlobsResizeHeaders model. */ -@Fluent +@Immutable public final class PageBlobsResizeHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* * The x-ms-blob-sequence-number property. */ @Generated - private Long xMsBlobSequenceNumber; + private final Long blobSequenceNumber; /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER = HttpHeaderName.fromString("x-ms-blob-sequence-number"); @@ -77,21 +77,21 @@ public PageBlobsResizeHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - String xMsBlobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); - if (xMsBlobSequenceNumber != null) { - this.xMsBlobSequenceNumber = Long.parseLong(xMsBlobSequenceNumber); + String blobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); + if (blobSequenceNumber != null) { + this.blobSequenceNumber = Long.parseLong(blobSequenceNumber); } else { - this.xMsBlobSequenceNumber = null; + this.blobSequenceNumber = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -104,18 +104,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the PageBlobsResizeHeaders object itself. - */ - @Generated - public PageBlobsResizeHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -130,135 +118,55 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the PageBlobsResizeHeaders object itself. - */ - @Generated - public PageBlobsResizeHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * - * @return the xMsBlobSequenceNumber value. - */ - @Generated - public Long getXMsBlobSequenceNumber() { - return this.xMsBlobSequenceNumber; - } - - /** - * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * - * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. - * @return the PageBlobsResizeHeaders object itself. - */ - @Generated - public PageBlobsResizeHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { - this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * Get the blobSequenceNumber property: The x-ms-blob-sequence-number property. * - * @return the xMsClientRequestId value. + * @return the blobSequenceNumber value. */ @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; + public Long getBlobSequenceNumber() { + return this.blobSequenceNumber; } /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the PageBlobsResizeHeaders object itself. - */ - @Generated - public PageBlobsResizeHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the PageBlobsResizeHeaders object itself. - */ - @Generated - public PageBlobsResizeHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the PageBlobsResizeHeaders object itself. + * @return the version value. */ @Generated - public PageBlobsResizeHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the PageBlobsResizeHeaders object itself. + * @return the clientRequestId value. */ @Generated - public PageBlobsResizeHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsSetSequenceNumberHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsSetSequenceNumberHeaders.java new file mode 100644 index 0000000000000..d02a349b613e5 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsSetSequenceNumberHeaders.java @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.util.DateTimeRfc1123; +import java.time.OffsetDateTime; + +/** + * The PageBlobsSetSequenceNumberHeaders model. + */ +@Immutable +public final class PageBlobsSetSequenceNumberHeaders { + /* + * The ETag property. + */ + @Generated + private final String eTag; + + /* + * The Last-Modified property. + */ + @Generated + private final DateTimeRfc1123 lastModified; + + /* + * The x-ms-blob-sequence-number property. + */ + @Generated + private final Long blobSequenceNumber; + + /* + * The Date property. + */ + @Generated + private final DateTimeRfc1123 date; + + /* + * The x-ms-version property. + */ + @Generated + private final String version; + + /* + * The x-ms-request-id property. + */ + @Generated + private final String requestId; + + /* + * The x-ms-client-request-id property. + */ + @Generated + private final String clientRequestId; + + private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER + = HttpHeaderName.fromString("x-ms-blob-sequence-number"); + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of PageBlobsSetSequenceNumberHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public PageBlobsSetSequenceNumberHeaders(HttpHeaders rawHeaders) { + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } else { + this.lastModified = null; + } + String blobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); + if (blobSequenceNumber != null) { + this.blobSequenceNumber = Long.parseLong(blobSequenceNumber); + } else { + this.blobSequenceNumber = null; + } + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } else { + this.date = null; + } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); + } + + /** + * Get the eTag property: The ETag property. + * + * @return the eTag value. + */ + @Generated + public String getETag() { + return this.eTag; + } + + /** + * Get the lastModified property: The Last-Modified property. + * + * @return the lastModified value. + */ + @Generated + public OffsetDateTime getLastModified() { + if (this.lastModified == null) { + return null; + } + return this.lastModified.getDateTime(); + } + + /** + * Get the blobSequenceNumber property: The x-ms-blob-sequence-number property. + * + * @return the blobSequenceNumber value. + */ + @Generated + public Long getBlobSequenceNumber() { + return this.blobSequenceNumber; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + @Generated + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); + } + + /** + * Get the version property: The x-ms-version property. + * + * @return the version value. + */ + @Generated + public String getVersion() { + return this.version; + } + + /** + * Get the requestId property: The x-ms-request-id property. + * + * @return the requestId value. + */ + @Generated + public String getRequestId() { + return this.requestId; + } + + /** + * Get the clientRequestId property: The x-ms-client-request-id property. + * + * @return the clientRequestId value. + */ + @Generated + public String getClientRequestId() { + return this.clientRequestId; + } +} 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 deleted file mode 100644 index b90c7c0682d01..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUpdateSequenceNumberHeaders.java +++ /dev/null @@ -1,264 +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.azure.core.annotation.Generated; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.util.DateTimeRfc1123; -import java.time.OffsetDateTime; - -/** - * The PageBlobsUpdateSequenceNumberHeaders model. - */ -@Fluent -public final class PageBlobsUpdateSequenceNumberHeaders { - /* - * The ETag property. - */ - @Generated - private String eTag; - - /* - * The Last-Modified property. - */ - @Generated - private DateTimeRfc1123 lastModified; - - /* - * The x-ms-blob-sequence-number property. - */ - @Generated - private Long xMsBlobSequenceNumber; - - /* - * The x-ms-client-request-id property. - */ - @Generated - private String xMsClientRequestId; - - /* - * The x-ms-request-id property. - */ - @Generated - private String xMsRequestId; - - /* - * The x-ms-version property. - */ - @Generated - private String xMsVersion; - - /* - * The Date property. - */ - @Generated - private DateTimeRfc1123 date; - - private static final HttpHeaderName X_MS_BLOB_SEQUENCE_NUMBER - = HttpHeaderName.fromString("x-ms-blob-sequence-number"); - - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - - // 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) { - this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); - String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); - if (lastModified != null) { - this.lastModified = new DateTimeRfc1123(lastModified); - } else { - this.lastModified = null; - } - String xMsBlobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); - if (xMsBlobSequenceNumber != null) { - this.xMsBlobSequenceNumber = Long.parseLong(xMsBlobSequenceNumber); - } else { - this.xMsBlobSequenceNumber = null; - } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - String date = rawHeaders.getValue(HttpHeaderName.DATE); - if (date != null) { - this.date = new DateTimeRfc1123(date); - } else { - this.date = null; - } - } - - /** - * Get the eTag property: The ETag property. - * - * @return the eTag value. - */ - @Generated - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the PageBlobsUpdateSequenceNumberHeaders object itself. - */ - @Generated - public PageBlobsUpdateSequenceNumberHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the lastModified property: The Last-Modified property. - * - * @return the lastModified value. - */ - @Generated - public OffsetDateTime getLastModified() { - if (this.lastModified == null) { - return null; - } - return this.lastModified.getDateTime(); - } - - /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the PageBlobsUpdateSequenceNumberHeaders object itself. - */ - @Generated - public PageBlobsUpdateSequenceNumberHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * - * @return the xMsBlobSequenceNumber value. - */ - @Generated - public Long getXMsBlobSequenceNumber() { - return this.xMsBlobSequenceNumber; - } - - /** - * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * - * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. - * @return the PageBlobsUpdateSequenceNumberHeaders object itself. - */ - @Generated - public PageBlobsUpdateSequenceNumberHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { - this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the PageBlobsUpdateSequenceNumberHeaders object itself. - */ - @Generated - public PageBlobsUpdateSequenceNumberHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the PageBlobsUpdateSequenceNumberHeaders object itself. - */ - @Generated - public PageBlobsUpdateSequenceNumberHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the PageBlobsUpdateSequenceNumberHeaders object itself. - */ - @Generated - public PageBlobsUpdateSequenceNumberHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the date property: The Date property. - * - * @return the date value. - */ - @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); - } - - /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the PageBlobsUpdateSequenceNumberHeaders object itself. - */ - @Generated - public PageBlobsUpdateSequenceNumberHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } -} 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 deleted file mode 100644 index d2c245cedc0b7..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesFromURLHeaders.java +++ /dev/null @@ -1,407 +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.azure.core.annotation.Generated; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.DateTimeRfc1123; -import java.time.OffsetDateTime; -import java.util.Base64; - -/** - * The PageBlobsUploadPagesFromURLHeaders model. - */ -@Fluent -public final class PageBlobsUploadPagesFromURLHeaders { - /* - * The ETag property. - */ - @Generated - private String eTag; - - /* - * The Last-Modified property. - */ - @Generated - private DateTimeRfc1123 lastModified; - - /* - * The Content-MD5 property. - */ - @Generated - private byte[] contentMD5; - - /* - * The x-ms-content-crc64 property. - */ - @Generated - private byte[] xMsContentCrc64; - - /* - * The x-ms-blob-sequence-number property. - */ - @Generated - private Long xMsBlobSequenceNumber; - - /* - * The x-ms-request-id property. - */ - @Generated - private String xMsRequestId; - - /* - * The x-ms-version property. - */ - @Generated - private String xMsVersion; - - /* - * The Date property. - */ - @Generated - private DateTimeRfc1123 date; - - /* - * The x-ms-request-server-encrypted property. - */ - @Generated - private Boolean xMsRequestServerEncrypted; - - /* - * The x-ms-encryption-key-sha256 property. - */ - @Generated - private String xMsEncryptionKeySha256; - - /* - * The x-ms-encryption-scope property. - */ - @Generated - private String xMsEncryptionScope; - - 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_VERSION = HttpHeaderName.fromString("x-ms-version"); - - private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED - = HttpHeaderName.fromString("x-ms-request-server-encrypted"); - - private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 - = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); - - 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) { - this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); - String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); - if (lastModified != null) { - this.lastModified = new DateTimeRfc1123(lastModified); - } else { - this.lastModified = null; - } - String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); - if (contentMD5 != null) { - this.contentMD5 = Base64.getDecoder().decode(contentMD5); - } else { - this.contentMD5 = null; - } - String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); - if (xMsContentCrc64 != null) { - this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); - } else { - this.xMsContentCrc64 = null; - } - String xMsBlobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); - if (xMsBlobSequenceNumber != null) { - this.xMsBlobSequenceNumber = Long.parseLong(xMsBlobSequenceNumber); - } else { - this.xMsBlobSequenceNumber = null; - } - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - String date = rawHeaders.getValue(HttpHeaderName.DATE); - if (date != null) { - this.date = new DateTimeRfc1123(date); - } else { - this.date = null; - } - String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); - if (xMsRequestServerEncrypted != null) { - this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); - } else { - this.xMsRequestServerEncrypted = null; - } - this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); - } - - /** - * Get the eTag property: The ETag property. - * - * @return the eTag value. - */ - @Generated - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the PageBlobsUploadPagesFromURLHeaders object itself. - */ - @Generated - public PageBlobsUploadPagesFromURLHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the lastModified property: The Last-Modified property. - * - * @return the lastModified value. - */ - @Generated - public OffsetDateTime getLastModified() { - if (this.lastModified == null) { - return null; - } - return this.lastModified.getDateTime(); - } - - /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the PageBlobsUploadPagesFromURLHeaders object itself. - */ - @Generated - public PageBlobsUploadPagesFromURLHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the contentMD5 property: The Content-MD5 property. - * - * @return the contentMD5 value. - */ - @Generated - public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); - } - - /** - * Set the contentMD5 property: The Content-MD5 property. - * - * @param contentMD5 the contentMD5 value to set. - * @return the PageBlobsUploadPagesFromURLHeaders object itself. - */ - @Generated - public PageBlobsUploadPagesFromURLHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); - return this; - } - - /** - * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @return the xMsContentCrc64 value. - */ - @Generated - public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); - } - - /** - * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @param xMsContentCrc64 the xMsContentCrc64 value to set. - * @return the PageBlobsUploadPagesFromURLHeaders object itself. - */ - @Generated - public PageBlobsUploadPagesFromURLHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); - return this; - } - - /** - * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * - * @return the xMsBlobSequenceNumber value. - */ - @Generated - public Long getXMsBlobSequenceNumber() { - return this.xMsBlobSequenceNumber; - } - - /** - * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * - * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. - * @return the PageBlobsUploadPagesFromURLHeaders object itself. - */ - @Generated - public PageBlobsUploadPagesFromURLHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { - this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the PageBlobsUploadPagesFromURLHeaders object itself. - */ - @Generated - public PageBlobsUploadPagesFromURLHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the PageBlobsUploadPagesFromURLHeaders object itself. - */ - @Generated - public PageBlobsUploadPagesFromURLHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the date property: The Date property. - * - * @return the date value. - */ - @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); - } - - /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the PageBlobsUploadPagesFromURLHeaders object itself. - */ - @Generated - public PageBlobsUploadPagesFromURLHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @return the xMsRequestServerEncrypted value. - */ - @Generated - public Boolean isXMsRequestServerEncrypted() { - return this.xMsRequestServerEncrypted; - } - - /** - * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. - * @return the PageBlobsUploadPagesFromURLHeaders object itself. - */ - @Generated - public PageBlobsUploadPagesFromURLHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { - this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; - return this; - } - - /** - * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @return the xMsEncryptionKeySha256 value. - */ - @Generated - public String getXMsEncryptionKeySha256() { - return this.xMsEncryptionKeySha256; - } - - /** - * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. - * @return the PageBlobsUploadPagesFromURLHeaders object itself. - */ - @Generated - public PageBlobsUploadPagesFromURLHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { - this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; - return this; - } - - /** - * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * - * @return the xMsEncryptionScope value. - */ - @Generated - public String getXMsEncryptionScope() { - return this.xMsEncryptionScope; - } - - /** - * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. - * - * @param xMsEncryptionScope the xMsEncryptionScope value to set. - * @return the PageBlobsUploadPagesFromURLHeaders object itself. - */ - @Generated - public PageBlobsUploadPagesFromURLHeaders setXMsEncryptionScope(String xMsEncryptionScope) { - this.xMsEncryptionScope = xMsEncryptionScope; - return this; - } -} 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 new file mode 100644 index 0000000000000..aff9657f83722 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesFromUrlHeaders.java @@ -0,0 +1,284 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.DateTimeRfc1123; +import java.time.OffsetDateTime; +import java.util.Base64; + +/** + * The PageBlobsUploadPagesFromUrlHeaders model. + */ +@Immutable +public final class PageBlobsUploadPagesFromUrlHeaders { + /* + * The ETag property. + */ + @Generated + private final String eTag; + + /* + * The Last-Modified property. + */ + @Generated + private final DateTimeRfc1123 lastModified; + + /* + * The Content-MD5 property. + */ + @Generated + private final byte[] contentMd5; + + /* + * The x-ms-content-crc64 property. + */ + @Generated + private final byte[] contentCrc64; + + /* + * The x-ms-blob-sequence-number property. + */ + @Generated + private final Long blobSequenceNumber; + + /* + * The x-ms-request-server-encrypted property. + */ + @Generated + private final Boolean isServerEncrypted; + + /* + * The x-ms-encryption-key-sha256 property. + */ + @Generated + private final String encryptionKeySha256; + + /* + * The x-ms-encryption-scope property. + */ + @Generated + private final String encryptionScope; + + /* + * The Date property. + */ + @Generated + private final DateTimeRfc1123 date; + + /* + * The x-ms-version property. + */ + @Generated + private final String version; + + /* + * The x-ms-request-id property. + */ + @Generated + private final String requestId; + + /* + * The x-ms-client-request-id property. + */ + @Generated + private final String clientRequestId; + + 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_REQUEST_SERVER_ENCRYPTED + = HttpHeaderName.fromString("x-ms-request-server-encrypted"); + + private static final HttpHeaderName X_MS_ENCRYPTION_KEY_SHA256 + = HttpHeaderName.fromString("x-ms-encryption-key-sha256"); + + private static final HttpHeaderName X_MS_ENCRYPTION_SCOPE = HttpHeaderName.fromString("x-ms-encryption-scope"); + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + // 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) { + this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG); + String lastModified = rawHeaders.getValue(HttpHeaderName.LAST_MODIFIED); + if (lastModified != null) { + this.lastModified = new DateTimeRfc1123(lastModified); + } else { + this.lastModified = null; + } + String contentMd5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMd5 != null) { + this.contentMd5 = Base64.getDecoder().decode(contentMd5); + } else { + this.contentMd5 = null; + } + String contentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (contentCrc64 != null) { + this.contentCrc64 = Base64.getDecoder().decode(contentCrc64); + } else { + this.contentCrc64 = null; + } + String blobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); + if (blobSequenceNumber != null) { + this.blobSequenceNumber = Long.parseLong(blobSequenceNumber); + } else { + this.blobSequenceNumber = null; + } + String isServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (isServerEncrypted != null) { + this.isServerEncrypted = Boolean.parseBoolean(isServerEncrypted); + } else { + this.isServerEncrypted = null; + } + this.encryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.encryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } else { + this.date = null; + } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); + } + + /** + * Get the eTag property: The ETag property. + * + * @return the eTag value. + */ + @Generated + public String getETag() { + return this.eTag; + } + + /** + * Get the lastModified property: The Last-Modified property. + * + * @return the lastModified value. + */ + @Generated + public OffsetDateTime getLastModified() { + if (this.lastModified == null) { + return null; + } + return this.lastModified.getDateTime(); + } + + /** + * Get the contentMd5 property: The Content-MD5 property. + * + * @return the contentMd5 value. + */ + @Generated + public byte[] getContentMd5() { + return CoreUtils.clone(this.contentMd5); + } + + /** + * Get the contentCrc64 property: The x-ms-content-crc64 property. + * + * @return the contentCrc64 value. + */ + @Generated + public byte[] getContentCrc64() { + return CoreUtils.clone(this.contentCrc64); + } + + /** + * Get the blobSequenceNumber property: The x-ms-blob-sequence-number property. + * + * @return the blobSequenceNumber value. + */ + @Generated + public Long getBlobSequenceNumber() { + return this.blobSequenceNumber; + } + + /** + * Get the isServerEncrypted property: The x-ms-request-server-encrypted property. + * + * @return the isServerEncrypted value. + */ + @Generated + public Boolean isServerEncrypted() { + return this.isServerEncrypted; + } + + /** + * Get the encryptionKeySha256 property: The x-ms-encryption-key-sha256 property. + * + * @return the encryptionKeySha256 value. + */ + @Generated + public String getEncryptionKeySha256() { + return this.encryptionKeySha256; + } + + /** + * Get the encryptionScope property: The x-ms-encryption-scope property. + * + * @return the encryptionScope value. + */ + @Generated + public String getEncryptionScope() { + return this.encryptionScope; + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + @Generated + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); + } + + /** + * Get the version property: The x-ms-version property. + * + * @return the version value. + */ + @Generated + public String getVersion() { + return this.version; + } + + /** + * Get the requestId property: The x-ms-request-id property. + * + * @return the requestId value. + */ + @Generated + public String getRequestId() { + return this.requestId; + } + + /** + * Get the clientRequestId property: The x-ms-client-request-id property. + * + * @return the clientRequestId value. + */ + @Generated + public String getClientRequestId() { + return this.clientRequestId; + } +} 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 814030426b8a9..9d97cd63175f3 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.CoreUtils; @@ -16,93 +16,91 @@ /** * The PageBlobsUploadPagesHeaders model. */ -@Fluent +@Immutable public final class PageBlobsUploadPagesHeaders { /* * The ETag property. */ @Generated - private String eTag; + private final String eTag; /* * The Last-Modified property. */ @Generated - private DateTimeRfc1123 lastModified; + private final DateTimeRfc1123 lastModified; /* * The Content-MD5 property. */ @Generated - private byte[] contentMD5; + private final byte[] contentMd5; /* * The x-ms-content-crc64 property. */ @Generated - private byte[] xMsContentCrc64; + private final byte[] contentCrc64; /* * The x-ms-blob-sequence-number property. */ @Generated - private Long xMsBlobSequenceNumber; + private final Long blobSequenceNumber; /* - * The x-ms-client-request-id property. + * The x-ms-request-server-encrypted property. */ @Generated - private String xMsClientRequestId; + private final Boolean isServerEncrypted; /* - * The x-ms-request-id property. + * The x-ms-encryption-key-sha256 property. */ @Generated - private String xMsRequestId; + private final String encryptionKeySha256; /* - * The x-ms-version property. + * The x-ms-encryption-scope property. */ @Generated - private String xMsVersion; + private final String encryptionScope; /* - * The Date property. + * The x-ms-structured-body property. */ @Generated - private DateTimeRfc1123 date; + private final String structuredBodyType; /* - * The x-ms-request-server-encrypted property. + * The Date property. */ @Generated - private Boolean xMsRequestServerEncrypted; + private final DateTimeRfc1123 date; /* - * The x-ms-encryption-key-sha256 property. + * The x-ms-version property. */ @Generated - private String xMsEncryptionKeySha256; + private final String version; /* - * The x-ms-encryption-scope property. + * The x-ms-request-id property. */ @Generated - private String xMsEncryptionScope; + private final String requestId; /* - * The x-ms-structured-body property. + * The x-ms-client-request-id property. */ @Generated - private String xMsStructuredBody; + private final String clientRequestId; 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_VERSION = HttpHeaderName.fromString("x-ms-version"); - private static final HttpHeaderName X_MS_REQUEST_SERVER_ENCRYPTED = HttpHeaderName.fromString("x-ms-request-server-encrypted"); @@ -113,6 +111,8 @@ public final class PageBlobsUploadPagesHeaders { private static final HttpHeaderName X_MS_STRUCTURED_BODY = HttpHeaderName.fromString("x-ms-structured-body"); + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + // HttpHeaders containing the raw property values. /** * Creates an instance of PageBlobsUploadPagesHeaders class. @@ -127,42 +127,42 @@ public PageBlobsUploadPagesHeaders(HttpHeaders rawHeaders) { } else { this.lastModified = null; } - String contentMD5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); - if (contentMD5 != null) { - this.contentMD5 = Base64.getDecoder().decode(contentMD5); + String contentMd5 = rawHeaders.getValue(HttpHeaderName.CONTENT_MD5); + if (contentMd5 != null) { + this.contentMd5 = Base64.getDecoder().decode(contentMd5); + } else { + this.contentMd5 = null; + } + String contentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); + if (contentCrc64 != null) { + this.contentCrc64 = Base64.getDecoder().decode(contentCrc64); } else { - this.contentMD5 = null; + this.contentCrc64 = null; } - String xMsContentCrc64 = rawHeaders.getValue(X_MS_CONTENT_CRC64); - if (xMsContentCrc64 != null) { - this.xMsContentCrc64 = Base64.getDecoder().decode(xMsContentCrc64); + String blobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); + if (blobSequenceNumber != null) { + this.blobSequenceNumber = Long.parseLong(blobSequenceNumber); } else { - this.xMsContentCrc64 = null; + this.blobSequenceNumber = null; } - String xMsBlobSequenceNumber = rawHeaders.getValue(X_MS_BLOB_SEQUENCE_NUMBER); - if (xMsBlobSequenceNumber != null) { - this.xMsBlobSequenceNumber = Long.parseLong(xMsBlobSequenceNumber); + String isServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); + if (isServerEncrypted != null) { + this.isServerEncrypted = Boolean.parseBoolean(isServerEncrypted); } else { - this.xMsBlobSequenceNumber = null; + this.isServerEncrypted = null; } - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); + this.encryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); + this.encryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); + this.structuredBodyType = rawHeaders.getValue(X_MS_STRUCTURED_BODY); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } - String xMsRequestServerEncrypted = rawHeaders.getValue(X_MS_REQUEST_SERVER_ENCRYPTED); - if (xMsRequestServerEncrypted != null) { - this.xMsRequestServerEncrypted = Boolean.parseBoolean(xMsRequestServerEncrypted); - } else { - this.xMsRequestServerEncrypted = null; - } - this.xMsEncryptionKeySha256 = rawHeaders.getValue(X_MS_ENCRYPTION_KEY_SHA256); - this.xMsEncryptionScope = rawHeaders.getValue(X_MS_ENCRYPTION_SCOPE); - this.xMsStructuredBody = rawHeaders.getValue(X_MS_STRUCTURED_BODY); + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** @@ -175,18 +175,6 @@ public String getETag() { return this.eTag; } - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the PageBlobsUploadPagesHeaders object itself. - */ - @Generated - public PageBlobsUploadPagesHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - /** * Get the lastModified property: The Last-Modified property. * @@ -201,151 +189,73 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. - * - * @param lastModified the lastModified value to set. - * @return the PageBlobsUploadPagesHeaders object itself. - */ - @Generated - public PageBlobsUploadPagesHeaders setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } - return this; - } - - /** - * Get the contentMD5 property: The Content-MD5 property. - * - * @return the contentMD5 value. - */ - @Generated - public byte[] getContentMD5() { - return CoreUtils.clone(this.contentMD5); - } - - /** - * Set the contentMD5 property: The Content-MD5 property. - * - * @param contentMD5 the contentMD5 value to set. - * @return the PageBlobsUploadPagesHeaders object itself. - */ - @Generated - public PageBlobsUploadPagesHeaders setContentMD5(byte[] contentMD5) { - this.contentMD5 = CoreUtils.clone(contentMD5); - return this; - } - - /** - * Get the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @return the xMsContentCrc64 value. - */ - @Generated - public byte[] getXMsContentCrc64() { - return CoreUtils.clone(this.xMsContentCrc64); - } - - /** - * Set the xMsContentCrc64 property: The x-ms-content-crc64 property. - * - * @param xMsContentCrc64 the xMsContentCrc64 value to set. - * @return the PageBlobsUploadPagesHeaders object itself. - */ - @Generated - public PageBlobsUploadPagesHeaders setXMsContentCrc64(byte[] xMsContentCrc64) { - this.xMsContentCrc64 = CoreUtils.clone(xMsContentCrc64); - return this; - } - - /** - * Get the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. - * - * @return the xMsBlobSequenceNumber value. - */ - @Generated - public Long getXMsBlobSequenceNumber() { - return this.xMsBlobSequenceNumber; - } - - /** - * Set the xMsBlobSequenceNumber property: The x-ms-blob-sequence-number property. + * Get the contentMd5 property: The Content-MD5 property. * - * @param xMsBlobSequenceNumber the xMsBlobSequenceNumber value to set. - * @return the PageBlobsUploadPagesHeaders object itself. + * @return the contentMd5 value. */ @Generated - public PageBlobsUploadPagesHeaders setXMsBlobSequenceNumber(Long xMsBlobSequenceNumber) { - this.xMsBlobSequenceNumber = xMsBlobSequenceNumber; - return this; + public byte[] getContentMd5() { + return CoreUtils.clone(this.contentMd5); } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * Get the contentCrc64 property: The x-ms-content-crc64 property. * - * @return the xMsClientRequestId value. + * @return the contentCrc64 value. */ @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; + public byte[] getContentCrc64() { + return CoreUtils.clone(this.contentCrc64); } /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * Get the blobSequenceNumber property: The x-ms-blob-sequence-number property. * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the PageBlobsUploadPagesHeaders object itself. + * @return the blobSequenceNumber value. */ @Generated - public PageBlobsUploadPagesHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; + public Long getBlobSequenceNumber() { + return this.blobSequenceNumber; } /** - * Get the xMsRequestId property: The x-ms-request-id property. + * Get the isServerEncrypted property: The x-ms-request-server-encrypted property. * - * @return the xMsRequestId value. + * @return the isServerEncrypted value. */ @Generated - public String getXMsRequestId() { - return this.xMsRequestId; + public Boolean isServerEncrypted() { + return this.isServerEncrypted; } /** - * Set the xMsRequestId property: The x-ms-request-id property. + * Get the encryptionKeySha256 property: The x-ms-encryption-key-sha256 property. * - * @param xMsRequestId the xMsRequestId value to set. - * @return the PageBlobsUploadPagesHeaders object itself. + * @return the encryptionKeySha256 value. */ @Generated - public PageBlobsUploadPagesHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; + public String getEncryptionKeySha256() { + return this.encryptionKeySha256; } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the encryptionScope property: The x-ms-encryption-scope property. * - * @return the xMsVersion value. + * @return the encryptionScope value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public String getEncryptionScope() { + return this.encryptionScope; } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the structuredBodyType property: The x-ms-structured-body property. * - * @param xMsVersion the xMsVersion value to set. - * @return the PageBlobsUploadPagesHeaders object itself. + * @return the structuredBodyType value. */ @Generated - public PageBlobsUploadPagesHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getStructuredBodyType() { + return this.structuredBodyType; } /** @@ -362,106 +272,32 @@ public OffsetDateTime getDate() { } /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the PageBlobsUploadPagesHeaders object itself. - */ - @Generated - public PageBlobsUploadPagesHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @return the xMsRequestServerEncrypted value. - */ - @Generated - public Boolean isXMsRequestServerEncrypted() { - return this.xMsRequestServerEncrypted; - } - - /** - * Set the xMsRequestServerEncrypted property: The x-ms-request-server-encrypted property. - * - * @param xMsRequestServerEncrypted the xMsRequestServerEncrypted value to set. - * @return the PageBlobsUploadPagesHeaders object itself. - */ - @Generated - public PageBlobsUploadPagesHeaders setXMsRequestServerEncrypted(Boolean xMsRequestServerEncrypted) { - this.xMsRequestServerEncrypted = xMsRequestServerEncrypted; - return this; - } - - /** - * Get the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @return the xMsEncryptionKeySha256 value. - */ - @Generated - public String getXMsEncryptionKeySha256() { - return this.xMsEncryptionKeySha256; - } - - /** - * Set the xMsEncryptionKeySha256 property: The x-ms-encryption-key-sha256 property. - * - * @param xMsEncryptionKeySha256 the xMsEncryptionKeySha256 value to set. - * @return the PageBlobsUploadPagesHeaders object itself. - */ - @Generated - public PageBlobsUploadPagesHeaders setXMsEncryptionKeySha256(String xMsEncryptionKeySha256) { - this.xMsEncryptionKeySha256 = xMsEncryptionKeySha256; - return this; - } - - /** - * Get the xMsEncryptionScope property: The x-ms-encryption-scope property. - * - * @return the xMsEncryptionScope value. - */ - @Generated - public String getXMsEncryptionScope() { - return this.xMsEncryptionScope; - } - - /** - * Set the xMsEncryptionScope property: The x-ms-encryption-scope property. + * Get the version property: The x-ms-version property. * - * @param xMsEncryptionScope the xMsEncryptionScope value to set. - * @return the PageBlobsUploadPagesHeaders object itself. + * @return the version value. */ @Generated - public PageBlobsUploadPagesHeaders setXMsEncryptionScope(String xMsEncryptionScope) { - this.xMsEncryptionScope = xMsEncryptionScope; - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsStructuredBody property: The x-ms-structured-body property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsStructuredBody value. + * @return the requestId value. */ @Generated - public String getXMsStructuredBody() { - return this.xMsStructuredBody; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsStructuredBody property: The x-ms-structured-body property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsStructuredBody the xMsStructuredBody value to set. - * @return the PageBlobsUploadPagesHeaders object itself. + * @return the clientRequestId value. */ @Generated - public PageBlobsUploadPagesHeaders setXMsStructuredBody(String xMsStructuredBody) { - this.xMsStructuredBody = xMsStructuredBody; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 deleted file mode 100644 index 58b8e92c0a551..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListCollection.java +++ /dev/null @@ -1,137 +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.azure.core.util.CoreUtils; -import com.azure.storage.blob.models.PageRange; -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. */ -@Fluent -public final class PageListCollection implements XmlSerializable { - /* - * The value property. - */ - private List value = new ArrayList<>(); - - /* - * The nextMarker property. - */ - private String nextMarker; - - /** - * Get the value property: The value property. - * - * @return the value value. - */ - public List getValue() { - return this.value; - } - - /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the PageListCollection object itself. - */ - public PageListCollection setValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextMarker property: The nextMarker property. - * - * @return the nextMarker value. - */ - public String getNextMarker() { - return this.nextMarker; - } - - /** - * Set the nextMarker property: The nextMarker property. - * - * @param nextMarker the nextMarker value to set. - * @return the PageListCollection object itself. - */ - 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 deleted file mode 100644 index 2f8ff9e6ae820..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageListSegment.java +++ /dev/null @@ -1,171 +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.azure.core.util.CoreUtils; -import com.azure.storage.blob.models.ClearRange; -import com.azure.storage.blob.models.PageRange; -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. */ -@Fluent -public final class PageListSegment implements XmlSerializable { - /* - * The PageRanges property. - */ - private List pageRanges = new ArrayList<>(); - - /* - * The ClearRanges property. - */ - private List clearRanges = new ArrayList<>(); - - /* - * The NextMarker property. - */ - private String nextMarker; - - /** - * Get the pageRanges property: The PageRanges property. - * - * @return the pageRanges value. - */ - public List getPageRanges() { - return this.pageRanges; - } - - /** - * Set the pageRanges property: The PageRanges property. - * - * @param pageRanges the pageRanges value to set. - * @return the PageListSegment object itself. - */ - public PageListSegment setPageRanges(List pageRanges) { - this.pageRanges = pageRanges; - return this; - } - - /** - * Get the clearRanges property: The ClearRanges property. - * - * @return the clearRanges value. - */ - public List getClearRanges() { - return this.clearRanges; - } - - /** - * Set the clearRanges property: The ClearRanges property. - * - * @param clearRanges the clearRanges value to set. - * @return the PageListSegment object itself. - */ - public PageListSegment setClearRanges(List clearRanges) { - this.clearRanges = clearRanges; - return this; - } - - /** - * Get the nextMarker property: The NextMarker property. - * - * @return the nextMarker value. - */ - public String getNextMarker() { - return this.nextMarker; - } - - /** - * Set the nextMarker property: The NextMarker property. - * - * @param nextMarker the nextMarker value to set. - * @return the PageListSegment object itself. - */ - 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/implementation/models/ParquetTextConfiguration.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ParquetTextConfiguration.java new file mode 100644 index 0000000000000..f6c534562f63e --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ParquetTextConfiguration.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlToken; +import com.azure.xml.XmlWriter; +import javax.xml.stream.XMLStreamException; + +/** + * Preserves the empty Parquet XML configuration used by the C++ client. + */ +@Immutable +public final class ParquetTextConfiguration implements XmlSerializable { + /** + * Creates an instance of ParquetTextConfiguration class. + */ + @Generated + public ParquetTextConfiguration() { + } + + @Generated + @Override + public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { + return toXml(xmlWriter, null); + } + + @Generated + @Override + public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { + rootElementName + = rootElementName == null || rootElementName.isEmpty() ? "StorageCppParquetConfiguration" : rootElementName; + xmlWriter.writeStartElement(rootElementName); + return xmlWriter.writeEndElement(); + } + + /** + * Reads an instance of ParquetTextConfiguration from the XmlReader. + * + * @param xmlReader The XmlReader being read. + * @return An instance of ParquetTextConfiguration 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 ParquetTextConfiguration. + */ + @Generated + public static ParquetTextConfiguration fromXml(XmlReader xmlReader) throws XMLStreamException { + return fromXml(xmlReader, null); + } + + /** + * Reads an instance of ParquetTextConfiguration 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 ParquetTextConfiguration 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 ParquetTextConfiguration. + */ + @Generated + public static ParquetTextConfiguration fromXml(XmlReader xmlReader, String rootElementName) + throws XMLStreamException { + String finalRootElementName + = rootElementName == null || rootElementName.isEmpty() ? "StorageCppParquetConfiguration" : rootElementName; + return xmlReader.readObject(finalRootElementName, reader -> { + ParquetTextConfiguration deserializedParquetTextConfiguration = new ParquetTextConfiguration(); + while (reader.nextElement() != XmlToken.END_ELEMENT) { + reader.skipElement(); + } + + return deserializedParquetTextConfiguration; + }); + } +} 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 f7b9846cd6757..b3d90359b84a1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; @@ -9,71 +9,71 @@ import java.util.Collection; /** - * Defines values for PremiumPageBlobAccessTier. + * The premium page blob access tier types. */ public final class PremiumPageBlobAccessTier extends ExpandableStringEnum { /** - * Static value P4 for PremiumPageBlobAccessTier. + * The premium page blob access tier is P4. */ @Generated public static final PremiumPageBlobAccessTier P4 = fromString("P4"); /** - * Static value P6 for PremiumPageBlobAccessTier. + * The premium page blob access tier is P6. */ @Generated public static final PremiumPageBlobAccessTier P6 = fromString("P6"); /** - * Static value P10 for PremiumPageBlobAccessTier. + * The premium page blob access tier is P10. */ @Generated public static final PremiumPageBlobAccessTier P10 = fromString("P10"); /** - * Static value P15 for PremiumPageBlobAccessTier. + * The premium page blob access tier is P15. */ @Generated public static final PremiumPageBlobAccessTier P15 = fromString("P15"); /** - * Static value P20 for PremiumPageBlobAccessTier. + * The premium page blob access tier is P20. */ @Generated public static final PremiumPageBlobAccessTier P20 = fromString("P20"); /** - * Static value P30 for PremiumPageBlobAccessTier. + * The premium page blob access tier is P30. */ @Generated public static final PremiumPageBlobAccessTier P30 = fromString("P30"); /** - * Static value P40 for PremiumPageBlobAccessTier. + * The premium page blob access tier is P40. */ @Generated public static final PremiumPageBlobAccessTier P40 = fromString("P40"); /** - * Static value P50 for PremiumPageBlobAccessTier. + * The premium page blob access tier is P50. */ @Generated public static final PremiumPageBlobAccessTier P50 = fromString("P50"); /** - * Static value P60 for PremiumPageBlobAccessTier. + * The premium page blob access tier is P60. */ @Generated public static final PremiumPageBlobAccessTier P60 = fromString("P60"); /** - * Static value P70 for PremiumPageBlobAccessTier. + * The premium page blob access tier is P70. */ @Generated public static final PremiumPageBlobAccessTier P70 = fromString("P70"); /** - * Static value P80 for PremiumPageBlobAccessTier. + * The premium page blob access tier is P80. */ @Generated public static final PremiumPageBlobAccessTier P80 = fromString("P80"); 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 d659fdc3bf6c5..c3f9067a4caa9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; @@ -14,49 +14,52 @@ import javax.xml.stream.XMLStreamException; /** - * The QueryFormat model. + * The query format settings. */ @Fluent public final class QueryFormat implements XmlSerializable { /* - * The quick query format type. + * The query type. */ @Generated - private QueryFormatType type; + private final QueryFormatType type; /* - * Groups the settings used for interpreting the blob data if the blob is delimited text formatted. + * The delimited text configuration. */ @Generated private DelimitedTextConfiguration delimitedTextConfiguration; /* - * json text configuration + * The JSON text configuration. */ @Generated - private JsonTextConfiguration jsonTextConfiguration; + private JsonTextConfigurationInternal jsonTextConfiguration; /* - * Groups the settings used for formatting the response if the response should be Arrow formatted. + * The Apache Arrow configuration. */ @Generated - private ArrowConfiguration arrowConfiguration; + private ArrowTextConfigurationInternal arrowConfiguration; /* - * parquet configuration + * The Parquet configuration. */ @Generated - private Object parquetTextConfiguration; + private ParquetTextConfiguration parquetTextConfiguration; /** * Creates an instance of QueryFormat class. + * + * @param type the type value to set. */ @Generated - public QueryFormat() { + public QueryFormat(QueryFormatType type) { + this.type = type; } /** - * Get the type property: The quick query format type. + * Get the type property: The query type. * * @return the type value. */ @@ -66,20 +69,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. - */ - @Generated - public QueryFormat setType(QueryFormatType type) { - this.type = type; - return this; - } - - /** - * Get the delimitedTextConfiguration property: Groups the settings used for interpreting the blob data if the blob - * is delimited text formatted. + * Get the delimitedTextConfiguration property: The delimited text configuration. * * @return the delimitedTextConfiguration value. */ @@ -89,8 +79,7 @@ public DelimitedTextConfiguration getDelimitedTextConfiguration() { } /** - * Set the delimitedTextConfiguration property: Groups the settings used for interpreting the blob data if the blob - * is delimited text formatted. + * Set the delimitedTextConfiguration property: The delimited text configuration. * * @param delimitedTextConfiguration the delimitedTextConfiguration value to set. * @return the QueryFormat object itself. @@ -102,69 +91,67 @@ public QueryFormat setDelimitedTextConfiguration(DelimitedTextConfiguration deli } /** - * Get the jsonTextConfiguration property: json text configuration. + * Get the jsonTextConfiguration property: The JSON text configuration. * * @return the jsonTextConfiguration value. */ @Generated - public JsonTextConfiguration getJsonTextConfiguration() { + public JsonTextConfigurationInternal getJsonTextConfiguration() { return this.jsonTextConfiguration; } /** - * Set the jsonTextConfiguration property: json text configuration. + * Set the jsonTextConfiguration property: The JSON text configuration. * * @param jsonTextConfiguration the jsonTextConfiguration value to set. * @return the QueryFormat object itself. */ @Generated - public QueryFormat setJsonTextConfiguration(JsonTextConfiguration jsonTextConfiguration) { + public QueryFormat setJsonTextConfiguration(JsonTextConfigurationInternal jsonTextConfiguration) { this.jsonTextConfiguration = jsonTextConfiguration; return this; } /** - * Get the arrowConfiguration property: Groups the settings used for formatting the response if the response should - * be Arrow formatted. + * Get the arrowConfiguration property: The Apache Arrow configuration. * * @return the arrowConfiguration value. */ @Generated - public ArrowConfiguration getArrowConfiguration() { + public ArrowTextConfigurationInternal getArrowConfiguration() { return this.arrowConfiguration; } /** - * Set the arrowConfiguration property: Groups the settings used for formatting the response if the response should - * be Arrow formatted. + * Set the arrowConfiguration property: The Apache Arrow configuration. * * @param arrowConfiguration the arrowConfiguration value to set. * @return the QueryFormat object itself. */ @Generated - public QueryFormat setArrowConfiguration(ArrowConfiguration arrowConfiguration) { + public QueryFormat setArrowConfiguration(ArrowTextConfigurationInternal arrowConfiguration) { this.arrowConfiguration = arrowConfiguration; return this; } /** - * Get the parquetTextConfiguration property: parquet configuration. + * Get the parquetTextConfiguration property: The Parquet configuration. * * @return the parquetTextConfiguration value. */ @Generated - public Object getParquetTextConfiguration() { + public ParquetTextConfiguration getParquetTextConfiguration() { return this.parquetTextConfiguration; } /** - * Set the parquetTextConfiguration property: parquet configuration. + * Set the parquetTextConfiguration property: The Parquet configuration. * * @param parquetTextConfiguration the parquetTextConfiguration value to set. * @return the QueryFormat object itself. */ @Generated - public QueryFormat setParquetTextConfiguration(Object parquetTextConfiguration) { + public QueryFormat setParquetTextConfiguration(ParquetTextConfiguration parquetTextConfiguration) { this.parquetTextConfiguration = parquetTextConfiguration; return this; } @@ -184,7 +171,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt xmlWriter.writeXml(this.delimitedTextConfiguration, "DelimitedTextConfiguration"); xmlWriter.writeXml(this.jsonTextConfiguration, "JsonTextConfiguration"); xmlWriter.writeXml(this.arrowConfiguration, "ArrowConfiguration"); - xmlWriter.writeStartElement("ParquetTextConfiguration").writeEndElement(); + xmlWriter.writeXml(this.parquetTextConfiguration, "ParquetTextConfiguration"); return xmlWriter.writeEndElement(); } @@ -194,6 +181,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt * @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. */ @Generated @@ -209,6 +197,7 @@ public static QueryFormat fromXml(XmlReader xmlReader) throws XMLStreamException * 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. */ @Generated @@ -216,28 +205,34 @@ public static QueryFormat fromXml(XmlReader xmlReader, String rootElementName) t String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "QueryFormat" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - QueryFormat deserializedQueryFormat = new QueryFormat(); + QueryFormatType type = null; + DelimitedTextConfiguration delimitedTextConfiguration = null; + JsonTextConfigurationInternal jsonTextConfiguration = null; + ArrowTextConfigurationInternal arrowConfiguration = null; + ParquetTextConfiguration parquetTextConfiguration = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); if ("Type".equals(elementName.getLocalPart())) { - deserializedQueryFormat.type = QueryFormatType.fromString(reader.getStringElement()); + type = QueryFormatType.fromString(reader.getStringElement()); } else if ("DelimitedTextConfiguration".equals(elementName.getLocalPart())) { - deserializedQueryFormat.delimitedTextConfiguration + delimitedTextConfiguration = DelimitedTextConfiguration.fromXml(reader, "DelimitedTextConfiguration"); } else if ("JsonTextConfiguration".equals(elementName.getLocalPart())) { - deserializedQueryFormat.jsonTextConfiguration - = JsonTextConfiguration.fromXml(reader, "JsonTextConfiguration"); + jsonTextConfiguration = JsonTextConfigurationInternal.fromXml(reader, "JsonTextConfiguration"); } else if ("ArrowConfiguration".equals(elementName.getLocalPart())) { - deserializedQueryFormat.arrowConfiguration - = ArrowConfiguration.fromXml(reader, "ArrowConfiguration"); + arrowConfiguration = ArrowTextConfigurationInternal.fromXml(reader, "ArrowConfiguration"); } else if ("ParquetTextConfiguration".equals(elementName.getLocalPart())) { - deserializedQueryFormat.parquetTextConfiguration = new Object(); - xmlReader.skipElement(); + parquetTextConfiguration = ParquetTextConfiguration.fromXml(reader, "ParquetTextConfiguration"); } else { reader.skipElement(); } } + QueryFormat deserializedQueryFormat = new QueryFormat(type); + deserializedQueryFormat.delimitedTextConfiguration = delimitedTextConfiguration; + deserializedQueryFormat.jsonTextConfiguration = jsonTextConfiguration; + deserializedQueryFormat.arrowConfiguration = arrowConfiguration; + deserializedQueryFormat.parquetTextConfiguration = parquetTextConfiguration; 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 677dfb3dc5f5e..d53c5c1861d98 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 @@ -1,30 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; /** - * The quick query format type. + * The query format type. */ public enum QueryFormatType { /** - * Enum value delimited. + * The query format type is delimited. */ DELIMITED("delimited"), /** - * Enum value json. + * The query format type is JSON. */ JSON("json"), /** - * Enum value arrow. + * The query format type is Apache Arrow. */ ARROW("arrow"), /** - * Enum value parquet. + * The query format type is Parquet. */ PARQUET("parquet"); 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 759104f3ac78a..6fee18c551a94 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 @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.storage.blob.implementation.models; import com.azure.core.annotation.Fluent; @@ -17,51 +18,55 @@ */ @Fluent public final class QueryRequest implements XmlSerializable { - /* * Required. The type of the provided query expression. */ @Generated - private String queryType = "SQL"; + private final QueryRequestType queryType; /* - * The query expression in SQL. The maximum size of the query expression is 256KiB. + * The query expression. The maximum size of the query expression is 256KiB. */ @Generated - private String expression; + private final String expression; /* - * The InputSerialization property. + * The input serialization settings. */ @Generated private QuerySerialization inputSerialization; /* - * The OutputSerialization property. + * The output serialization settings. */ @Generated private QuerySerialization outputSerialization; /** * Creates an instance of QueryRequest class. + * + * @param queryType the queryType value to set. + * @param expression the expression value to set. */ @Generated - public QueryRequest() { + public QueryRequest(QueryRequestType queryType, String expression) { + this.queryType = queryType; + this.expression = expression; } /** * Get the queryType property: Required. The type of the provided query expression. - * + * * @return the queryType value. */ @Generated - public String getQueryType() { + public QueryRequestType getQueryType() { return this.queryType; } /** - * Get the expression property: The query expression in SQL. The maximum size of the query expression is 256KiB. - * + * Get the expression property: The query expression. The maximum size of the query expression is 256KiB. + * * @return the expression value. */ @Generated @@ -70,20 +75,8 @@ 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. - */ - @Generated - public QueryRequest setExpression(String expression) { - this.expression = expression; - return this; - } - - /** - * Get the inputSerialization property: The InputSerialization property. - * + * Get the inputSerialization property: The input serialization settings. + * * @return the inputSerialization value. */ @Generated @@ -92,8 +85,8 @@ public QuerySerialization getInputSerialization() { } /** - * Set the inputSerialization property: The InputSerialization property. - * + * Set the inputSerialization property: The input serialization settings. + * * @param inputSerialization the inputSerialization value to set. * @return the QueryRequest object itself. */ @@ -104,8 +97,8 @@ public QueryRequest setInputSerialization(QuerySerialization inputSerialization) } /** - * Get the outputSerialization property: The OutputSerialization property. - * + * Get the outputSerialization property: The output serialization settings. + * * @return the outputSerialization value. */ @Generated @@ -114,8 +107,8 @@ public QuerySerialization getOutputSerialization() { } /** - * Set the outputSerialization property: The OutputSerialization property. - * + * Set the outputSerialization property: The output serialization settings. + * * @param outputSerialization the outputSerialization value to set. * @return the QueryRequest object itself. */ @@ -136,7 +129,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { rootElementName = rootElementName == null || rootElementName.isEmpty() ? "QueryRequest" : rootElementName; xmlWriter.writeStartElement(rootElementName); - xmlWriter.writeStringElement("QueryType", this.queryType); + xmlWriter.writeStringElement("QueryType", this.queryType == null ? null : this.queryType.toString()); xmlWriter.writeStringElement("Expression", this.expression); xmlWriter.writeXml(this.inputSerialization, "InputSerialization"); xmlWriter.writeXml(this.outputSerialization, "OutputSerialization"); @@ -145,10 +138,11 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. */ @Generated @@ -158,12 +152,13 @@ public static QueryRequest fromXml(XmlReader xmlReader) throws XMLStreamExceptio /** * 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. */ @Generated @@ -171,33 +166,30 @@ public static QueryRequest fromXml(XmlReader xmlReader, String rootElementName) String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "QueryRequest" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - QueryRequest deserializedQueryRequest = new QueryRequest(); + QueryRequestType queryType = null; + String expression = null; + QuerySerialization inputSerialization = null; + QuerySerialization outputSerialization = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); - if ("Expression".equals(elementName.getLocalPart())) { - deserializedQueryRequest.expression = reader.getStringElement(); + + if ("QueryType".equals(elementName.getLocalPart())) { + queryType = QueryRequestType.fromString(reader.getStringElement()); + } else if ("Expression".equals(elementName.getLocalPart())) { + expression = reader.getStringElement(); } else if ("InputSerialization".equals(elementName.getLocalPart())) { - deserializedQueryRequest.inputSerialization - = QuerySerialization.fromXml(reader, "InputSerialization"); + inputSerialization = QuerySerialization.fromXml(reader, "InputSerialization"); } else if ("OutputSerialization".equals(elementName.getLocalPart())) { - deserializedQueryRequest.outputSerialization - = QuerySerialization.fromXml(reader, "OutputSerialization"); + outputSerialization = QuerySerialization.fromXml(reader, "OutputSerialization"); } else { reader.skipElement(); } } + QueryRequest deserializedQueryRequest = new QueryRequest(queryType, expression); + deserializedQueryRequest.inputSerialization = inputSerialization; + deserializedQueryRequest.outputSerialization = outputSerialization; + return deserializedQueryRequest; }); } - - /** - * Set the queryType property: Required. The type of the provided query expression. - * - * @param queryType the queryType value to set. - * @return the QueryRequest object itself. - */ - public QueryRequest setQueryType(String queryType) { - this.queryType = queryType; - return this; - } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryRequestType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryRequestType.java new file mode 100644 index 0000000000000..c87b4a360e42b --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QueryRequestType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation.models; + +/** + * The query request type. + */ +public enum QueryRequestType { + /** + * The SQL request query type. + */ + SQL("SQL"); + + /** + * The actual serialized value for a QueryRequestType instance. + */ + private final String value; + + QueryRequestType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a QueryRequestType instance. + * + * @param value the serialized value to parse. + * @return the parsed QueryRequestType object, or null if unable to parse. + */ + public static QueryRequestType fromString(String value) { + if (value == null) { + return null; + } + QueryRequestType[] items = QueryRequestType.values(); + for (QueryRequestType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@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/QuerySerialization.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/QuerySerialization.java index c82906b62681d..a430db1b601c7 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -14,25 +14,28 @@ import javax.xml.stream.XMLStreamException; /** - * The QuerySerialization model. + * The query serialization settings. */ -@Fluent +@Immutable public final class QuerySerialization implements XmlSerializable { /* - * The Format property. + * The query format. */ @Generated - private QueryFormat format; + private final QueryFormat format; /** * Creates an instance of QuerySerialization class. + * + * @param format the format value to set. */ @Generated - public QuerySerialization() { + public QuerySerialization(QueryFormat format) { + this.format = format; } /** - * Get the format property: The Format property. + * Get the format property: The query format. * * @return the format value. */ @@ -41,18 +44,6 @@ public QueryFormat getFormat() { return this.format; } - /** - * Set the format property: The Format property. - * - * @param format the format value to set. - * @return the QuerySerialization object itself. - */ - @Generated - public QuerySerialization setFormat(QueryFormat format) { - this.format = format; - return this; - } - @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @@ -74,6 +65,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt * @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. */ @Generated @@ -89,6 +81,7 @@ public static QuerySerialization fromXml(XmlReader xmlReader) throws XMLStreamEx * 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. */ @Generated @@ -96,18 +89,17 @@ public static QuerySerialization fromXml(XmlReader xmlReader, String rootElement String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "QuerySerialization" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - QuerySerialization deserializedQuerySerialization = new QuerySerialization(); + QueryFormat format = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); if ("Format".equals(elementName.getLocalPart())) { - deserializedQuerySerialization.format = QueryFormat.fromXml(reader, "Format"); + format = QueryFormat.fromXml(reader, "Format"); } else { reader.skipElement(); } } - - return deserializedQuerySerialization; + return new QuerySerialization(format); }); } } 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 bee8fad9273e3..82a8aca74e8de 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,31 +14,31 @@ /** * The ServicesFilterBlobsHeaders model. */ -@Fluent +@Immutable public final class ServicesFilterBlobsHeaders { /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -49,109 +49,57 @@ public final class ServicesFilterBlobsHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesFilterBlobsHeaders(HttpHeaders rawHeaders) { - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ServicesFilterBlobsHeaders object itself. - */ - @Generated - public ServicesFilterBlobsHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ServicesFilterBlobsHeaders object itself. - */ - @Generated - public ServicesFilterBlobsHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ServicesFilterBlobsHeaders object itself. + * @return the version value. */ @Generated - public ServicesFilterBlobsHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the ServicesFilterBlobsHeaders object itself. + * @return the clientRequestId value. */ @Generated - public ServicesFilterBlobsHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 1a9d858c78ded..40772cf082d05 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -16,51 +16,49 @@ /** * The ServicesGetAccountInfoHeaders model. */ -@Fluent +@Immutable public final class ServicesGetAccountInfoHeaders { /* - * The x-ms-client-request-id property. + * The x-ms-sku-name property. */ @Generated - private String xMsClientRequestId; + private final SkuName skuName; /* - * The x-ms-request-id property. + * The x-ms-account-kind property. */ @Generated - private String xMsRequestId; + private final AccountKind accountKind; /* - * The x-ms-version property. + * The x-ms-is-hns-enabled property. */ @Generated - private String xMsVersion; + private final Boolean isHierarchicalNamespaceEnabled; /* * The Date property. */ @Generated - private DateTimeRfc1123 date; + private final DateTimeRfc1123 date; /* - * The x-ms-sku-name property. + * The x-ms-version property. */ @Generated - private SkuName xMsSkuName; + private final String version; /* - * The x-ms-account-kind property. + * The x-ms-request-id property. */ @Generated - private AccountKind xMsAccountKind; + private final String requestId; /* - * The x-ms-is-hns-enabled property. + * The x-ms-client-request-id property. */ @Generated - private Boolean xMsIsHnsEnabled; - - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + private final String clientRequestId; private static final HttpHeaderName X_MS_SKU_NAME = HttpHeaderName.fromString("x-ms-sku-name"); @@ -68,6 +66,8 @@ public final class ServicesGetAccountInfoHeaders { private static final HttpHeaderName X_MS_IS_HNS_ENABLED = HttpHeaderName.fromString("x-ms-is-hns-enabled"); + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + // HttpHeaders containing the raw property values. /** * Creates an instance of ServicesGetAccountInfoHeaders class. @@ -75,99 +75,63 @@ public final class ServicesGetAccountInfoHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesGetAccountInfoHeaders(HttpHeaders rawHeaders) { - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - String date = rawHeaders.getValue(HttpHeaderName.DATE); - if (date != null) { - this.date = new DateTimeRfc1123(date); + String skuName = rawHeaders.getValue(X_MS_SKU_NAME); + if (skuName != null) { + this.skuName = SkuName.fromString(skuName); } else { - this.date = null; + this.skuName = null; } - String xMsSkuName = rawHeaders.getValue(X_MS_SKU_NAME); - if (xMsSkuName != null) { - this.xMsSkuName = SkuName.fromString(xMsSkuName); + String accountKind = rawHeaders.getValue(X_MS_ACCOUNT_KIND); + if (accountKind != null) { + this.accountKind = AccountKind.fromString(accountKind); } else { - this.xMsSkuName = null; + this.accountKind = null; } - String xMsAccountKind = rawHeaders.getValue(X_MS_ACCOUNT_KIND); - if (xMsAccountKind != null) { - this.xMsAccountKind = AccountKind.fromString(xMsAccountKind); + String isHierarchicalNamespaceEnabled = rawHeaders.getValue(X_MS_IS_HNS_ENABLED); + if (isHierarchicalNamespaceEnabled != null) { + this.isHierarchicalNamespaceEnabled = Boolean.parseBoolean(isHierarchicalNamespaceEnabled); } else { - this.xMsAccountKind = null; + this.isHierarchicalNamespaceEnabled = null; } - String xMsIsHnsEnabled = rawHeaders.getValue(X_MS_IS_HNS_ENABLED); - if (xMsIsHnsEnabled != null) { - this.xMsIsHnsEnabled = Boolean.parseBoolean(xMsIsHnsEnabled); + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); } else { - this.xMsIsHnsEnabled = null; + this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ServicesGetAccountInfoHeaders object itself. - */ - @Generated - public ServicesGetAccountInfoHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. + * Get the skuName property: The x-ms-sku-name property. * - * @return the xMsRequestId value. + * @return the skuName value. */ @Generated - public String getXMsRequestId() { - return this.xMsRequestId; + public SkuName getSkuName() { + return this.skuName; } /** - * Set the xMsRequestId property: The x-ms-request-id property. + * Get the accountKind property: The x-ms-account-kind property. * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ServicesGetAccountInfoHeaders object itself. + * @return the accountKind value. */ @Generated - public ServicesGetAccountInfoHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; + public AccountKind getAccountKind() { + return this.accountKind; } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the isHierarchicalNamespaceEnabled property: The x-ms-is-hns-enabled property. * - * @return the xMsVersion value. + * @return the isHierarchicalNamespaceEnabled value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the ServicesGetAccountInfoHeaders object itself. - */ - @Generated - public ServicesGetAccountInfoHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public Boolean isHierarchicalNamespaceEnabled() { + return this.isHierarchicalNamespaceEnabled; } /** @@ -184,84 +148,32 @@ public OffsetDateTime getDate() { } /** - * Set the date property: The Date property. - * - * @param date the date value to set. - * @return the ServicesGetAccountInfoHeaders object itself. - */ - @Generated - public ServicesGetAccountInfoHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; - } - - /** - * Get the xMsSkuName property: The x-ms-sku-name property. - * - * @return the xMsSkuName value. - */ - @Generated - public SkuName getXMsSkuName() { - return this.xMsSkuName; - } - - /** - * Set the xMsSkuName property: The x-ms-sku-name property. - * - * @param xMsSkuName the xMsSkuName value to set. - * @return the ServicesGetAccountInfoHeaders object itself. - */ - @Generated - public ServicesGetAccountInfoHeaders setXMsSkuName(SkuName xMsSkuName) { - this.xMsSkuName = xMsSkuName; - return this; - } - - /** - * Get the xMsAccountKind property: The x-ms-account-kind property. - * - * @return the xMsAccountKind value. - */ - @Generated - public AccountKind getXMsAccountKind() { - return this.xMsAccountKind; - } - - /** - * Set the xMsAccountKind property: The x-ms-account-kind property. + * Get the version property: The x-ms-version property. * - * @param xMsAccountKind the xMsAccountKind value to set. - * @return the ServicesGetAccountInfoHeaders object itself. + * @return the version value. */ @Generated - public ServicesGetAccountInfoHeaders setXMsAccountKind(AccountKind xMsAccountKind) { - this.xMsAccountKind = xMsAccountKind; - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsIsHnsEnabled value. + * @return the requestId value. */ @Generated - public Boolean isXMsIsHnsEnabled() { - return this.xMsIsHnsEnabled; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsIsHnsEnabled property: The x-ms-is-hns-enabled property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsIsHnsEnabled the xMsIsHnsEnabled value to set. - * @return the ServicesGetAccountInfoHeaders object itself. + * @return the clientRequestId value. */ @Generated - public ServicesGetAccountInfoHeaders setXMsIsHnsEnabled(Boolean xMsIsHnsEnabled) { - this.xMsIsHnsEnabled = xMsIsHnsEnabled; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 65fefc92e2e22..07b3935d928ca 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 @@ -1,36 +1,44 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; +import com.azure.core.util.DateTimeRfc1123; +import java.time.OffsetDateTime; /** * The ServicesGetPropertiesHeaders model. */ -@Fluent +@Immutable public final class ServicesGetPropertiesHeaders { /* - * The x-ms-client-request-id property. + * The Date property. + */ + @Generated + private final DateTimeRfc1123 date; + + /* + * The x-ms-version property. */ @Generated - private String xMsClientRequestId; + private final String version; /* * The x-ms-request-id property. */ @Generated - private String xMsRequestId; + private final String requestId; /* - * The x-ms-version property. + * The x-ms-client-request-id property. */ @Generated - private String xMsVersion; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -41,74 +49,57 @@ public final class ServicesGetPropertiesHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesGetPropertiesHeaders(HttpHeaders rawHeaders) { - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ServicesGetPropertiesHeaders object itself. - */ - @Generated - public ServicesGetPropertiesHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } else { + this.date = null; + } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsRequestId property: The x-ms-request-id property. + * Get the date property: The Date property. * - * @return the xMsRequestId value. + * @return the date value. */ @Generated - public String getXMsRequestId() { - return this.xMsRequestId; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsRequestId property: The x-ms-request-id property. + * Get the version property: The x-ms-version property. * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ServicesGetPropertiesHeaders object itself. + * @return the version value. */ @Generated - public ServicesGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsVersion value. + * @return the requestId value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ServicesGetPropertiesHeaders object itself. + * @return the clientRequestId value. */ @Generated - public ServicesGetPropertiesHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 340cb0ca74a01..1c5870fa39c09 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,31 +14,31 @@ /** * The ServicesGetStatisticsHeaders model. */ -@Fluent +@Immutable public final class ServicesGetStatisticsHeaders { /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -49,109 +49,57 @@ public final class ServicesGetStatisticsHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesGetStatisticsHeaders(HttpHeaders rawHeaders) { - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ServicesGetStatisticsHeaders object itself. - */ - @Generated - public ServicesGetStatisticsHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ServicesGetStatisticsHeaders object itself. - */ - @Generated - public ServicesGetStatisticsHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ServicesGetStatisticsHeaders object itself. + * @return the version value. */ @Generated - public ServicesGetStatisticsHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the ServicesGetStatisticsHeaders object itself. + * @return the clientRequestId value. */ @Generated - public ServicesGetStatisticsHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 1e5a43827f48b..f70dcf069ff13 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 @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.util.DateTimeRfc1123; @@ -14,31 +14,31 @@ /** * The ServicesGetUserDelegationKeyHeaders model. */ -@Fluent +@Immutable public final class ServicesGetUserDelegationKeyHeaders { /* - * The x-ms-client-request-id property. + * The Date property. */ @Generated - private String xMsClientRequestId; + private final DateTimeRfc1123 date; /* - * The x-ms-request-id property. + * The x-ms-version property. */ @Generated - private String xMsRequestId; + private final String version; /* - * The x-ms-version property. + * The x-ms-request-id property. */ @Generated - private String xMsVersion; + private final String requestId; /* - * The Date property. + * The x-ms-client-request-id property. */ @Generated - private DateTimeRfc1123 date; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -49,109 +49,57 @@ public final class ServicesGetUserDelegationKeyHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesGetUserDelegationKeyHeaders(HttpHeaders rawHeaders) { - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); String date = rawHeaders.getValue(HttpHeaderName.DATE); if (date != null) { this.date = new DateTimeRfc1123(date); } else { this.date = null; } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ServicesGetUserDelegationKeyHeaders object itself. - */ - @Generated - public ServicesGetUserDelegationKeyHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ServicesGetUserDelegationKeyHeaders object itself. - */ - @Generated - public ServicesGetUserDelegationKeyHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. + * Get the date property: The Date property. * - * @return the xMsVersion value. + * @return the date value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the version property: The x-ms-version property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ServicesGetUserDelegationKeyHeaders object itself. + * @return the version value. */ @Generated - public ServicesGetUserDelegationKeyHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getVersion() { + return this.version; } /** - * Get the date property: The Date property. + * Get the requestId property: The x-ms-request-id property. * - * @return the date value. + * @return the requestId value. */ @Generated - public OffsetDateTime getDate() { - if (this.date == null) { - return null; - } - return this.date.getDateTime(); + public String getRequestId() { + return this.requestId; } /** - * Set the date property: The Date property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param date the date value to set. - * @return the ServicesGetUserDelegationKeyHeaders object itself. + * @return the clientRequestId value. */ @Generated - public ServicesGetUserDelegationKeyHeaders setDate(OffsetDateTime date) { - if (date == null) { - this.date = null; - } else { - this.date = new DateTimeRfc1123(date); - } - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 deleted file mode 100644 index 1eacd5ab26580..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListBlobContainersSegmentHeaders.java +++ /dev/null @@ -1,114 +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.azure.core.annotation.Generated; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The ServicesListBlobContainersSegmentHeaders model. - */ -@Fluent -public final class ServicesListBlobContainersSegmentHeaders { - /* - * The x-ms-client-request-id property. - */ - @Generated - private String xMsClientRequestId; - - /* - * The x-ms-request-id property. - */ - @Generated - private String xMsRequestId; - - /* - * The x-ms-version property. - */ - @Generated - private String xMsVersion; - - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - - // 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.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ServicesListBlobContainersSegmentHeaders object itself. - */ - @Generated - public ServicesListBlobContainersSegmentHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ServicesListBlobContainersSegmentHeaders object itself. - */ - @Generated - public ServicesListBlobContainersSegmentHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the ServicesListBlobContainersSegmentHeaders object itself. - */ - @Generated - public ServicesListBlobContainersSegmentHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } -} 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 deleted file mode 100644 index 91e2bad797f9b..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListBlobContainersSegmentNextHeaders.java +++ /dev/null @@ -1,114 +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.azure.core.annotation.Generated; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The ServicesListBlobContainersSegmentNextHeaders model. - */ -@Fluent -public final class ServicesListBlobContainersSegmentNextHeaders { - /* - * The x-ms-client-request-id property. - */ - @Generated - private String xMsClientRequestId; - - /* - * The x-ms-request-id property. - */ - @Generated - private String xMsRequestId; - - /* - * The x-ms-version property. - */ - @Generated - private String xMsVersion; - - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - - // 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.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ServicesListBlobContainersSegmentNextHeaders object itself. - */ - @Generated - public ServicesListBlobContainersSegmentNextHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ServicesListBlobContainersSegmentNextHeaders object itself. - */ - @Generated - public ServicesListBlobContainersSegmentNextHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the ServicesListBlobContainersSegmentNextHeaders object itself. - */ - @Generated - public ServicesListBlobContainersSegmentNextHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListContainersSegmentHeaders.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListContainersSegmentHeaders.java new file mode 100644 index 0000000000000..18c7dc24734ec --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesListContainersSegmentHeaders.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.storage.blob.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.util.DateTimeRfc1123; +import java.time.OffsetDateTime; + +/** + * The ServicesListContainersSegmentHeaders model. + */ +@Immutable +public final class ServicesListContainersSegmentHeaders { + /* + * The Date property. + */ + @Generated + private final DateTimeRfc1123 date; + + /* + * The x-ms-version property. + */ + @Generated + private final String version; + + /* + * The x-ms-request-id property. + */ + @Generated + private final String requestId; + + /* + * The x-ms-client-request-id property. + */ + @Generated + private final String clientRequestId; + + private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ServicesListContainersSegmentHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ServicesListContainersSegmentHeaders(HttpHeaders rawHeaders) { + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } else { + this.date = null; + } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); + } + + /** + * Get the date property: The Date property. + * + * @return the date value. + */ + @Generated + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); + } + + /** + * Get the version property: The x-ms-version property. + * + * @return the version value. + */ + @Generated + public String getVersion() { + return this.version; + } + + /** + * Get the requestId property: The x-ms-request-id property. + * + * @return the requestId value. + */ + @Generated + public String getRequestId() { + return this.requestId; + } + + /** + * Get the clientRequestId property: The x-ms-client-request-id property. + * + * @return the clientRequestId value. + */ + @Generated + public String getClientRequestId() { + return this.clientRequestId; + } +} 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 472df8a814416..06de0255dabd8 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 @@ -1,36 +1,44 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; +import com.azure.core.util.DateTimeRfc1123; +import java.time.OffsetDateTime; /** * The ServicesSetPropertiesHeaders model. */ -@Fluent +@Immutable public final class ServicesSetPropertiesHeaders { /* - * The x-ms-client-request-id property. + * The Date property. + */ + @Generated + private final DateTimeRfc1123 date; + + /* + * The x-ms-version property. */ @Generated - private String xMsClientRequestId; + private final String version; /* * The x-ms-request-id property. */ @Generated - private String xMsRequestId; + private final String requestId; /* - * The x-ms-version property. + * The x-ms-client-request-id property. */ @Generated - private String xMsVersion; + private final String clientRequestId; private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); @@ -41,74 +49,57 @@ public final class ServicesSetPropertiesHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public ServicesSetPropertiesHeaders(HttpHeaders rawHeaders) { - this.xMsClientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - @Generated - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ServicesSetPropertiesHeaders object itself. - */ - @Generated - public ServicesSetPropertiesHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; + String date = rawHeaders.getValue(HttpHeaderName.DATE); + if (date != null) { + this.date = new DateTimeRfc1123(date); + } else { + this.date = null; + } + this.version = rawHeaders.getValue(X_MS_VERSION); + this.requestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); + this.clientRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); } /** - * Get the xMsRequestId property: The x-ms-request-id property. + * Get the date property: The Date property. * - * @return the xMsRequestId value. + * @return the date value. */ @Generated - public String getXMsRequestId() { - return this.xMsRequestId; + public OffsetDateTime getDate() { + if (this.date == null) { + return null; + } + return this.date.getDateTime(); } /** - * Set the xMsRequestId property: The x-ms-request-id property. + * Get the version property: The x-ms-version property. * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ServicesSetPropertiesHeaders object itself. + * @return the version value. */ @Generated - public ServicesSetPropertiesHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; + public String getVersion() { + return this.version; } /** - * Get the xMsVersion property: The x-ms-version property. + * Get the requestId property: The x-ms-request-id property. * - * @return the xMsVersion value. + * @return the requestId value. */ @Generated - public String getXMsVersion() { - return this.xMsVersion; + public String getRequestId() { + return this.requestId; } /** - * Set the xMsVersion property: The x-ms-version property. + * Get the clientRequestId property: The x-ms-client-request-id property. * - * @param xMsVersion the xMsVersion value to set. - * @return the ServicesSetPropertiesHeaders object itself. + * @return the clientRequestId value. */ @Generated - public ServicesSetPropertiesHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; + public String getClientRequestId() { + return this.clientRequestId; } } 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 deleted file mode 100644 index 8e1ea416934dc..0000000000000 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ServicesSubmitBatchHeaders.java +++ /dev/null @@ -1,114 +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.azure.core.annotation.Generated; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The ServicesSubmitBatchHeaders model. - */ -@Fluent -public final class ServicesSubmitBatchHeaders { - /* - * The Content-Type property. - */ - @Generated - private String contentType; - - /* - * The x-ms-request-id property. - */ - @Generated - private String xMsRequestId; - - /* - * The x-ms-version property. - */ - @Generated - private String xMsVersion; - - private static final HttpHeaderName X_MS_VERSION = HttpHeaderName.fromString("x-ms-version"); - - // 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.contentType = rawHeaders.getValue(HttpHeaderName.CONTENT_TYPE); - this.xMsRequestId = rawHeaders.getValue(HttpHeaderName.X_MS_REQUEST_ID); - this.xMsVersion = rawHeaders.getValue(X_MS_VERSION); - } - - /** - * Get the contentType property: The Content-Type property. - * - * @return the contentType value. - */ - @Generated - public String getContentType() { - return this.contentType; - } - - /** - * Set the contentType property: The Content-Type property. - * - * @param contentType the contentType value to set. - * @return the ServicesSubmitBatchHeaders object itself. - */ - @Generated - public ServicesSubmitBatchHeaders setContentType(String contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - @Generated - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ServicesSubmitBatchHeaders object itself. - */ - @Generated - public ServicesSubmitBatchHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - @Generated - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the ServicesSubmitBatchHeaders object itself. - */ - @Generated - public ServicesSubmitBatchHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } -} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/SessionCredentials.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/SessionCredentials.java index ed427a221aa70..f262a39cf1b84 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/SessionCredentials.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/SessionCredentials.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.implementation.models; -import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; import com.azure.xml.XmlReader; import com.azure.xml.XmlSerializable; import com.azure.xml.XmlToken; @@ -14,9 +14,9 @@ import javax.xml.stream.XMLStreamException; /** - * The SessionCredentials model. + * The credentials associated with a session. */ -@Fluent +@Immutable public final class SessionCredentials implements XmlSerializable { /* * An opaque token used to authorize subsequent requests in the session. Must be treated as a security credential. @@ -35,7 +35,7 @@ public final class SessionCredentials implements XmlSerializable { - /* - * The Message property. - */ - @Generated - private String message; - - /* - * The CopySourceStatusCode property. - */ - @Generated - private Integer copySourceStatusCode; - - /* - * The CopySourceErrorCode property. - */ - @Generated - private String copySourceErrorCode; - - /* - * The CopySourceErrorMessage property. - */ - @Generated - private String copySourceErrorMessage; - - /** - * Creates an instance of StorageError class. - */ - @Generated - public StorageError() { - } - - /** - * Get the message property: The Message property. - * - * @return the message value. - */ - @Generated - public String getMessage() { - return this.message; - } - - /** - * Set the message property: The Message property. - * - * @param message the message value to set. - * @return the StorageError object itself. - */ - @Generated - public StorageError setMessage(String message) { - this.message = message; - return this; - } - - /** - * Get the copySourceStatusCode property: The CopySourceStatusCode property. - * - * @return the copySourceStatusCode value. - */ - @Generated - public Integer getCopySourceStatusCode() { - return this.copySourceStatusCode; - } - - /** - * Set the copySourceStatusCode property: The CopySourceStatusCode property. - * - * @param copySourceStatusCode the copySourceStatusCode value to set. - * @return the StorageError object itself. - */ - @Generated - public StorageError setCopySourceStatusCode(Integer copySourceStatusCode) { - this.copySourceStatusCode = copySourceStatusCode; - return this; - } - - /** - * Get the copySourceErrorCode property: The CopySourceErrorCode property. - * - * @return the copySourceErrorCode value. - */ - @Generated - public String getCopySourceErrorCode() { - return this.copySourceErrorCode; - } - - /** - * Set the copySourceErrorCode property: The CopySourceErrorCode property. - * - * @param copySourceErrorCode the copySourceErrorCode value to set. - * @return the StorageError object itself. - */ - @Generated - public StorageError setCopySourceErrorCode(String copySourceErrorCode) { - this.copySourceErrorCode = copySourceErrorCode; - return this; - } - - /** - * Get the copySourceErrorMessage property: The CopySourceErrorMessage property. - * - * @return the copySourceErrorMessage value. - */ - @Generated - public String getCopySourceErrorMessage() { - return this.copySourceErrorMessage; - } - - /** - * Set the copySourceErrorMessage property: The CopySourceErrorMessage property. - * - * @param copySourceErrorMessage the copySourceErrorMessage value to set. - * @return the StorageError object itself. - */ - @Generated - public StorageError setCopySourceErrorMessage(String copySourceErrorMessage) { - this.copySourceErrorMessage = copySourceErrorMessage; - return this; - } - - @Generated - @Override - public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { - return toXml(xmlWriter, null); - } - - @Generated - @Override - public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = rootElementName == null || rootElementName.isEmpty() ? "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. - */ - @Generated - 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. - */ - @Generated - public static StorageError fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { - String finalRootElementName - = rootElementName == null || rootElementName.isEmpty() ? "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(Integer::parseInt); - } 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/package-info.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/package-info.java index 4c7fa15a262de..e99f509a1fcec 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 @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the data models for AzureBlobStorage. - * null. + * Package containing the data models for Blob. */ 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 639d482c5fda7..a6d905921bcba 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 @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the implementations for AzureBlobStorage. - * null. + * Package containing the implementations for Blob. */ package com.azure.storage.blob.implementation; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java index ad46d85ce175d..c7e27030a1279 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/ArrowBlobListDeserializer.java @@ -4,6 +4,7 @@ package com.azure.storage.blob.implementation.util; import com.azure.storage.blob.implementation.models.BlobItemInternal; +import com.azure.storage.blob.models.BlobItem; import com.azure.storage.blob.implementation.models.BlobItemPropertiesInternal; import com.azure.storage.blob.implementation.models.BlobListArrowParseException; import com.azure.storage.blob.implementation.models.BlobName; @@ -39,7 +40,7 @@ import java.util.Set; /** - * Deserializes an Apache Arrow IPC stream from the ListBlobs response into a list of {@link BlobItemInternal} objects. + * Deserializes an Apache Arrow IPC stream from the ListBlobs response into a list of {@link BlobItem} objects. */ public final class ArrowBlobListDeserializer { @@ -85,7 +86,7 @@ public static ArrowListBlobsResult deserialize(InputStream arrowStream) { throw new BlobListArrowParseException("ListBlobs Arrow parse failure: input stream is null."); } - List results = new ArrayList<>(); + List results = new ArrayList<>(); String nextMarker = null; Integer numberOfRecords = null; @@ -145,7 +146,7 @@ private static void validateKnownColumns(Batch batch) { } } - private static BlobItemInternal readRow(Batch batch, int index) { + private static BlobItem readRow(Batch batch, int index) { BlobItemInternal item = new BlobItemInternal(); String name = getVarChar(batch, "Name", index); @@ -155,8 +156,7 @@ private static BlobItemInternal readRow(Batch batch, int index) { String resourceType = getVarChar(batch, "ResourceType", index); if ("blobprefix".equals(resourceType)) { - item.setIsPrefix(true); - return item; + return ModelHelper.populateBlobItem(item).setIsPrefix(true); } BlobItemPropertiesInternal properties = new BlobItemPropertiesInternal(); @@ -168,7 +168,7 @@ private static BlobItemInternal readRow(Batch batch, int index) { item.setSnapshot(getVarChar(batch, "Snapshot", index)); item.setVersionId(getVarChar(batch, "VersionId", index)); - item.setIsCurrentVersion(getBit(batch, "IsCurrentVersion", index)); + item.setCurrentVersion(getBit(batch, "IsCurrentVersion", index)); item.setHasVersionsOnly(getBit(batch, "HasVersionsOnly", index)); Map metadata = getMap(batch, "Metadata", index); @@ -249,7 +249,7 @@ private static BlobItemInternal readRow(Batch batch, int index) { properties.setBlobSequenceNumber(getUInt64(batch, "x-ms-blob-sequence-number", index)); - properties.setIsSealed(getBit(batch, "Sealed", index)); + properties.setSealed(getBit(batch, "Sealed", index)); properties.setLegalHold(getBit(batch, "LegalHold", index)); properties.setDeletedTime(getTimestamp(batch, "DeletedTime", index)); properties.setLastAccessedOn(getTimestamp(batch, "LastAccessTime", index)); @@ -280,7 +280,7 @@ private static BlobItemInternal readRow(Batch batch, int index) { } item.setProperties(properties); - return item; + return ModelHelper.populateBlobItem(item); } private static T getColumn(Batch batch, String name, int index, Class type, @@ -330,7 +330,7 @@ private static Map getMap(Batch batch, String name, int index) { * Result of deserializing an Arrow ListBlobs response. */ public static final class ArrowListBlobsResult { - private final List blobItems; + private final List blobItems; private final String nextMarker; private final Integer numberOfRecords; @@ -341,7 +341,7 @@ public static final class ArrowListBlobsResult { * @param nextMarker the continuation token for the next page, or null if this is the last page * @param numberOfRecords the total number of records reported by the service, or null if not present */ - public ArrowListBlobsResult(List blobItems, String nextMarker, Integer numberOfRecords) { + public ArrowListBlobsResult(List blobItems, String nextMarker, Integer numberOfRecords) { this.blobItems = blobItems; this.nextMarker = nextMarker; this.numberOfRecords = numberOfRecords; @@ -350,7 +350,7 @@ public ArrowListBlobsResult(List blobItems, String nextMarker, /** * @return the deserialized blob items */ - public List getBlobItems() { + public List getBlobItems() { return blobItems; } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobHeadersAndQueryParameters.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobHeadersAndQueryParameters.java index 52f28ff4029af..da57455e65e08 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobHeadersAndQueryParameters.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobHeadersAndQueryParameters.java @@ -18,22 +18,23 @@ public class BlobHeadersAndQueryParameters { "x-ms-version", "Accept-Ranges", "Content-Disposition", "Content-Encoding", "Content-Language", "Content-MD5", "Content-Range", "ETag", "Last-Modified", "Server", "Vary", "x-ms-content-crc64", "x-ms-copy-action", "x-ms-copy-completion-time", "x-ms-copy-id", "x-ms-copy-progress", "x-ms-copy-status", - "x-ms-has-immutability-policy", "x-ms-has-legal-hold", "x-ms-lease-state", "x-ms-lease-status", "x-ms-range", - "x-ms-request-server-encrypted", "x-ms-server-encrypted", "x-ms-snapshot", "x-ms-source-range", "If-Match", - "If-Modified-Since", "If-None-Match", "If-Unmodified-Since", "x-ms-access-tier", "x-ms-access-tier-change-time", - "x-ms-access-tier-inferred", "x-ms-account-kind", "x-ms-archive-status", "x-ms-blob-append-offset", - "x-ms-blob-cache-control", "x-ms-blob-committed-block-count", "x-ms-blob-condition-appendpos", - "x-ms-blob-condition-maxsize", "x-ms-blob-content-disposition", "x-ms-blob-content-encoding", - "x-ms-blob-content-language", "x-ms-blob-content-length", "x-ms-blob-content-md5", "x-ms-blob-content-type", - "x-ms-blob-public-access", "x-ms-blob-sequence-number", "x-ms-blob-type", "x-ms-copy-destination-snapshot", - "x-ms-creation-time", "x-ms-default-encryption-scope", "x-ms-delete-snapshots", "x-ms-delete-type-permanent", - "x-ms-deny-encryption-scope-override", "x-ms-encryption-algorithm", "x-ms-if-sequence-number-eq", - "x-ms-if-sequence-number-le", "x-ms-if-sequence-number-lt", "x-ms-incremental-copy", "x-ms-lease-action", - "x-ms-lease-break-period", "x-ms-lease-duration", "x-ms-lease-id", "x-ms-lease-time", "x-ms-page-write", - "x-ms-proposed-lease-id", "x-ms-range-get-content-md5", "x-ms-rehydrate-priority", - "x-ms-sequence-number-action", "x-ms-sku-name", "x-ms-source-content-md5", "x-ms-source-if-match", - "x-ms-source-if-modified-since", "x-ms-source-if-none-match", "x-ms-source-if-unmodified-since", - "x-ms-tag-count", "x-ms-encryption-key-sha256").collect(Collectors.toCollection(HashSet::new)); + "x-ms-has-immutability-policy", "x-ms-has-legal-hold", "x-ms-lease-state", "x-ms-lease-status", "Range", + "x-ms-range", "x-ms-request-server-encrypted", "x-ms-server-encrypted", "x-ms-snapshot", "x-ms-source-range", + "If-Match", "If-Modified-Since", "If-None-Match", "If-Unmodified-Since", "x-ms-access-tier", + "x-ms-access-tier-change-time", "x-ms-access-tier-inferred", "x-ms-account-kind", "x-ms-archive-status", + "x-ms-blob-append-offset", "x-ms-blob-cache-control", "x-ms-blob-committed-block-count", + "x-ms-blob-condition-appendpos", "x-ms-blob-condition-maxsize", "x-ms-blob-content-disposition", + "x-ms-blob-content-encoding", "x-ms-blob-content-language", "x-ms-blob-content-length", "x-ms-blob-content-md5", + "x-ms-blob-content-type", "x-ms-blob-public-access", "x-ms-blob-sequence-number", "x-ms-blob-type", + "x-ms-copy-destination-snapshot", "x-ms-creation-time", "x-ms-default-encryption-scope", + "x-ms-delete-snapshots", "x-ms-delete-type-permanent", "x-ms-deny-encryption-scope-override", + "x-ms-encryption-algorithm", "x-ms-if-sequence-number-eq", "x-ms-if-sequence-number-le", + "x-ms-if-sequence-number-lt", "x-ms-incremental-copy", "x-ms-lease-action", "x-ms-lease-break-period", + "x-ms-lease-duration", "x-ms-lease-id", "x-ms-lease-time", "x-ms-page-write", "x-ms-proposed-lease-id", + "x-ms-range-get-content-md5", "x-ms-rehydrate-priority", "x-ms-sequence-number-action", "x-ms-sku-name", + "x-ms-source-content-md5", "x-ms-source-if-match", "x-ms-source-if-modified-since", "x-ms-source-if-none-match", + "x-ms-source-if-unmodified-since", "x-ms-tag-count", "x-ms-encryption-key-sha256") + .collect(Collectors.toCollection(HashSet::new)); /** * Gets the Storage Blob whitelist headers for log. 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 b3ed269c32bd4..a8ffb2ae037f6 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 @@ -4,10 +4,11 @@ package com.azure.storage.blob.implementation.util; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.blob.implementation.models.ArrowConfiguration; -import com.azure.storage.blob.implementation.models.ArrowField; +import com.azure.storage.blob.implementation.models.ArrowTextConfigurationInternal; +import com.azure.storage.blob.implementation.models.ArrowFieldInternal; import com.azure.storage.blob.implementation.models.DelimitedTextConfiguration; -import com.azure.storage.blob.implementation.models.JsonTextConfiguration; +import com.azure.storage.blob.implementation.models.JsonTextConfigurationInternal; +import com.azure.storage.blob.implementation.models.ParquetTextConfiguration; import com.azure.storage.blob.implementation.models.QueryFormat; import com.azure.storage.blob.implementation.models.QueryFormatType; import com.azure.storage.blob.implementation.models.QuerySerialization; @@ -223,22 +224,20 @@ public static QuerySerialization transformInputSerialization(BlobQuerySerializat return null; } - QueryFormat generatedFormat = new QueryFormat(); + QueryFormat generatedFormat; if (userSerialization instanceof BlobQueryDelimitedSerialization) { - generatedFormat.setType(QueryFormatType.DELIMITED); - generatedFormat + generatedFormat = new QueryFormat(QueryFormatType.DELIMITED) .setDelimitedTextConfiguration(transformDelimited((BlobQueryDelimitedSerialization) userSerialization)); } else if (userSerialization instanceof BlobQueryJsonSerialization) { - generatedFormat.setType(QueryFormatType.JSON); - generatedFormat.setJsonTextConfiguration(transformJson((BlobQueryJsonSerialization) userSerialization)); + generatedFormat = new QueryFormat(QueryFormatType.JSON) + .setJsonTextConfiguration(transformJson((BlobQueryJsonSerialization) userSerialization)); } else if (userSerialization instanceof BlobQueryParquetSerialization) { - generatedFormat.setType(QueryFormatType.PARQUET); - generatedFormat + generatedFormat = new QueryFormat(QueryFormatType.PARQUET) .setParquetTextConfiguration(transformParquet((BlobQueryParquetSerialization) userSerialization)); } else { @@ -246,7 +245,7 @@ public static QuerySerialization transformInputSerialization(BlobQuerySerializat new IllegalArgumentException("Please see values of valid input serialization in the documentation " + "(https://docs.microsoft.com/rest/api/storageservices/query-blob-contents#request-body).")); } - return new QuerySerialization().setFormat(generatedFormat); + return new QuerySerialization(generatedFormat); } /** @@ -261,29 +260,28 @@ public static QuerySerialization transformOutputSerialization(BlobQuerySerializa return null; } - QueryFormat generatedFormat = new QueryFormat(); + QueryFormat generatedFormat; if (userSerialization instanceof BlobQueryDelimitedSerialization) { - generatedFormat.setType(QueryFormatType.DELIMITED); - generatedFormat + generatedFormat = new QueryFormat(QueryFormatType.DELIMITED) .setDelimitedTextConfiguration(transformDelimited((BlobQueryDelimitedSerialization) userSerialization)); } else if (userSerialization instanceof BlobQueryJsonSerialization) { - generatedFormat.setType(QueryFormatType.JSON); - generatedFormat.setJsonTextConfiguration(transformJson((BlobQueryJsonSerialization) userSerialization)); + generatedFormat = new QueryFormat(QueryFormatType.JSON) + .setJsonTextConfiguration(transformJson((BlobQueryJsonSerialization) userSerialization)); } else if (userSerialization instanceof BlobQueryArrowSerialization) { - generatedFormat.setType(QueryFormatType.ARROW); - generatedFormat.setArrowConfiguration(transformArrow((BlobQueryArrowSerialization) userSerialization)); + generatedFormat = new QueryFormat(QueryFormatType.ARROW) + .setArrowConfiguration(transformArrow((BlobQueryArrowSerialization) userSerialization)); } else { throw logger.logExceptionAsError( new IllegalArgumentException("Please see values of valid output serialization in the documentation " + "(https://docs.microsoft.com/rest/api/storageservices/query-blob-contents#request-body).")); } - return new QuerySerialization().setFormat(generatedFormat); + return new QuerySerialization(generatedFormat); } /** @@ -306,58 +304,57 @@ public static QuerySerialization transformOutputSerialization(BlobQuerySerializa } /** - * Transforms a BlobQueryJsonSerialization into a JsonTextConfiguration. + * Transforms a BlobQueryJsonSerialization into a JsonTextConfigurationInternal. * * @param jsonSerialization {@link BlobQueryJsonSerialization} - * @return {@link JsonTextConfiguration} + * @return {@link JsonTextConfigurationInternal} */ - private static JsonTextConfiguration transformJson(BlobQueryJsonSerialization jsonSerialization) { + private static JsonTextConfigurationInternal transformJson(BlobQueryJsonSerialization jsonSerialization) { if (jsonSerialization == null) { return null; } - return new JsonTextConfiguration().setRecordSeparator(charToString(jsonSerialization.getRecordSeparator())); + return new JsonTextConfigurationInternal() + .setRecordSeparator(charToString(jsonSerialization.getRecordSeparator())); } /** - * Transforms a BlobQueryParquetSerialization into an Object. + * Transforms a BlobQueryParquetSerialization into a ParquetTextConfiguration. Parquet serialization has no + * configurable properties, so this is always an empty configuration. * * @param parquetSerialization {@link BlobQueryParquetSerialization} - * @return {@link JsonTextConfiguration} + * @return {@link ParquetTextConfiguration} */ - private static Object transformParquet(BlobQueryParquetSerialization parquetSerialization) { - /* This method returns an Object since the ParquetConfiguration currently accepts no options. This results in - the generator generating ParquetConfiguration as an Object. */ + private static ParquetTextConfiguration transformParquet(BlobQueryParquetSerialization parquetSerialization) { if (parquetSerialization == null) { return null; } - return new Object(); + return new ParquetTextConfiguration(); } /** - * Transforms a BlobQueryArrowSerialization into a ArrowConfiguration. + * Transforms a BlobQueryArrowSerialization into a ArrowTextConfigurationInternal. * * @param arrowSerialization {@link BlobQueryArrowSerialization} - * @return {@link ArrowConfiguration} + * @return {@link ArrowTextConfigurationInternal} */ - private static ArrowConfiguration transformArrow(BlobQueryArrowSerialization arrowSerialization) { + private static ArrowTextConfigurationInternal transformArrow(BlobQueryArrowSerialization arrowSerialization) { if (arrowSerialization == null) { return null; } - List schema + List schema = arrowSerialization.getSchema() == null ? null : new ArrayList<>(arrowSerialization.getSchema().size()); if (schema != null) { for (BlobQueryArrowField field : arrowSerialization.getSchema()) { if (field == null) { schema.add(null); } else { - schema.add(new ArrowField().setName(field.getName()) + schema.add(new ArrowFieldInternal(field.getType().toString()).setName(field.getName()) .setPrecision(field.getPrecision()) - .setScale(field.getScale()) - .setType(field.getType().toString())); + .setScale(field.getScale())); } } } - return new ArrowConfiguration().setSchema(schema); + return new ArrowTextConfigurationInternal(schema); } private static String charToString(char c) { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java index d5cb157012ac1..0f140e51a3f32 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BuilderHelper.java @@ -31,6 +31,7 @@ import com.azure.core.util.tracing.TracerProvider; import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.BlobUrlParts; +import com.azure.storage.blob.implementation.AzureBlobStorageImpl; import com.azure.storage.blob.implementation.accesshelpers.SessionContextAccessor; import com.azure.storage.blob.models.BlobAudience; import com.azure.storage.blob.SessionContext; @@ -392,4 +393,20 @@ public static void logCredentialChange(ClientLogger logger, String newCredential logger.info("Credential set to '{}' when it was previously configured.", newCredentialType); } + /** + * Creates the generated service layer. A null pipeline falls back to the generated default pipeline, as the + * builder used before the TypeSpec migration did. + * + * @param pipeline The pipeline used to send service requests, may be null. + * @param url The endpoint where to send service requests. + * @param serviceVersion The version of the service to receive requests. + * @return The generated service layer. + */ + public static AzureBlobStorageImpl createAzureBlobStorage(HttpPipeline pipeline, String url, + BlobServiceVersion serviceVersion) { + return pipeline == null + ? new AzureBlobStorageImpl(url, serviceVersion) + : new AzureBlobStorageImpl(pipeline, url, serviceVersion); + } + } 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 9bfba61aaed94..6e2820bfd8951 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,13 +3,17 @@ package com.azure.storage.blob.implementation.util; +import com.azure.core.util.Context; +import com.azure.core.http.rest.StreamResponse; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpRange; import com.azure.core.http.RequestConditions; +import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.BinaryData; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.LongRunningOperationStatus; @@ -21,10 +25,12 @@ import com.azure.storage.blob.implementation.models.BlobLayoutInternal; import com.azure.storage.blob.implementation.models.BlobLayoutEndpointsEndpointItem; import com.azure.storage.blob.implementation.models.BlobLayoutRangesRangeItem; +import com.azure.storage.blob.implementation.models.BlobCopySourceTags; import com.azure.storage.blob.implementation.models.BlobItemInternal; import com.azure.storage.blob.implementation.models.BlobName; import com.azure.storage.blob.implementation.models.BlobPropertiesInternalDownload; -import com.azure.storage.blob.implementation.models.BlobStorageExceptionInternal; +import com.azure.storage.blob.implementation.models.BlobStorageError; +import com.azure.storage.blob.implementation.models.BlobStorageErrorException; import com.azure.storage.blob.implementation.models.BlobTag; import com.azure.storage.blob.implementation.models.BlobTags; import com.azure.storage.blob.implementation.models.BlobsDownloadHeaders; @@ -32,6 +38,7 @@ 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.BlobCopySourceTagsMode; import com.azure.storage.blob.models.BlobCorsRule; import com.azure.storage.blob.models.BlobDownloadAsyncResponse; import com.azure.storage.blob.models.BlobDownloadHeaders; @@ -61,8 +68,12 @@ import com.azure.storage.common.Utility; import com.azure.storage.common.implementation.Constants; import com.azure.storage.common.implementation.StorageImplUtils; +import com.azure.xml.XmlReader; +import com.azure.xml.XmlSerializable; +import com.azure.xml.XmlWriter; import java.io.IOException; +import java.io.ByteArrayOutputStream; import java.io.UnsupportedEncodingException; import java.net.MalformedURLException; import java.net.URI; @@ -79,6 +90,8 @@ import java.util.Map; import java.util.concurrent.TimeoutException; +import javax.xml.stream.XMLStreamException; + /** * This class provides helper methods for common model patterns. *

@@ -87,6 +100,24 @@ public final class ModelHelper { private static final ClientLogger LOGGER = new ClientLogger(ModelHelper.class); + /** + * Attaches {@code Accept: application/xml} to the request options of an operation the generated layer left + * without an Accept header. + *

+ * The shipped SDK sends {@code application/xml} on every operation, including those that return no body. The + * emitter only declares an Accept where the response has a media type to derive one from, so the rest would go + * out as the transport default. This is applied to the request options the operation already carries rather than + * through a pipeline policy, because consumers such as DataLake and Blob Batch build blob clients over their own + * pipelines and would not pick a blob-builder policy up. + * + * @param requestOptions The request options for the operation; may be {@code null}. + * @return The request options carrying the Accept header. + */ + public static RequestOptions xmlAccept(RequestOptions requestOptions) { + RequestOptions options = requestOptions == null ? new RequestOptions() : requestOptions; + return options.setHeader(HttpHeaderName.ACCEPT, "application/xml"); + } + /** * Indicates the default size above which the upload will be broken into blocks and parallelized. */ @@ -208,19 +239,23 @@ public static ParallelTransferOptions populateAndApplyDefaults(ParallelTransferO } /** - * Transforms {@link BlobsDownloadHeaders} into a public {@link BlobDownloadHeaders}. + * Transforms {@link BlobsDownloadHeaders} into a public {@link BlobDownloadHeaders}. The error code and content + * type are read from the raw response headers, as the generated header class doesn't carry them. * * @param internalHeaders {@link BlobsDownloadHeaders} + * @param rawHeaders The raw response headers. * @return {@link BlobDownloadHeaders} */ public static BlobDownloadHeaders populateBlobDownloadHeaders(BlobsDownloadHeaders internalHeaders, - String errorCode) { + HttpHeaders rawHeaders) { /* We have these two types because we needed to update this interface in a way that could not be generated (getObjectReplicationSourcePolicies), so we switched to generating BlobDownloadHeaders into implementation and wrapping it. Because it's headers type, we couldn't change the name of the generated type. */ - return BlobDownloadHeadersConstructorProxy.create(internalHeaders).setErrorCode(errorCode); + return BlobDownloadHeadersConstructorProxy.create(internalHeaders) + .setErrorCode(getErrorCode(rawHeaders)) + .setContentType(getHeaderValue(rawHeaders, HttpHeaderName.CONTENT_TYPE)); } /** @@ -417,13 +452,13 @@ public static BlobTags toBlobTags(Map tags) { } if (tags.isEmpty()) { - return new BlobTags().setBlobTagSet(new ArrayList<>()); + return new BlobTags(new ArrayList<>()); } List blobTagSet = new ArrayList<>(tags.size()); - tags.forEach((key, value) -> blobTagSet.add(new BlobTag().setKey(key).setValue(value))); + tags.forEach((key, value) -> blobTagSet.add(new BlobTag(key, value))); - return new BlobTags().setBlobTagSet(blobTagSet); + return new BlobTags(blobTagSet); } public static List @@ -570,6 +605,58 @@ public static String getErrorCode(HttpHeaders headers) { return getHeaderValue(headers, X_MS_ERROR_CODE); } + /** + * Reads x-ms-request-server-encrypted from the raw response headers, for operations whose generated response + * headers don't model it (for example Clear Pages). + * + * @param headers The raw response headers. + * @return Whether the request contents were encrypted, or null if the header is absent. + */ + public static Boolean isServerEncrypted(HttpHeaders headers) { + String value = getHeaderValue(headers, HttpHeaderName.fromString("x-ms-request-server-encrypted")); + return value == null ? null : Boolean.parseBoolean(value); + } + + /** + * Reads x-ms-encryption-key-sha256 from the raw response headers, for operations whose generated response + * headers don't model it (for example Clear Pages). + * + * @param headers The raw response headers. + * @return The SHA-256 hash of the customer-provided encryption key, or null if the header is absent. + */ + public static String getEncryptionKeySha256(HttpHeaders headers) { + return getHeaderValue(headers, HttpHeaderName.fromString("x-ms-encryption-key-sha256")); + } + + // azure-core context key (HttpUtils.AZURE_STREAM_RESPONSE_BODY) that opts a call in to streaming its BinaryData + // response body instead of buffering it. + private static final String STREAM_RESPONSE_BODY = "azure-stream-response-body"; + + /** + * Adds the azure-core streaming opt-in to a context, so the generated layer returns the response body as a stream + * rather than buffering it. Downloads and queries need this: an error part-way through then surfaces while reading, + * where the retriable download can resume, and large blobs aren't held in memory. + * + * @param context The context of the call; may be null. + * @return The context with streaming enabled. + */ + public static Context streamingContext(Context context) { + return (context == null ? Context.NONE : context).addData(STREAM_RESPONSE_BODY, true); + } + + /** + * Adapts a streamed generated response to the {@link StreamResponse} the download and query responses are built + * on. The body must have been requested with {@link #streamingContext(Context)} so it's read lazily. + * + * @param response The generated response with a streamed body. + * @return The equivalent {@link StreamResponse}. + */ + @SuppressWarnings("deprecation") // StreamResponse(HttpResponse) needs the raw response, which RestProxy doesn't expose. + public static StreamResponse toStreamResponse(Response response) { + return new StreamResponse(response.getRequest(), response.getStatusCode(), response.getHeaders(), + response.getValue().toFluxByteBuffer()); + } + public static String getETag(HttpHeaders headers) { return getHeaderValue(headers, HttpHeaderName.ETAG); } @@ -636,7 +723,9 @@ private static URI toEndpointUri(String endpoint) { } public static BlobQueryHeaders transformQueryHeaders(BlobsQueryHeaders headers, HttpHeaders rawHeaders) { - return BlobQueryHeadersConstructorProxy.create(headers).setErrorCode(ModelHelper.getErrorCode(rawHeaders)); + return BlobQueryHeadersConstructorProxy.create(headers) + .setErrorCode(getErrorCode(rawHeaders)) + .setContentType(getHeaderValue(rawHeaders, HttpHeaderName.CONTENT_TYPE)); } public static void validateConditionsNotPresent(BlobRequestConditions requestConditions, @@ -886,19 +975,17 @@ OffsetDateTime.now will only give back milliseconds (more precise fields are zer } /** - * Maps the internal exception to a public exception, if and only if {@code internal} is an instance of - * {@link BlobStorageExceptionInternal} and it will be mapped to {@link BlobStorageException}. - *

- * The internal exception is required as the public exception was created using Object as the exception value. This - * was incorrect and should have been a specific type that was XML deserializable. So, an internal exception was - * added to handle this, and we map that to the public exception, keeping the API the same. + * Maps the generated {@link BlobStorageErrorException} to the public {@link BlobStorageException}, which is the + * exception type the clients have always thrown. The message is enriched from the deserialized error body (for + * example, the x-ms-version mismatch hint, which relies on the error's {@code HeaderName}). * - * @param internal The internal exception. + * @param internal The exception thrown by the generated implementation layer. * @return The public exception. */ - public static BlobStorageException mapToBlobStorageException(BlobStorageExceptionInternal internal) { - String code = internal.getValue() == null ? null : internal.getValue().getCode(); - String headerName = internal.getValue() == null ? null : internal.getValue().getHeaderName(); + public static BlobStorageException mapToBlobStorageException(BlobStorageErrorException internal) { + BlobStorageError error = internal.getValue(); + String code = error == null || error.getCode() == null ? null : error.getCode().toString(); + String headerName = error == null ? null : error.getHeaderName(); return new BlobStorageException(StorageImplUtils.convertStorageExceptionMessage(internal.getMessage(), internal.getResponse(), code, headerName), internal.getResponse(), internal.getValue()); } @@ -973,6 +1060,87 @@ && resolveSerializationFormat(options.getStorageResponseSerializationFormat()) } } + /** + * Serializes an {@link XmlSerializable} request body into XML {@link BinaryData} for the protocol layer. + *

+ * The generated protocol methods take the request body as {@link BinaryData}; the hand-written clients use this + * to encode the typed model the same way the AutoRest convenience methods did. + * + * @param value The value to serialize; may be {@code null}. + * @return The XML-encoded {@link BinaryData}, or {@code null} when {@code value} is {@code null}. + */ + public static BinaryData serializeXmlBody(XmlSerializable value) { + if (value == null) { + return null; + } + try { + ByteArrayOutputStream stream = new ByteArrayOutputStream(); + try (XmlWriter xmlWriter = XmlWriter.toStream(stream)) { + value.toXml(xmlWriter); + xmlWriter.flush(); + } + return BinaryData.fromBytes(stream.toByteArray()); + } catch (XMLStreamException e) { + throw LOGGER.logExceptionAsError(new RuntimeException(e)); + } + } + + /** + * Deserializes an XML protocol-response body into the given model. + *

+ * The generated protocol methods return the response body as {@link BinaryData}; the hand-written clients use + * this to reconstruct the typed model via its generated {@code fromXml(XmlReader)} factory, matching the value + * the AutoRest convenience methods returned directly. + * + * @param data The raw XML body; may be {@code null}. + * @param deserializer The model's {@code fromXml} factory. + * @param The deserialized type. + * @return The deserialized model, or {@code null} when {@code data} is {@code null}. + */ + public static T deserializeXmlBody(BinaryData data, XmlDeserializer deserializer) { + if (data == null) { + return null; + } + try (XmlReader xmlReader = XmlReader.fromBytes(data.toBytes())) { + return deserializer.deserialize(xmlReader); + } catch (XMLStreamException e) { + throw LOGGER.logExceptionAsError(new RuntimeException(e)); + } + } + + /** + * Functional interface matching the generated {@code fromXml(XmlReader)} factory methods so protocol responses + * can be deserialized generically. + * + * @param The deserialized type. + */ + @FunctionalInterface + public interface XmlDeserializer { + /** + * Deserializes an instance of {@code T} from the reader. + * + * @param reader The {@link XmlReader} positioned at the body. + * @return The deserialized instance. + * @throws XMLStreamException If deserialization fails. + */ + T deserialize(XmlReader reader) throws XMLStreamException; + } + + /** + * Maps the public {@link BlobCopySourceTagsMode} onto the generated {@link BlobCopySourceTags}. + *

+ * The spec models the copy source tags mode as a closed enum, so the emitter generates an internal + * {@code enum} while the shipped public type is an {@link com.azure.core.util.ExpandableStringEnum}. Both carry + * the same wire values, so the bridge is a value lookup. Remove once the spec exposes the type as an open union + * named {@code BlobCopySourceTagsMode} for java. + * + * @param mode The public copy source tags mode; may be {@code null}. + * @return The generated equivalent, or {@code null} if {@code mode} is {@code null}. + */ + public static BlobCopySourceTags toCopySourceTags(BlobCopySourceTagsMode mode) { + return mode == null ? null : BlobCopySourceTags.fromString(mode.toString()); + } + private ModelHelper() { } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/RequestOptionsHelper.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/RequestOptionsHelper.java new file mode 100644 index 0000000000000..94380eeacec77 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/RequestOptionsHelper.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.storage.blob.implementation.util; + +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.Context; +import com.azure.core.util.UrlBuilder; +import com.azure.storage.common.Utility; + +import java.net.MalformedURLException; +import java.nio.charset.StandardCharsets; +import java.net.URL; + +import java.util.List; +import java.util.Objects; + +/** + * Builds the {@link RequestOptions} passed to the generated {@code implementation/*Impl} protocol methods. + *

+ * The TypeSpec migration replaces the AutoRest explicit-parameter operation methods (which took every query + * parameter, header, and body as a typed argument) with protocol-style {@code xxxWithResponse(RequestOptions)} + * methods. The hand-written Blob clients keep their public API but translate their typed inputs into the storage + * wire contract through these helpers, so the emitted request matches the pre-migration (AutoRest) behavior. + *

+ * Route-level query parameters (e.g. {@code ?restype=service&comp=properties}) are baked into the generated + * service interface, and {@code x-ms-version}/{@code Accept} are added by the impl, so those are not set here. + */ +public final class RequestOptionsHelper { + + private RequestOptionsHelper() { + } + + /** + * Creates a {@link RequestOptions} for a protocol call, threading the supplied {@link Context}. + * + * @param context The {@link Context} to thread through the pipeline; may be {@code null}. + * @return A new {@link RequestOptions}. + */ + public static RequestOptions requestOptions(Context context) { + RequestOptions requestOptions = new RequestOptions(); + if (context != null) { + requestOptions.setContext(context); + } + return requestOptions; + } + + /** + * Adds the List Blobs query parameters, for the Arrow listings, which are called through their protocol methods. + * + * @param requestOptions The {@link RequestOptions} to mutate. + * @param prefix Filters the results to blobs whose names begin with this prefix; may be null. + * @param marker The continuation marker; may be null. + * @param maxResults The maximum number of blobs to return; may be null. + * @param include The datasets to include in the response; may be null or empty. + * @param startFrom The blob name to start listing from; may be null. + * @param endBefore The blob name to end listing before; may be null. + * @return The same {@link RequestOptions}. + */ + public static RequestOptions addListBlobsQueryParams(RequestOptions requestOptions, String prefix, String marker, + Integer maxResults, List include, String startFrom, String endBefore) { + addOptionalQueryParam(requestOptions, "prefix", prefix); + addOptionalQueryParam(requestOptions, "marker", marker); + addOptionalQueryParam(requestOptions, "maxresults", maxResults); + addOptionalCsvQueryParam(requestOptions, "include", include); + addOptionalQueryParam(requestOptions, "startFrom", startFrom); + addOptionalQueryParam(requestOptions, "endBefore", endBefore); + return requestOptions; + } + + /** + * Adds an optional query parameter to {@code requestOptions} when {@code value} is non-null, matching the + * AutoRest behavior of omitting the parameter entirely when it has no value. + * + * @param requestOptions The {@link RequestOptions} to mutate. + * @param name The query parameter name. + * @param value The value; when {@code null} the parameter is not added. + */ + public static void addOptionalQueryParam(RequestOptions requestOptions, String name, Object value) { + if (value != null) { + requestOptions.addQueryParam(name, String.valueOf(value)); + } + } + + /** + * Adds a comma-joined query parameter when {@code values} is non-null and non-empty. + *

+ * AutoRest omitted the parameter entirely when the collection was empty rather than sending an empty value, and + * recorded sessions depend on that: sending {@code include=} would not match. + * + * @param requestOptions The {@link RequestOptions} to mutate. + * @param name The query parameter name. + * @param values The values to join; when {@code null} or empty the parameter is not added. + */ + public static void addOptionalCsvQueryParam(RequestOptions requestOptions, String name, List values) { + if (values == null || values.isEmpty()) { + return; + } + StringBuilder joined = new StringBuilder(); + for (Object value : values) { + if (joined.length() > 0) { + joined.append(','); + } + joined.append(Objects.toString(value, "")); + } + requestOptions.addQueryParam(name, joined.toString()); + } + + /** + * Builds a {@link RequestOptions} scoped to a container-level operation ({@code {containerName}}). + * + * @param context The {@link Context} to thread through the pipeline. + * @param baseUrl The client's account-scoped base URL. + * @param containerName The container name. + * @return The scoped {@link RequestOptions}. + */ + public static RequestOptions containerRequestOptions(Context context, String baseUrl, String containerName) { + RequestOptions requestOptions = requestOptions(context); + scopeRequestToResourcePath(requestOptions, resourcePath(baseUrl, encodePathSegment(containerName))); + return requestOptions; + } + + /** + * Builds a {@link RequestOptions} scoped to a blob-level operation ({@code {containerName}/{blobName}}). + * + * @param context The {@link Context} to thread through the pipeline. + * @param baseUrl The client's account-scoped base URL. + * @param containerName The container name. + * @param blobName The blob name; may contain path separators and characters requiring encoding. + * @return The scoped {@link RequestOptions}. + */ + public static RequestOptions blobRequestOptions(Context context, String baseUrl, String containerName, + String blobName) { + RequestOptions requestOptions = requestOptions(context); + scopeRequestToResourcePath(requestOptions, + resourcePath(baseUrl, encodePathSegment(containerName) + "/" + encodePathSegment(blobName))); + return requestOptions; + } + + /** + /** + * Percent-encodes a single path segment the way {@code RestProxy} encodes an unencoded {@code @PathParam}, which + * is what the generated layer did before the resource path moved onto the request options. + *

+ * {@link Utility#urlEncode(String)} is not equivalent: it escapes the sub-delimiters that RFC 3986 allows + * unescaped in a path segment, so the well-known container names {@code $root}, {@code $logs} and {@code $web} + * would go out as {@code %24root} and friends, which is not the URL the service or the recordings expect. + * + * @param segment The single path segment to encode; must not contain a separator. + * @return The encoded segment. + */ + private static String encodePathSegment(String segment) { + if (segment == null || segment.isEmpty()) { + return segment; + } + StringBuilder encoded = new StringBuilder(segment.length()); + for (byte b : segment.getBytes(StandardCharsets.UTF_8)) { + int c = b & 0xFF; + if (isPathSegmentSafe(c)) { + encoded.append((char) c); + } else { + encoded.append('%').append(String.format("%02X", c)); + } + } + return encoded.toString(); + } + + /** RFC 3986 pchar minus the percent sign: unreserved / sub-delims / ":" / "@". */ + private static boolean isPathSegmentSafe(int c) { + return (c >= 'A' && c <= 'Z') + || (c >= 'a' && c <= 'z') + || (c >= '0' && c <= '9') + || "-._~!$&'()*+,;=:@".indexOf(c) >= 0; + } + + /** + * Prefixes the resource path with the base URL's account path, which is present for path-style endpoints (e.g. + * the Azurite emulator's {@code http://host/devstoreaccount1}) and empty for standard {@code account.blob.*} + * endpoints where the account is the host. Required because {@link #scopeRequestToResourcePath} sets the whole + * URL path, so the account segment must be reintroduced explicitly. + */ + private static String resourcePath(String baseUrl, String resource) { + String accountPath = UrlBuilder.parse(baseUrl).getPath(); + if (accountPath == null || accountPath.isEmpty() || "/".equals(accountPath)) { + return resource; + } + return accountPath.replaceAll("/+$", "") + "/" + resource; + } + + /** + * The generated protocol methods target the account-scoped service URL; this appends the resource path to the + * request URL while preserving the route's query parameters. + *

+ * The path arrives already encoded, one component at a time, exactly as {@code BlobAsyncClientBase.getBlobUrl()} + * builds it: the separator between container and blob stays literal while each component is percent-encoded. + * Encoding the assembled path instead would turn that separator into {@code %2F} and address a blob whose name + * contains a slash rather than a blob inside the container. + * + * @param requestOptions The {@link RequestOptions} to scope. + * @param resourcePath The already-encoded resource path to set on the request URL. + */ + public static void scopeRequestToResourcePath(RequestOptions requestOptions, String resourcePath) { + requestOptions.addRequestCallback(request -> { + UrlBuilder urlBuilder = UrlBuilder.parse(request.getUrl()); + urlBuilder.setPath(resourcePath); + try { + request.setUrl(new URL(urlBuilder.toString())); + } catch (MalformedURLException e) { + throw new IllegalStateException(e); + } + }); + } +} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/SessionAcquirer.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/SessionAcquirer.java index 956757e0f642a..7a57b4022fbb6 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/SessionAcquirer.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/SessionAcquirer.java @@ -12,7 +12,7 @@ import com.azure.core.util.logging.ClientLogger; 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.BlobContainerAsyncClientInternal; import com.azure.storage.blob.implementation.models.AuthenticationType; import com.azure.storage.blob.implementation.models.CreateSessionConfiguration; import com.azure.storage.blob.implementation.models.CreateSessionResponse; @@ -75,11 +75,8 @@ final class SessionAcquirer { * @return This acquirer. */ SessionAcquirer bind(HttpPipeline pipeline) { - this.azureBlobStorage - = new AzureBlobStorageImplBuilder().pipeline(Objects.requireNonNull(pipeline, "'pipeline' cannot be null.")) - .url(endpoint) - .version(serviceVersion.getVersion()) - .buildClient(); + this.azureBlobStorage = new AzureBlobStorageImpl(Objects.requireNonNull(pipeline, "'pipeline' cannot be null."), + endpoint, serviceVersion); return this; } @@ -120,12 +117,13 @@ Mono> createSessionAsync(String containerName, C new IllegalStateException("The session acquirer has not been bound to a pipeline."))); } - CreateSessionConfiguration config - = new CreateSessionConfiguration().setAuthenticationType(AuthenticationType.HMAC); + CreateSessionConfiguration config = new CreateSessionConfiguration(AuthenticationType.HMAC); Context acquisitionContext = context.addData(SESSION_ACQUISITION_CONTEXT_KEY, true) .addData(DataLocalityPolicy.LAYOUT_ENDPOINT_KEY, ""); - return client.getContainers() - .createSessionWithResponseAsync(containerName, config, null, null, acquisitionContext); + return new BlobContainerAsyncClientInternal(client.getContainers()) + .createSessionWithResponse(config, null, + RequestOptionsHelper.containerRequestOptions(acquisitionContext, client.getUrl(), containerName)) + .map(response -> response); } /** 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 a8130c00f2c6c..ec50ad7fbb172 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; @@ -9,107 +9,107 @@ import java.util.Collection; /** - * Defines values for AccessTier. + * The access tiers. */ public final class AccessTier extends ExpandableStringEnum { /** - * Static value P4 for AccessTier. + * The P4 access tier. */ @Generated public static final AccessTier P4 = fromString("P4"); /** - * Static value P6 for AccessTier. + * The P6 access tier. */ @Generated public static final AccessTier P6 = fromString("P6"); /** - * Static value P10 for AccessTier. + * The P10 access tier. */ @Generated public static final AccessTier P10 = fromString("P10"); /** - * Static value P15 for AccessTier. + * The P15 access tier. */ @Generated public static final AccessTier P15 = fromString("P15"); /** - * Static value P20 for AccessTier. + * The P20 access tier. */ @Generated public static final AccessTier P20 = fromString("P20"); /** - * Static value P30 for AccessTier. + * The P30 access tier. */ @Generated public static final AccessTier P30 = fromString("P30"); /** - * Static value P40 for AccessTier. + * The P40 access tier. */ @Generated public static final AccessTier P40 = fromString("P40"); /** - * Static value P50 for AccessTier. + * The P50 access tier. */ @Generated public static final AccessTier P50 = fromString("P50"); /** - * Static value P60 for AccessTier. + * The P60 access tier. */ @Generated public static final AccessTier P60 = fromString("P60"); /** - * Static value P70 for AccessTier. + * The P70 access tier. */ @Generated public static final AccessTier P70 = fromString("P70"); /** - * Static value P80 for AccessTier. + * The P80 access tier. */ @Generated public static final AccessTier P80 = fromString("P80"); /** - * Static value Hot for AccessTier. + * The Hot access tier. */ @Generated public static final AccessTier HOT = fromString("Hot"); /** - * Static value Cool for AccessTier. + * The Cool access tier. */ @Generated public static final AccessTier COOL = fromString("Cool"); /** - * Static value Archive for AccessTier. + * The Archive access tier. */ @Generated public static final AccessTier ARCHIVE = fromString("Archive"); /** - * Static value Premium for AccessTier. + * The Premium access tier. */ @Generated public static final AccessTier PREMIUM = fromString("Premium"); /** - * Static value Cold for AccessTier. + * The Cold access tier. */ @Generated public static final AccessTier COLD = fromString("Cold"); /** - * Static value Smart for AccessTier. + * The Smart access tier. */ @Generated public static final AccessTier SMART = fromString("Smart"); 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 4223a28e59a07..9a72c860cc6d8 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 @@ -1,35 +1,35 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; /** - * Defines values for AccountKind. + * The account kind. */ public enum AccountKind { /** - * Enum value Storage. + * A general-purpose account. */ STORAGE("Storage"), /** - * Enum value BlobStorage. + * A blob storage account. */ BLOB_STORAGE("BlobStorage"), /** - * Enum value StorageV2. + * A storage V2 account. */ STORAGE_V2("StorageV2"), /** - * Enum value FileStorage. + * A file storage account. */ FILE_STORAGE("FileStorage"), /** - * Enum value BlockBlobStorage. + * A block blob storage account. */ BLOCK_BLOB_STORAGE("BlockBlobStorage"); 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 07f0843fd32b3..1086886085c1f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; @@ -9,29 +9,29 @@ import java.util.Collection; /** - * Defines values for ArchiveStatus. + * The archive status. */ public final class ArchiveStatus extends ExpandableStringEnum { /** - * Static value rehydrate-pending-to-hot for ArchiveStatus. + * The archive status is rehydrating pending to Hot. */ @Generated public static final ArchiveStatus REHYDRATE_PENDING_TO_HOT = fromString("rehydrate-pending-to-hot"); /** - * Static value rehydrate-pending-to-cool for ArchiveStatus. + * The archive status is rehydrating pending to Cool. */ @Generated public static final ArchiveStatus REHYDRATE_PENDING_TO_COOL = fromString("rehydrate-pending-to-cool"); /** - * Static value rehydrate-pending-to-cold for ArchiveStatus. + * The archive status is rehydrating pending to Cold. */ @Generated public static final ArchiveStatus REHYDRATE_PENDING_TO_COLD = fromString("rehydrate-pending-to-cold"); /** - * Static value rehydrate-pending-to-smart for ArchiveStatus. + * The archive status is rehydrating pending to Smart. */ @Generated public static final ArchiveStatus REHYDRATE_PENDING_TO_SMART = fromString("rehydrate-pending-to-smart"); 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 d682f94526aa2..7b302fe6c39a5 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,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -17,24 +16,25 @@ import javax.xml.stream.XMLStreamException; /** - * An Access policy. + * Represents an access policy. */ @Fluent public final class BlobAccessPolicy implements XmlSerializable { + /* - * the date-time the policy is active + * The date-time the policy is active. */ @Generated private OffsetDateTime startsOn; /* - * the date-time the policy expires + * The date-time the policy expires. */ @Generated private OffsetDateTime expiresOn; /* - * the permissions for the acl policy + * The permissions for the policy. */ @Generated private String permissions; @@ -47,8 +47,8 @@ public BlobAccessPolicy() { } /** - * Get the startsOn property: the date-time the policy is active. - * + * Get the startsOn property: The date-time the policy is active. + * * @return the startsOn value. */ @Generated @@ -57,8 +57,8 @@ public OffsetDateTime getStartsOn() { } /** - * Set the startsOn property: the date-time the policy is active. - * + * Set the startsOn property: The date-time the policy is active. + * * @param startsOn the startsOn value to set. * @return the BlobAccessPolicy object itself. */ @@ -69,8 +69,8 @@ public BlobAccessPolicy setStartsOn(OffsetDateTime startsOn) { } /** - * Get the expiresOn property: the date-time the policy expires. - * + * Get the expiresOn property: The date-time the policy expires. + * * @return the expiresOn value. */ @Generated @@ -79,8 +79,8 @@ public OffsetDateTime getExpiresOn() { } /** - * Set the expiresOn property: the date-time the policy expires. - * + * Set the expiresOn property: The date-time the policy expires. + * * @param expiresOn the expiresOn value to set. * @return the BlobAccessPolicy object itself. */ @@ -91,8 +91,8 @@ public BlobAccessPolicy setExpiresOn(OffsetDateTime expiresOn) { } /** - * Get the permissions property: the permissions for the acl policy. - * + * Get the permissions property: The permissions for the policy. + * * @return the permissions value. */ @Generated @@ -101,8 +101,8 @@ public String getPermissions() { } /** - * Set the permissions property: the permissions for the acl policy. - * + * Set the permissions property: The permissions for the policy. + * * @param permissions the permissions value to set. * @return the BlobAccessPolicy object itself. */ @@ -121,7 +121,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = rootElementName == null || rootElementName.isEmpty() ? "BlobAccessPolicy" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "AccessPolicy" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("Start", this.startsOn == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startsOn)); @@ -133,7 +133,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. @@ -146,7 +146,7 @@ public static BlobAccessPolicy fromXml(XmlReader xmlReader) throws XMLStreamExce /** * 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. @@ -157,12 +157,11 @@ public static BlobAccessPolicy fromXml(XmlReader xmlReader) throws XMLStreamExce @Generated public static BlobAccessPolicy fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { String finalRootElementName - = rootElementName == null || rootElementName.isEmpty() ? "BlobAccessPolicy" : rootElementName; + = rootElementName == null || rootElementName.isEmpty() ? "AccessPolicy" : 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 -> CoreUtils.parseBestOffsetDateTime(dateString)); @@ -175,7 +174,6 @@ public static BlobAccessPolicy fromXml(XmlReader xmlReader, String rootElementNa 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 35e118e14aceb..3f7ef607da728 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,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -14,36 +13,37 @@ import javax.xml.stream.XMLStreamException; /** - * Azure Analytics Logging settings. + * Azure Analytics logging settings. */ @Fluent public final class BlobAnalyticsLogging implements XmlSerializable { + /* - * The version of Storage Analytics to configure. + * The version of the logging properties. */ @Generated private String version; /* - * Indicates whether all delete requests should be logged. + * Whether delete operation is logged. */ @Generated private boolean delete; /* - * Indicates whether all read requests should be logged. + * Whether read operation is logged. */ @Generated private boolean read; /* - * Indicates whether all write requests should be logged. + * Whether write operation is logged. */ @Generated private boolean write; /* - * the retention policy which determines how long the associated data should persist + * The retention policy of the logs. */ @Generated private BlobRetentionPolicy retentionPolicy; @@ -56,8 +56,27 @@ public BlobAnalyticsLogging() { } /** - * Get the version property: The version of Storage Analytics to configure. - * + * Creates an instance of BlobAnalyticsLogging class. + * + * @param version the version value to set. + * @param delete the delete value to set. + * @param read the read value to set. + * @param write the write value to set. + * @param retentionPolicy the retentionPolicy value to set. + */ + @Generated + private BlobAnalyticsLogging(String version, boolean delete, boolean read, boolean write, + BlobRetentionPolicy retentionPolicy) { + this.version = version; + this.delete = delete; + this.read = read; + this.write = write; + this.retentionPolicy = retentionPolicy; + } + + /** + * Get the version property: The version of the logging properties. + * * @return the version value. */ @Generated @@ -66,8 +85,8 @@ public String getVersion() { } /** - * Set the version property: The version of Storage Analytics to configure. - * + * Set the version property. + * * @param version the version value to set. * @return the BlobAnalyticsLogging object itself. */ @@ -78,8 +97,8 @@ public BlobAnalyticsLogging setVersion(String version) { } /** - * Get the delete property: Indicates whether all delete requests should be logged. - * + * Get the delete property: Whether delete operation is logged. + * * @return the delete value. */ @Generated @@ -88,8 +107,8 @@ public boolean isDelete() { } /** - * Set the delete property: Indicates whether all delete requests should be logged. - * + * Set the delete property. + * * @param delete the delete value to set. * @return the BlobAnalyticsLogging object itself. */ @@ -100,8 +119,8 @@ public BlobAnalyticsLogging setDelete(boolean delete) { } /** - * Get the read property: Indicates whether all read requests should be logged. - * + * Get the read property: Whether read operation is logged. + * * @return the read value. */ @Generated @@ -110,8 +129,8 @@ public boolean isRead() { } /** - * Set the read property: Indicates whether all read requests should be logged. - * + * Set the read property. + * * @param read the read value to set. * @return the BlobAnalyticsLogging object itself. */ @@ -122,8 +141,8 @@ public BlobAnalyticsLogging setRead(boolean read) { } /** - * Get the write property: Indicates whether all write requests should be logged. - * + * Get the write property: Whether write operation is logged. + * * @return the write value. */ @Generated @@ -132,8 +151,8 @@ public boolean isWrite() { } /** - * Set the write property: Indicates whether all write requests should be logged. - * + * Set the write property. + * * @param write the write value to set. * @return the BlobAnalyticsLogging object itself. */ @@ -144,9 +163,8 @@ public BlobAnalyticsLogging setWrite(boolean write) { } /** - * Get the retentionPolicy property: the retention policy which determines how long the associated data should - * persist. - * + * Get the retentionPolicy property: The retention policy of the logs. + * * @return the retentionPolicy value. */ @Generated @@ -155,9 +173,8 @@ public BlobRetentionPolicy getRetentionPolicy() { } /** - * Set the retentionPolicy property: the retention policy which determines how long the associated data should - * persist. - * + * Set the retentionPolicy property. + * * @param retentionPolicy the retentionPolicy value to set. * @return the BlobAnalyticsLogging object itself. */ @@ -176,8 +193,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName - = rootElementName == null || rootElementName.isEmpty() ? "BlobAnalyticsLogging" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "Logging" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("Version", this.version); xmlWriter.writeBooleanElement("Delete", this.delete); @@ -189,10 +205,11 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. */ @Generated @@ -202,40 +219,42 @@ public static BlobAnalyticsLogging fromXml(XmlReader xmlReader) throws XMLStream /** * 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. */ @Generated public static BlobAnalyticsLogging fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { String finalRootElementName - = rootElementName == null || rootElementName.isEmpty() ? "BlobAnalyticsLogging" : rootElementName; + = rootElementName == null || rootElementName.isEmpty() ? "Logging" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - BlobAnalyticsLogging deserializedBlobAnalyticsLogging = new BlobAnalyticsLogging(); + String version = null; + boolean delete = false; + boolean read = false; + boolean write = false; + BlobRetentionPolicy retentionPolicy = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); - if ("Version".equals(elementName.getLocalPart())) { - deserializedBlobAnalyticsLogging.version = reader.getStringElement(); + version = reader.getStringElement(); } else if ("Delete".equals(elementName.getLocalPart())) { - deserializedBlobAnalyticsLogging.delete = reader.getBooleanElement(); + delete = reader.getBooleanElement(); } else if ("Read".equals(elementName.getLocalPart())) { - deserializedBlobAnalyticsLogging.read = reader.getBooleanElement(); + read = reader.getBooleanElement(); } else if ("Write".equals(elementName.getLocalPart())) { - deserializedBlobAnalyticsLogging.write = reader.getBooleanElement(); + write = reader.getBooleanElement(); } else if ("RetentionPolicy".equals(elementName.getLocalPart())) { - deserializedBlobAnalyticsLogging.retentionPolicy - = BlobRetentionPolicy.fromXml(reader, "RetentionPolicy"); + retentionPolicy = BlobRetentionPolicy.fromXml(reader, "RetentionPolicy"); } else { reader.skipElement(); } } - - return deserializedBlobAnalyticsLogging; + return new BlobAnalyticsLogging(version, delete, read, write, retentionPolicy); }); } } 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 d656d50997607..f5865210ccd67 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,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// This file is not generated. The Blob TypeSpec does not describe it, so it is maintained by hand; +// edits here are preserved across regeneration. package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; 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 94cf4b5262443..fb769130b9887 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 @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -16,36 +15,37 @@ import javax.xml.stream.XMLStreamException; /** - * An Azure Storage container. + * Represents a container. */ @Fluent public final class BlobContainerItem implements XmlSerializable { + /* - * The Name property. + * The name of the container. */ @Generated private String name; /* - * The Deleted property. + * Whether the container is soft-deleted. */ @Generated private Boolean deleted; /* - * The Version property. + * The version of the container. */ @Generated private String version; /* - * Properties of a container + * The properties of the container. */ @Generated private BlobContainerItemProperties properties; /* - * Dictionary of + * The metadata of the container. */ @Generated private Map metadata; @@ -58,8 +58,20 @@ public BlobContainerItem() { } /** - * Get the name property: The Name property. - * + * Creates an instance of BlobContainerItem class. + * + * @param name the name value to set. + * @param properties the properties value to set. + */ + @Generated + private BlobContainerItem(String name, BlobContainerItemProperties properties) { + this.name = name; + this.properties = properties; + } + + /** + * Get the name property: The name of the container. + * * @return the name value. */ @Generated @@ -68,8 +80,8 @@ public String getName() { } /** - * Set the name property: The Name property. - * + * Set the name property. + * * @param name the name value to set. * @return the BlobContainerItem object itself. */ @@ -80,8 +92,8 @@ public BlobContainerItem setName(String name) { } /** - * Get the deleted property: The Deleted property. - * + * Get the deleted property: Whether the container is soft-deleted. + * * @return the deleted value. */ @Generated @@ -90,8 +102,8 @@ public Boolean isDeleted() { } /** - * Set the deleted property: The Deleted property. - * + * Set the deleted property. + * * @param deleted the deleted value to set. * @return the BlobContainerItem object itself. */ @@ -102,8 +114,8 @@ public BlobContainerItem setDeleted(Boolean deleted) { } /** - * Get the version property: The Version property. - * + * Get the version property: The version of the container. + * * @return the version value. */ @Generated @@ -112,8 +124,8 @@ public String getVersion() { } /** - * Set the version property: The Version property. - * + * Set the version property. + * * @param version the version value to set. * @return the BlobContainerItem object itself. */ @@ -124,8 +136,8 @@ public BlobContainerItem setVersion(String version) { } /** - * Get the properties property: Properties of a container. - * + * Get the properties property: The properties of the container. + * * @return the properties value. */ @Generated @@ -134,8 +146,8 @@ public BlobContainerItemProperties getProperties() { } /** - * Set the properties property: Properties of a container. - * + * Set the properties property. + * * @param properties the properties value to set. * @return the BlobContainerItem object itself. */ @@ -146,8 +158,8 @@ public BlobContainerItem setProperties(BlobContainerItemProperties properties) { } /** - * Get the metadata property: Dictionary of <string>. - * + * Get the metadata property: The metadata of the container. + * * @return the metadata value. */ @Generated @@ -156,8 +168,8 @@ public Map getMetadata() { } /** - * Set the metadata property: Dictionary of <string>. - * + * Set the metadata property. + * * @param metadata the metadata value to set. * @return the BlobContainerItem object itself. */ @@ -194,10 +206,11 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. */ @Generated @@ -207,12 +220,13 @@ public static BlobContainerItem fromXml(XmlReader xmlReader) throws XMLStreamExc /** * 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. */ @Generated @@ -220,32 +234,36 @@ public static BlobContainerItem fromXml(XmlReader xmlReader, String rootElementN String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "Container" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - BlobContainerItem deserializedBlobContainerItem = new BlobContainerItem(); + String name = null; + Boolean deleted = null; + String version = null; + BlobContainerItemProperties properties = null; + Map metadata = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); - if ("Name".equals(elementName.getLocalPart())) { - deserializedBlobContainerItem.name = reader.getStringElement(); + name = reader.getStringElement(); } else if ("Deleted".equals(elementName.getLocalPart())) { - deserializedBlobContainerItem.deleted = reader.getNullableElement(Boolean::parseBoolean); + deleted = reader.getNullableElement(Boolean::parseBoolean); } else if ("Version".equals(elementName.getLocalPart())) { - deserializedBlobContainerItem.version = reader.getStringElement(); + version = reader.getStringElement(); } else if ("Properties".equals(elementName.getLocalPart())) { - deserializedBlobContainerItem.properties - = BlobContainerItemProperties.fromXml(reader, "Properties"); + 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<>(); + if (metadata == null) { + metadata = new LinkedHashMap<>(); } - deserializedBlobContainerItem.metadata.put(reader.getElementName().getLocalPart(), - reader.getStringElement()); + metadata.put(reader.getElementName().getLocalPart(), reader.getStringElement()); } } else { reader.skipElement(); } } - + BlobContainerItem deserializedBlobContainerItem = new BlobContainerItem(name, properties); + deserializedBlobContainerItem.deleted = deleted; + deserializedBlobContainerItem.version = version; + deserializedBlobContainerItem.metadata = metadata; 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 e6329665795af..1b6fa620303b6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -16,85 +16,85 @@ import javax.xml.stream.XMLStreamException; /** - * Properties of a container. + * The properties of a container. */ @Fluent public final class BlobContainerItemProperties implements XmlSerializable { /* - * The Last-Modified property. + * The date-time that the container was last modified. */ @Generated private DateTimeRfc1123 lastModified; /* - * The Etag property. + * The ETag of the container. */ @Generated private String eTag; /* - * The LeaseStatus property. + * The lease status of the container. */ @Generated private LeaseStatusType leaseStatus; /* - * The LeaseState property. + * The lease state of the container. */ @Generated private LeaseStateType leaseState; /* - * The LeaseDuration property. + * The lease duration of the container. */ @Generated private LeaseDurationType leaseDuration; /* - * The PublicAccess property. + * The public access type of the container. */ @Generated private PublicAccessType publicAccess; /* - * The HasImmutabilityPolicy property. + * Whether the container has an immutability policy. */ @Generated private Boolean hasImmutabilityPolicy; /* - * The HasLegalHold property. + * Whether the container has a legal hold. */ @Generated private Boolean hasLegalHold; /* - * The DefaultEncryptionScope property. + * The default encryption scope of the container. */ @Generated private String defaultEncryptionScope; /* - * The DenyEncryptionScopeOverride property. + * Whether to prevent encryption scope override. */ @Generated private Boolean encryptionScopeOverridePrevented; /* - * The DeletedTime property. + * The date-time the container was deleted. */ @Generated private DateTimeRfc1123 deletedTime; /* - * The RemainingRetentionDays property. + * The remaining retention days of the container. */ @Generated private Integer remainingRetentionDays; /* - * Indicates if version level worm is enabled on this container. + * Whether immutable storage with versioning is enabled. */ @Generated private Boolean isImmutableStorageWithVersioningEnabled; @@ -107,7 +107,23 @@ public BlobContainerItemProperties() { } /** - * Get the lastModified property: The Last-Modified property. + * Creates an instance of BlobContainerItemProperties class. + * + * @param lastModified the lastModified value to set. + * @param eTag the eTag value to set. + */ + @Generated + private BlobContainerItemProperties(OffsetDateTime lastModified, String eTag) { + if (lastModified == null) { + this.lastModified = null; + } else { + this.lastModified = new DateTimeRfc1123(lastModified); + } + this.eTag = eTag; + } + + /** + * Get the lastModified property: The date-time that the container was last modified. * * @return the lastModified value. */ @@ -120,23 +136,19 @@ public OffsetDateTime getLastModified() { } /** - * Set the lastModified property: The Last-Modified property. + * Set the lastModified property. * * @param lastModified the lastModified value to set. * @return the BlobContainerItemProperties object itself. */ @Generated public BlobContainerItemProperties setLastModified(OffsetDateTime lastModified) { - if (lastModified == null) { - this.lastModified = null; - } else { - this.lastModified = new DateTimeRfc1123(lastModified); - } + this.lastModified = lastModified == null ? null : new DateTimeRfc1123(lastModified); return this; } /** - * Get the eTag property: The Etag property. + * Get the eTag property: The ETag of the container. * * @return the eTag value. */ @@ -146,7 +158,7 @@ public String getETag() { } /** - * Set the eTag property: The Etag property. + * Set the eTag property. * * @param eTag the eTag value to set. * @return the BlobContainerItemProperties object itself. @@ -158,7 +170,7 @@ public BlobContainerItemProperties setETag(String eTag) { } /** - * Get the leaseStatus property: The LeaseStatus property. + * Get the leaseStatus property: The lease status of the container. * * @return the leaseStatus value. */ @@ -168,7 +180,7 @@ public LeaseStatusType getLeaseStatus() { } /** - * Set the leaseStatus property: The LeaseStatus property. + * Set the leaseStatus property. * * @param leaseStatus the leaseStatus value to set. * @return the BlobContainerItemProperties object itself. @@ -180,7 +192,7 @@ public BlobContainerItemProperties setLeaseStatus(LeaseStatusType leaseStatus) { } /** - * Get the leaseState property: The LeaseState property. + * Get the leaseState property: The lease state of the container. * * @return the leaseState value. */ @@ -190,7 +202,7 @@ public LeaseStateType getLeaseState() { } /** - * Set the leaseState property: The LeaseState property. + * Set the leaseState property. * * @param leaseState the leaseState value to set. * @return the BlobContainerItemProperties object itself. @@ -202,7 +214,7 @@ public BlobContainerItemProperties setLeaseState(LeaseStateType leaseState) { } /** - * Get the leaseDuration property: The LeaseDuration property. + * Get the leaseDuration property: The lease duration of the container. * * @return the leaseDuration value. */ @@ -212,7 +224,7 @@ public LeaseDurationType getLeaseDuration() { } /** - * Set the leaseDuration property: The LeaseDuration property. + * Set the leaseDuration property. * * @param leaseDuration the leaseDuration value to set. * @return the BlobContainerItemProperties object itself. @@ -224,7 +236,7 @@ public BlobContainerItemProperties setLeaseDuration(LeaseDurationType leaseDurat } /** - * Get the publicAccess property: The PublicAccess property. + * Get the publicAccess property: The public access type of the container. * * @return the publicAccess value. */ @@ -234,7 +246,7 @@ public PublicAccessType getPublicAccess() { } /** - * Set the publicAccess property: The PublicAccess property. + * Set the publicAccess property. * * @param publicAccess the publicAccess value to set. * @return the BlobContainerItemProperties object itself. @@ -246,7 +258,7 @@ public BlobContainerItemProperties setPublicAccess(PublicAccessType publicAccess } /** - * Get the hasImmutabilityPolicy property: The HasImmutabilityPolicy property. + * Get the hasImmutabilityPolicy property: Whether the container has an immutability policy. * * @return the hasImmutabilityPolicy value. */ @@ -256,7 +268,7 @@ public Boolean isHasImmutabilityPolicy() { } /** - * Set the hasImmutabilityPolicy property: The HasImmutabilityPolicy property. + * Set the hasImmutabilityPolicy property. * * @param hasImmutabilityPolicy the hasImmutabilityPolicy value to set. * @return the BlobContainerItemProperties object itself. @@ -268,7 +280,7 @@ public BlobContainerItemProperties setHasImmutabilityPolicy(Boolean hasImmutabil } /** - * Get the hasLegalHold property: The HasLegalHold property. + * Get the hasLegalHold property: Whether the container has a legal hold. * * @return the hasLegalHold value. */ @@ -278,7 +290,7 @@ public Boolean isHasLegalHold() { } /** - * Set the hasLegalHold property: The HasLegalHold property. + * Set the hasLegalHold property. * * @param hasLegalHold the hasLegalHold value to set. * @return the BlobContainerItemProperties object itself. @@ -290,7 +302,7 @@ public BlobContainerItemProperties setHasLegalHold(Boolean hasLegalHold) { } /** - * Get the defaultEncryptionScope property: The DefaultEncryptionScope property. + * Get the defaultEncryptionScope property: The default encryption scope of the container. * * @return the defaultEncryptionScope value. */ @@ -300,7 +312,7 @@ public String getDefaultEncryptionScope() { } /** - * Set the defaultEncryptionScope property: The DefaultEncryptionScope property. + * Set the defaultEncryptionScope property. * * @param defaultEncryptionScope the defaultEncryptionScope value to set. * @return the BlobContainerItemProperties object itself. @@ -312,7 +324,7 @@ public BlobContainerItemProperties setDefaultEncryptionScope(String defaultEncry } /** - * Get the encryptionScopeOverridePrevented property: The DenyEncryptionScopeOverride property. + * Get the encryptionScopeOverridePrevented property: Whether to prevent encryption scope override. * * @return the encryptionScopeOverridePrevented value. */ @@ -322,7 +334,7 @@ public boolean isEncryptionScopeOverridePrevented() { } /** - * Set the encryptionScopeOverridePrevented property: The DenyEncryptionScopeOverride property. + * Set the encryptionScopeOverridePrevented property. * * @param encryptionScopeOverridePrevented the encryptionScopeOverridePrevented value to set. * @return the BlobContainerItemProperties object itself. @@ -334,7 +346,7 @@ public BlobContainerItemProperties setEncryptionScopeOverridePrevented(boolean e } /** - * Get the deletedTime property: The DeletedTime property. + * Get the deletedTime property: The date-time the container was deleted. * * @return the deletedTime value. */ @@ -347,23 +359,19 @@ public OffsetDateTime getDeletedTime() { } /** - * Set the deletedTime property: The DeletedTime property. + * Set the deletedTime property. * * @param deletedTime the deletedTime value to set. * @return the BlobContainerItemProperties object itself. */ @Generated public BlobContainerItemProperties setDeletedTime(OffsetDateTime deletedTime) { - if (deletedTime == null) { - this.deletedTime = null; - } else { - this.deletedTime = new DateTimeRfc1123(deletedTime); - } + this.deletedTime = deletedTime == null ? null : new DateTimeRfc1123(deletedTime); return this; } /** - * Get the remainingRetentionDays property: The RemainingRetentionDays property. + * Get the remainingRetentionDays property: The remaining retention days of the container. * * @return the remainingRetentionDays value. */ @@ -373,7 +381,7 @@ public Integer getRemainingRetentionDays() { } /** - * Set the remainingRetentionDays property: The RemainingRetentionDays property. + * Set the remainingRetentionDays property. * * @param remainingRetentionDays the remainingRetentionDays value to set. * @return the BlobContainerItemProperties object itself. @@ -385,8 +393,7 @@ public BlobContainerItemProperties setRemainingRetentionDays(Integer remainingRe } /** - * Get the isImmutableStorageWithVersioningEnabled property: Indicates if version level worm is enabled on this - * container. + * Get the isImmutableStorageWithVersioningEnabled property: Whether immutable storage with versioning is enabled. * * @return the isImmutableStorageWithVersioningEnabled value. */ @@ -396,8 +403,7 @@ public Boolean isImmutableStorageWithVersioningEnabled() { } /** - * Set the isImmutableStorageWithVersioningEnabled property: Indicates if version level worm is enabled on this - * container. + * Set the isImmutableStorageWithVersioningEnabled property. * * @param isImmutableStorageWithVersioningEnabled the isImmutableStorageWithVersioningEnabled value to set. * @return the BlobContainerItemProperties object itself. @@ -419,7 +425,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { rootElementName - = rootElementName == null || rootElementName.isEmpty() ? "BlobContainerItemProperties" : rootElementName; + = rootElementName == null || rootElementName.isEmpty() ? "ContainerProperties" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("Last-Modified", Objects.toString(this.lastModified, null)); xmlWriter.writeStringElement("Etag", this.eTag); @@ -445,6 +451,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt * @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. */ @Generated @@ -460,58 +467,77 @@ public static BlobContainerItemProperties fromXml(XmlReader xmlReader) throws XM * 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. */ @Generated public static BlobContainerItemProperties fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { String finalRootElementName - = rootElementName == null || rootElementName.isEmpty() ? "BlobContainerItemProperties" : rootElementName; + = rootElementName == null || rootElementName.isEmpty() ? "ContainerProperties" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - BlobContainerItemProperties deserializedBlobContainerItemProperties = new BlobContainerItemProperties(); + OffsetDateTime lastModified = null; + String eTag = null; + LeaseStatusType leaseStatus = null; + LeaseStateType leaseState = null; + LeaseDurationType leaseDuration = null; + PublicAccessType publicAccess = null; + Boolean hasImmutabilityPolicy = null; + Boolean hasLegalHold = null; + String defaultEncryptionScope = null; + Boolean encryptionScopeOverridePrevented = null; + DateTimeRfc1123 deletedTime = null; + Integer remainingRetentionDays = null; + Boolean isImmutableStorageWithVersioningEnabled = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); if ("Last-Modified".equals(elementName.getLocalPart())) { - deserializedBlobContainerItemProperties.lastModified - = reader.getNullableElement(DateTimeRfc1123::new); + DateTimeRfc1123 lastModifiedHolder = reader.getNullableElement(DateTimeRfc1123::new); + if (lastModifiedHolder != null) { + lastModified = lastModifiedHolder.getDateTime(); + } } else if ("Etag".equals(elementName.getLocalPart())) { - deserializedBlobContainerItemProperties.eTag = reader.getStringElement(); + eTag = reader.getStringElement(); } else if ("LeaseStatus".equals(elementName.getLocalPart())) { - deserializedBlobContainerItemProperties.leaseStatus - = LeaseStatusType.fromString(reader.getStringElement()); + leaseStatus = LeaseStatusType.fromString(reader.getStringElement()); } else if ("LeaseState".equals(elementName.getLocalPart())) { - deserializedBlobContainerItemProperties.leaseState - = LeaseStateType.fromString(reader.getStringElement()); + leaseState = LeaseStateType.fromString(reader.getStringElement()); } else if ("LeaseDuration".equals(elementName.getLocalPart())) { - deserializedBlobContainerItemProperties.leaseDuration - = LeaseDurationType.fromString(reader.getStringElement()); + leaseDuration = LeaseDurationType.fromString(reader.getStringElement()); } else if ("PublicAccess".equals(elementName.getLocalPart())) { - deserializedBlobContainerItemProperties.publicAccess - = PublicAccessType.fromString(reader.getStringElement()); + publicAccess = PublicAccessType.fromString(reader.getStringElement()); } else if ("HasImmutabilityPolicy".equals(elementName.getLocalPart())) { - deserializedBlobContainerItemProperties.hasImmutabilityPolicy - = reader.getNullableElement(Boolean::parseBoolean); + hasImmutabilityPolicy = reader.getNullableElement(Boolean::parseBoolean); } else if ("HasLegalHold".equals(elementName.getLocalPart())) { - deserializedBlobContainerItemProperties.hasLegalHold - = reader.getNullableElement(Boolean::parseBoolean); + hasLegalHold = reader.getNullableElement(Boolean::parseBoolean); } else if ("DefaultEncryptionScope".equals(elementName.getLocalPart())) { - deserializedBlobContainerItemProperties.defaultEncryptionScope = reader.getStringElement(); + defaultEncryptionScope = reader.getStringElement(); } else if ("DenyEncryptionScopeOverride".equals(elementName.getLocalPart())) { - deserializedBlobContainerItemProperties.encryptionScopeOverridePrevented - = reader.getNullableElement(Boolean::parseBoolean); + encryptionScopeOverridePrevented = reader.getNullableElement(Boolean::parseBoolean); } else if ("DeletedTime".equals(elementName.getLocalPart())) { - deserializedBlobContainerItemProperties.deletedTime - = reader.getNullableElement(DateTimeRfc1123::new); + deletedTime = reader.getNullableElement(DateTimeRfc1123::new); } else if ("RemainingRetentionDays".equals(elementName.getLocalPart())) { - deserializedBlobContainerItemProperties.remainingRetentionDays - = reader.getNullableElement(Integer::parseInt); + remainingRetentionDays = reader.getNullableElement(Integer::parseInt); } else if ("ImmutableStorageWithVersioningEnabled".equals(elementName.getLocalPart())) { - deserializedBlobContainerItemProperties.isImmutableStorageWithVersioningEnabled - = reader.getNullableElement(Boolean::parseBoolean); + isImmutableStorageWithVersioningEnabled = reader.getNullableElement(Boolean::parseBoolean); } else { reader.skipElement(); } } + BlobContainerItemProperties deserializedBlobContainerItemProperties + = new BlobContainerItemProperties(lastModified, eTag); + deserializedBlobContainerItemProperties.leaseStatus = leaseStatus; + deserializedBlobContainerItemProperties.leaseState = leaseState; + deserializedBlobContainerItemProperties.leaseDuration = leaseDuration; + deserializedBlobContainerItemProperties.publicAccess = publicAccess; + deserializedBlobContainerItemProperties.hasImmutabilityPolicy = hasImmutabilityPolicy; + deserializedBlobContainerItemProperties.hasLegalHold = hasLegalHold; + deserializedBlobContainerItemProperties.defaultEncryptionScope = defaultEncryptionScope; + deserializedBlobContainerItemProperties.encryptionScopeOverridePrevented = encryptionScopeOverridePrevented; + deserializedBlobContainerItemProperties.deletedTime = deletedTime; + deserializedBlobContainerItemProperties.remainingRetentionDays = remainingRetentionDays; + deserializedBlobContainerItemProperties.isImmutableStorageWithVersioningEnabled + = isImmutableStorageWithVersioningEnabled; 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 240e1698fd690..78b7fc7336884 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 @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// This file is not generated. The Blob TypeSpec does not describe it, so it is maintained by hand; +// edits here are preserved across regeneration. package com.azure.storage.blob.models; 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 aeba92b542af2..09bbca9d6facf 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 @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -14,43 +13,37 @@ import javax.xml.stream.XMLStreamException; /** - * CORS is an HTTP feature that enables a web application running under one domain to access resources in another - * domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from - * calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs - * in another domain. + * A Cross-Origin Resource Sharing (CORS) rule. */ @Fluent 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 allowed origins. */ @Generated private String allowedOrigins; /* - * The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated) + * The allowed methods. */ @Generated private String allowedMethods; /* - * the request headers that the origin domain may specify on the CORS request. + * The allowed headers. */ @Generated 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 exposed headers. */ @Generated private String exposedHeaders; /* - * The maximum amount time that a browser should cache the preflight OPTIONS request. + * The maximum age in seconds. */ @Generated private int maxAgeInSeconds; @@ -63,11 +56,27 @@ 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. - * + * Creates an instance of BlobCorsRule class. + * + * @param allowedOrigins the allowedOrigins value to set. + * @param allowedMethods the allowedMethods value to set. + * @param allowedHeaders the allowedHeaders value to set. + * @param exposedHeaders the exposedHeaders value to set. + * @param maxAgeInSeconds the maxAgeInSeconds value to set. + */ + @Generated + private BlobCorsRule(String allowedOrigins, String allowedMethods, String allowedHeaders, String exposedHeaders, + int maxAgeInSeconds) { + this.allowedOrigins = allowedOrigins; + this.allowedMethods = allowedMethods; + this.allowedHeaders = allowedHeaders; + this.exposedHeaders = exposedHeaders; + this.maxAgeInSeconds = maxAgeInSeconds; + } + + /** + * Get the allowedOrigins property: The allowed origins. + * * @return the allowedOrigins value. */ @Generated @@ -76,11 +85,8 @@ public String getAllowedOrigins() { } /** - * Set 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. - * + * Set the allowedOrigins property. + * * @param allowedOrigins the allowedOrigins value to set. * @return the BlobCorsRule object itself. */ @@ -91,9 +97,8 @@ 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). - * + * Get the allowedMethods property: The allowed methods. + * * @return the allowedMethods value. */ @Generated @@ -102,9 +107,8 @@ public String getAllowedMethods() { } /** - * Set the allowedMethods property: The methods (HTTP request verbs) that the origin domain may use for a CORS - * request. (comma separated). - * + * Set the allowedMethods property. + * * @param allowedMethods the allowedMethods value to set. * @return the BlobCorsRule object itself. */ @@ -115,8 +119,8 @@ public BlobCorsRule setAllowedMethods(String allowedMethods) { } /** - * Get the allowedHeaders property: the request headers that the origin domain may specify on the CORS request. - * + * Get the allowedHeaders property: The allowed headers. + * * @return the allowedHeaders value. */ @Generated @@ -125,8 +129,8 @@ public String getAllowedHeaders() { } /** - * Set the allowedHeaders property: the request headers that the origin domain may specify on the CORS request. - * + * Set the allowedHeaders property. + * * @param allowedHeaders the allowedHeaders value to set. * @return the BlobCorsRule object itself. */ @@ -137,9 +141,8 @@ 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. - * + * Get the exposedHeaders property: The exposed headers. + * * @return the exposedHeaders value. */ @Generated @@ -148,9 +151,8 @@ 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. - * + * Set the exposedHeaders property. + * * @param exposedHeaders the exposedHeaders value to set. * @return the BlobCorsRule object itself. */ @@ -161,9 +163,8 @@ public BlobCorsRule setExposedHeaders(String exposedHeaders) { } /** - * Get the maxAgeInSeconds property: The maximum amount time that a browser should cache the preflight OPTIONS - * request. - * + * Get the maxAgeInSeconds property: The maximum age in seconds. + * * @return the maxAgeInSeconds value. */ @Generated @@ -172,9 +173,8 @@ public int getMaxAgeInSeconds() { } /** - * Set the maxAgeInSeconds property: The maximum amount time that a browser should cache the preflight OPTIONS - * request. - * + * Set the maxAgeInSeconds property. + * * @param maxAgeInSeconds the maxAgeInSeconds value to set. * @return the BlobCorsRule object itself. */ @@ -205,10 +205,11 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. */ @Generated @@ -218,12 +219,13 @@ public static BlobCorsRule fromXml(XmlReader xmlReader) throws XMLStreamExceptio /** * 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. */ @Generated @@ -231,26 +233,28 @@ public static BlobCorsRule fromXml(XmlReader xmlReader, String rootElementName) String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "CorsRule" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - BlobCorsRule deserializedBlobCorsRule = new BlobCorsRule(); + String allowedOrigins = null; + String allowedMethods = null; + String allowedHeaders = null; + String exposedHeaders = null; + int maxAgeInSeconds = 0; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); - if ("AllowedOrigins".equals(elementName.getLocalPart())) { - deserializedBlobCorsRule.allowedOrigins = reader.getStringElement(); + allowedOrigins = reader.getStringElement(); } else if ("AllowedMethods".equals(elementName.getLocalPart())) { - deserializedBlobCorsRule.allowedMethods = reader.getStringElement(); + allowedMethods = reader.getStringElement(); } else if ("AllowedHeaders".equals(elementName.getLocalPart())) { - deserializedBlobCorsRule.allowedHeaders = reader.getStringElement(); + allowedHeaders = reader.getStringElement(); } else if ("ExposedHeaders".equals(elementName.getLocalPart())) { - deserializedBlobCorsRule.exposedHeaders = reader.getStringElement(); + exposedHeaders = reader.getStringElement(); } else if ("MaxAgeInSeconds".equals(elementName.getLocalPart())) { - deserializedBlobCorsRule.maxAgeInSeconds = reader.getIntElement(); + maxAgeInSeconds = reader.getIntElement(); } else { reader.skipElement(); } } - - return deserializedBlobCorsRule; + return new BlobCorsRule(allowedOrigins, allowedMethods, allowedHeaders, exposedHeaders, maxAgeInSeconds); }); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadAsyncResponse.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadAsyncResponse.java index c1c62368d0932..ace3a0c7704b5 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadAsyncResponse.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobDownloadAsyncResponse.java @@ -74,8 +74,7 @@ public BlobDownloadAsyncResponse(HttpRequest request, int statusCode, HttpHeader private static BlobDownloadHeaders extractHeaders(StreamResponse response) { HttpHeaders headers = response.getHeaders(); - return ModelHelper.populateBlobDownloadHeaders(new BlobsDownloadHeaders(headers), - ModelHelper.getErrorCode(headers)); + return ModelHelper.populateBlobDownloadHeaders(new BlobsDownloadHeaders(headers), headers); } private static Flux createResponseFlux(StreamResponse sourceResponse, 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 b37fcdacb98a3..ccd96bbaf772b 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 @@ -45,6 +45,9 @@ public BlobDownloadHeaders() { */ private String errorCode; + // Not on the generated header class: the emitter drops the response's Content-Type (the body media type). + private String contentType; + /** * Get the lastModified property: Returns the date and time the container was last modified. Any operation that * modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of @@ -75,7 +78,7 @@ public BlobDownloadHeaders setLastModified(OffsetDateTime lastModified) { * @return the metadata value. */ public Map getMetadata() { - return internalHeaders.getXMsMeta(); + return internalHeaders.getMetadata(); } /** @@ -85,7 +88,7 @@ public Map getMetadata() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setMetadata(Map metadata) { - internalHeaders.setXMsMeta(metadata); + internalHeaders.setMetadata(metadata); return this; } @@ -96,7 +99,7 @@ public BlobDownloadHeaders setMetadata(Map metadata) { * @return the objectReplicationDestinationPolicyId value. */ public String getObjectReplicationDestinationPolicyId() { - return internalHeaders.getXMsOrPolicyId(); + return internalHeaders.getObjectReplicationPolicyId(); } /** @@ -107,7 +110,7 @@ public String getObjectReplicationDestinationPolicyId() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setObjectReplicationDestinationPolicyId(String objectReplicationDestinationPolicyId) { - internalHeaders.setXMsOrPolicyId(objectReplicationDestinationPolicyId); + internalHeaders.setObjectReplicationPolicyId(objectReplicationDestinationPolicyId); return this; } @@ -117,7 +120,8 @@ public BlobDownloadHeaders setObjectReplicationDestinationPolicyId(String object * @return the objectReplicationSourcePolicies value. */ public List getObjectReplicationSourcePolicies() { - return Collections.unmodifiableList(ModelHelper.getObjectReplicationSourcePolicies(internalHeaders.getXMsOr())); + return Collections.unmodifiableList( + ModelHelper.getObjectReplicationSourcePolicies(internalHeaders.getObjectReplicationRules())); } /** @@ -139,7 +143,7 @@ public List getObjectReplicationSourcePolicies() { } } - internalHeaders.setXMsOr(xMsOr); + internalHeaders.setObjectReplicationRules(xMsOr); return this; } @@ -170,7 +174,7 @@ public BlobDownloadHeaders setContentLength(Long contentLength) { * @return the contentType value. */ public String getContentType() { - return internalHeaders.getContentType(); + return contentType; } /** @@ -181,7 +185,7 @@ public String getContentType() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setContentType(String contentType) { - internalHeaders.setContentType(contentType); + this.contentType = contentType; return this; } @@ -236,7 +240,7 @@ public BlobDownloadHeaders setETag(String eTag) { * @return the contentMd5 value. */ public byte[] getContentMd5() { - return CoreUtils.clone(internalHeaders.getContentMD5()); + return CoreUtils.clone(internalHeaders.getContentMd5()); } /** @@ -247,7 +251,7 @@ public byte[] getContentMd5() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setContentMd5(byte[] contentMd5) { - internalHeaders.setContentMD5(CoreUtils.clone(contentMd5)); + internalHeaders.setContentMd5(CoreUtils.clone(contentMd5)); return this; } @@ -350,7 +354,7 @@ public BlobDownloadHeaders setContentLanguage(String contentLanguage) { * @return the blobSequenceNumber value. */ public Long getBlobSequenceNumber() { - return internalHeaders.getXMsBlobSequenceNumber(); + return internalHeaders.getBlobSequenceNumber(); } /** @@ -361,7 +365,7 @@ public Long getBlobSequenceNumber() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setBlobSequenceNumber(Long blobSequenceNumber) { - internalHeaders.setXMsBlobSequenceNumber(blobSequenceNumber); + internalHeaders.setBlobSequenceNumber(blobSequenceNumber); return this; } @@ -371,7 +375,7 @@ public BlobDownloadHeaders setBlobSequenceNumber(Long blobSequenceNumber) { * @return the blobType value. */ public BlobType getBlobType() { - return internalHeaders.getXMsBlobType(); + return internalHeaders.getBlobType(); } /** @@ -381,7 +385,7 @@ public BlobType getBlobType() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setBlobType(BlobType blobType) { - internalHeaders.setXMsBlobType(blobType); + internalHeaders.setBlobType(blobType); return this; } @@ -395,7 +399,7 @@ public BlobDownloadHeaders setBlobType(BlobType blobType) { * @return the copyCompletionTime value. */ public OffsetDateTime getCopyCompletionTime() { - return internalHeaders.getXMsCopyCompletionTime(); + return internalHeaders.getCopyCompletionTime(); } /** @@ -409,7 +413,7 @@ public OffsetDateTime getCopyCompletionTime() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setCopyCompletionTime(OffsetDateTime copyCompletionTime) { - internalHeaders.setXMsCopyCompletionTime(copyCompletionTime); + internalHeaders.setCopyCompletionTime(copyCompletionTime); return this; } @@ -422,7 +426,7 @@ public BlobDownloadHeaders setCopyCompletionTime(OffsetDateTime copyCompletionTi * @return the copyStatusDescription value. */ public String getCopyStatusDescription() { - return internalHeaders.getXMsCopyStatusDescription(); + return internalHeaders.getCopyStatusDescription(); } /** @@ -435,7 +439,7 @@ public String getCopyStatusDescription() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setCopyStatusDescription(String copyStatusDescription) { - internalHeaders.setXMsCopyStatusDescription(copyStatusDescription); + internalHeaders.setCopyStatusDescription(copyStatusDescription); return this; } @@ -446,7 +450,7 @@ public BlobDownloadHeaders setCopyStatusDescription(String copyStatusDescription * @return the copyId value. */ public String getCopyId() { - return internalHeaders.getXMsCopyId(); + return internalHeaders.getCopyId(); } /** @@ -457,7 +461,7 @@ public String getCopyId() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setCopyId(String copyId) { - internalHeaders.setXMsCopyId(copyId); + internalHeaders.setCopyId(copyId); return this; } @@ -471,7 +475,7 @@ public BlobDownloadHeaders setCopyId(String copyId) { * @return the copyProgress value. */ public String getCopyProgress() { - return internalHeaders.getXMsCopyProgress(); + return internalHeaders.getCopyProgress(); } /** @@ -485,7 +489,7 @@ public String getCopyProgress() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setCopyProgress(String copyProgress) { - internalHeaders.setXMsCopyProgress(copyProgress); + internalHeaders.setCopyProgress(copyProgress); return this; } @@ -498,7 +502,7 @@ public BlobDownloadHeaders setCopyProgress(String copyProgress) { * @return the copySource value. */ public String getCopySource() { - return internalHeaders.getXMsCopySource(); + return internalHeaders.getCopySource(); } /** @@ -511,7 +515,7 @@ public String getCopySource() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setCopySource(String copySource) { - internalHeaders.setXMsCopySource(copySource); + internalHeaders.setCopySource(copySource); return this; } @@ -522,7 +526,7 @@ public BlobDownloadHeaders setCopySource(String copySource) { * @return the copyStatus value. */ public CopyStatusType getCopyStatus() { - return internalHeaders.getXMsCopyStatus(); + return internalHeaders.getCopyStatus(); } /** @@ -533,7 +537,7 @@ public CopyStatusType getCopyStatus() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setCopyStatus(CopyStatusType copyStatus) { - internalHeaders.setXMsCopyStatus(copyStatus); + internalHeaders.setCopyStatus(copyStatus); return this; } @@ -544,7 +548,7 @@ public BlobDownloadHeaders setCopyStatus(CopyStatusType copyStatus) { * @return the leaseDuration value. */ public LeaseDurationType getLeaseDuration() { - return internalHeaders.getXMsLeaseDuration(); + return internalHeaders.getDuration(); } /** @@ -555,7 +559,7 @@ public LeaseDurationType getLeaseDuration() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setLeaseDuration(LeaseDurationType leaseDuration) { - internalHeaders.setXMsLeaseDuration(leaseDuration); + internalHeaders.setDuration(leaseDuration); return this; } @@ -566,7 +570,7 @@ public BlobDownloadHeaders setLeaseDuration(LeaseDurationType leaseDuration) { * @return the leaseState value. */ public LeaseStateType getLeaseState() { - return internalHeaders.getXMsLeaseState(); + return internalHeaders.getLeaseState(); } /** @@ -577,7 +581,7 @@ public LeaseStateType getLeaseState() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setLeaseState(LeaseStateType leaseState) { - internalHeaders.setXMsLeaseState(leaseState); + internalHeaders.setLeaseState(leaseState); return this; } @@ -588,7 +592,7 @@ public BlobDownloadHeaders setLeaseState(LeaseStateType leaseState) { * @return the leaseStatus value. */ public LeaseStatusType getLeaseStatus() { - return internalHeaders.getXMsLeaseStatus(); + return internalHeaders.getLeaseStatus(); } /** @@ -599,7 +603,7 @@ public LeaseStatusType getLeaseStatus() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setLeaseStatus(LeaseStatusType leaseStatus) { - internalHeaders.setXMsLeaseStatus(leaseStatus); + internalHeaders.setLeaseStatus(leaseStatus); return this; } @@ -610,7 +614,7 @@ public BlobDownloadHeaders setLeaseStatus(LeaseStatusType leaseStatus) { * @return the clientRequestId value. */ public String getClientRequestId() { - return internalHeaders.getXMsClientRequestId(); + return internalHeaders.getClientRequestId(); } /** @@ -621,7 +625,7 @@ public String getClientRequestId() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setClientRequestId(String clientRequestId) { - internalHeaders.setXMsClientRequestId(clientRequestId); + internalHeaders.setClientRequestId(clientRequestId); return this; } @@ -632,7 +636,7 @@ public BlobDownloadHeaders setClientRequestId(String clientRequestId) { * @return the requestId value. */ public String getRequestId() { - return internalHeaders.getXMsRequestId(); + return internalHeaders.getRequestId(); } /** @@ -643,7 +647,7 @@ public String getRequestId() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setRequestId(String requestId) { - internalHeaders.setXMsRequestId(requestId); + internalHeaders.setRequestId(requestId); return this; } @@ -654,7 +658,7 @@ public BlobDownloadHeaders setRequestId(String requestId) { * @return the version value. */ public String getVersion() { - return internalHeaders.getXMsVersion(); + return internalHeaders.getVersion(); } /** @@ -665,7 +669,7 @@ public String getVersion() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setVersion(String version) { - internalHeaders.setXMsVersion(version); + internalHeaders.setVersion(version); return this; } @@ -677,7 +681,7 @@ public BlobDownloadHeaders setVersion(String version) { * @return the versionId value. */ public String getVersionId() { - return internalHeaders.getXMsVersionId(); + return internalHeaders.getVersionId(); } /** @@ -689,7 +693,7 @@ public String getVersionId() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setVersionId(String versionId) { - internalHeaders.setXMsVersionId(versionId); + internalHeaders.setVersionId(versionId); return this; } @@ -742,7 +746,7 @@ public BlobDownloadHeaders setDateProperty(OffsetDateTime dateProperty) { * @return the blobCommittedBlockCount value. */ public Integer getBlobCommittedBlockCount() { - return internalHeaders.getXMsBlobCommittedBlockCount(); + return internalHeaders.getBlobCommittedBlockCount(); } /** @@ -753,7 +757,7 @@ public Integer getBlobCommittedBlockCount() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setBlobCommittedBlockCount(Integer blobCommittedBlockCount) { - internalHeaders.setXMsBlobCommittedBlockCount(blobCommittedBlockCount); + internalHeaders.setBlobCommittedBlockCount(blobCommittedBlockCount); return this; } @@ -765,7 +769,7 @@ public BlobDownloadHeaders setBlobCommittedBlockCount(Integer blobCommittedBlock * @return the isServerEncrypted value. */ public Boolean isServerEncrypted() { - return internalHeaders.isXMsServerEncrypted(); + return internalHeaders.isServerEncrypted(); } /** @@ -777,7 +781,7 @@ public Boolean isServerEncrypted() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setIsServerEncrypted(Boolean isServerEncrypted) { - internalHeaders.setXMsServerEncrypted(isServerEncrypted); + internalHeaders.setServerEncrypted(isServerEncrypted); return this; } @@ -788,7 +792,7 @@ public BlobDownloadHeaders setIsServerEncrypted(Boolean isServerEncrypted) { * @return the encryptionKeySha256 value. */ public String getEncryptionKeySha256() { - return internalHeaders.getXMsEncryptionKeySha256(); + return internalHeaders.getEncryptionKeySha256(); } /** @@ -799,7 +803,7 @@ public String getEncryptionKeySha256() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setEncryptionKeySha256(String encryptionKeySha256) { - internalHeaders.setXMsEncryptionKeySha256(encryptionKeySha256); + internalHeaders.setEncryptionKeySha256(encryptionKeySha256); return this; } @@ -810,7 +814,7 @@ public BlobDownloadHeaders setEncryptionKeySha256(String encryptionKeySha256) { * @return the encryptionScope value. */ public String getEncryptionScope() { - return internalHeaders.getXMsEncryptionScope(); + return internalHeaders.getEncryptionScope(); } /** @@ -821,7 +825,7 @@ public String getEncryptionScope() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setEncryptionScope(String encryptionScope) { - internalHeaders.setXMsEncryptionScope(encryptionScope); + internalHeaders.setEncryptionScope(encryptionScope); return this; } @@ -833,7 +837,7 @@ public BlobDownloadHeaders setEncryptionScope(String encryptionScope) { * @return the blobContentMD5 value. */ public byte[] getBlobContentMD5() { - return CoreUtils.clone(internalHeaders.getXMsBlobContentMd5()); + return CoreUtils.clone(internalHeaders.getBlobContentMd5()); } /** @@ -845,7 +849,7 @@ public byte[] getBlobContentMD5() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setBlobContentMD5(byte[] blobContentMD5) { - internalHeaders.setXMsBlobContentMd5(CoreUtils.clone(blobContentMD5)); + internalHeaders.setBlobContentMd5(CoreUtils.clone(blobContentMD5)); return this; } @@ -855,7 +859,7 @@ public BlobDownloadHeaders setBlobContentMD5(byte[] blobContentMD5) { * @return the tagCount value. */ public Long getTagCount() { - return internalHeaders.getXMsTagCount(); + return internalHeaders.getTagCount(); } /** @@ -865,7 +869,7 @@ public Long getTagCount() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setTagCount(Long tagCount) { - internalHeaders.setXMsTagCount(tagCount); + internalHeaders.setTagCount(tagCount); return this; } @@ -878,7 +882,7 @@ public BlobDownloadHeaders setTagCount(Long tagCount) { * @return the contentCrc64 value. */ public byte[] getContentCrc64() { - return CoreUtils.clone(internalHeaders.getXMsContentCrc64()); + return CoreUtils.clone(internalHeaders.getContentCrc64()); } /** @@ -891,7 +895,7 @@ public byte[] getContentCrc64() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setContentCrc64(byte[] contentCrc64) { - internalHeaders.setXMsContentCrc64(CoreUtils.clone(contentCrc64)); + internalHeaders.setContentCrc64(CoreUtils.clone(contentCrc64)); return this; } @@ -921,7 +925,7 @@ public BlobDownloadHeaders setErrorCode(String errorCode) { * @return Whether the blob is sealed (marked as read only). This is only applicable for Append blobs. */ public Boolean isSealed() { - return internalHeaders.isXMsBlobSealed(); + return internalHeaders.isSealed(); } /** @@ -931,7 +935,7 @@ public Boolean isSealed() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setSealed(Boolean sealed) { - internalHeaders.setXMsBlobSealed(sealed); + internalHeaders.setSealed(sealed); return this; } @@ -941,7 +945,7 @@ public BlobDownloadHeaders setSealed(Boolean sealed) { * @return the lastAccessedTime value. */ public OffsetDateTime getLastAccessedTime() { - return internalHeaders.getXMsLastAccessTime(); + return internalHeaders.getLastAccessed(); } /** @@ -951,7 +955,7 @@ public OffsetDateTime getLastAccessedTime() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setLastAccessedTime(OffsetDateTime lastAccessedTime) { - internalHeaders.setXMsLastAccessTime(lastAccessedTime); + internalHeaders.setLastAccessed(lastAccessedTime); return this; } @@ -961,7 +965,7 @@ public BlobDownloadHeaders setLastAccessedTime(OffsetDateTime lastAccessedTime) * @return the currentVersion value. */ public Boolean isCurrentVersion() { - return internalHeaders.isXMsIsCurrentVersion(); + return internalHeaders.isCurrentVersion(); } /** @@ -971,7 +975,7 @@ public Boolean isCurrentVersion() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setCurrentVersion(Boolean currentVersion) { - internalHeaders.setXMsIsCurrentVersion(currentVersion); + internalHeaders.setCurrentVersion(currentVersion); return this; } @@ -982,9 +986,8 @@ public BlobDownloadHeaders setCurrentVersion(Boolean currentVersion) { * @return the immutabilityPolicy value. */ public BlobImmutabilityPolicy getImmutabilityPolicy() { - return new BlobImmutabilityPolicy() - .setPolicyMode(BlobImmutabilityPolicyMode.fromString(internalHeaders.getXMsImmutabilityPolicyMode())) - .setExpiryTime(internalHeaders.getXMsImmutabilityPolicyUntilDate()); + return new BlobImmutabilityPolicy().setPolicyMode(internalHeaders.getImmutabilityPolicyMode()) + .setExpiryTime(internalHeaders.getImmutabilityPolicyExpiresOn()); } /** @@ -996,11 +999,11 @@ public BlobImmutabilityPolicy getImmutabilityPolicy() { */ public BlobDownloadHeaders setImmutabilityPolicy(BlobImmutabilityPolicy immutabilityPolicy) { if (immutabilityPolicy == null) { - internalHeaders.setXMsImmutabilityPolicyMode(null); - internalHeaders.setXMsImmutabilityPolicyUntilDate(null); + internalHeaders.setImmutabilityPolicyMode(null); + internalHeaders.setImmutabilityPolicyExpiresOn(null); } else { - internalHeaders.setXMsImmutabilityPolicyMode(immutabilityPolicy.getPolicyMode().toString()); - internalHeaders.setXMsImmutabilityPolicyUntilDate(immutabilityPolicy.getExpiryTime()); + internalHeaders.setImmutabilityPolicyMode(immutabilityPolicy.getPolicyMode()); + internalHeaders.setImmutabilityPolicyExpiresOn(immutabilityPolicy.getExpiryTime()); } return this; } @@ -1011,7 +1014,7 @@ public BlobDownloadHeaders setImmutabilityPolicy(BlobImmutabilityPolicy immutabi * @return the hasLegalHold value. */ public Boolean hasLegalHold() { - return internalHeaders.isXMsLegalHold(); + return internalHeaders.isLegalHold(); } /** @@ -1021,7 +1024,7 @@ public Boolean hasLegalHold() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setHasLegalHold(Boolean hasLegalHold) { - internalHeaders.setXMsLegalHold(hasLegalHold); + internalHeaders.setLegalHold(hasLegalHold); return this; } @@ -1031,7 +1034,7 @@ public BlobDownloadHeaders setHasLegalHold(Boolean hasLegalHold) { * @return the creation time value. */ public OffsetDateTime getCreationTime() { - return internalHeaders.getXMsCreationTime(); + return internalHeaders.getCreationTime(); } /** @@ -1041,7 +1044,7 @@ public OffsetDateTime getCreationTime() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setCreationTime(OffsetDateTime creationTime) { - internalHeaders.setXMsCreationTime(creationTime); + internalHeaders.setCreationTime(creationTime); return this; } @@ -1055,7 +1058,7 @@ public BlobDownloadHeaders setCreationTime(OffsetDateTime creationTime) { */ public DownloadHint getDownloadHint() { String downloadHint - = internalHeaders.getXMsDownloadHint() == null ? null : internalHeaders.getXMsDownloadHint().toString(); + = internalHeaders.getDownloadHint() == null ? null : internalHeaders.getDownloadHint().toString(); return downloadHint == null ? null : DownloadHint.fromString(downloadHint); } @@ -1069,7 +1072,7 @@ public DownloadHint getDownloadHint() { * @return the BlobDownloadHeaders object itself. */ public BlobDownloadHeaders setDownloadHint(DownloadHint downloadHint) { - internalHeaders.setXMsDownloadHint(downloadHint == null + internalHeaders.setDownloadHint(downloadHint == null ? null : com.azure.storage.blob.implementation.models.DownloadHint.fromString(downloadHint.toString())); return this; 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 2f70657a3a0f1..28d546e78322d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; import com.azure.core.annotation.Generated; @@ -8,744 +8,734 @@ import java.util.Collection; /** - * Error codes returned by the service. + * Error codes returned by the Azure Blob Storage service. */ public final class BlobErrorCode extends ExpandableStringEnum { /** - * Static value AccountAlreadyExists for BlobErrorCode. + * Account already exists. */ @Generated public static final BlobErrorCode ACCOUNT_ALREADY_EXISTS = fromString("AccountAlreadyExists"); /** - * Static value AccountBeingCreated for BlobErrorCode. + * Account is being created. */ @Generated public static final BlobErrorCode ACCOUNT_BEING_CREATED = fromString("AccountBeingCreated"); /** - * Static value AccountIsDisabled for BlobErrorCode. + * Account is disabled. */ @Generated public static final BlobErrorCode ACCOUNT_IS_DISABLED = fromString("AccountIsDisabled"); /** - * Static value AuthenticationFailed for BlobErrorCode. + * Authentication failed. */ @Generated public static final BlobErrorCode AUTHENTICATION_FAILED = fromString("AuthenticationFailed"); /** - * Static value AuthorizationFailure for BlobErrorCode. + * Authorization failure. */ @Generated public static final BlobErrorCode AUTHORIZATION_FAILURE = fromString("AuthorizationFailure"); /** - * Static value ConditionHeadersNotSupported for BlobErrorCode. + * Condition headers not supported. */ @Generated public static final BlobErrorCode CONDITION_HEADERS_NOT_SUPPORTED = fromString("ConditionHeadersNotSupported"); /** - * Static value ConditionNotMet for BlobErrorCode. + * Condition not met. */ @Generated public static final BlobErrorCode CONDITION_NOT_MET = fromString("ConditionNotMet"); /** - * Static value EmptyMetadataKey for BlobErrorCode. + * Empty metadata key. */ @Generated public static final BlobErrorCode EMPTY_METADATA_KEY = fromString("EmptyMetadataKey"); /** - * Static value InsufficientAccountPermissions for BlobErrorCode. + * Incremental copy of an earlier snapshot is not allowed. + */ + @Generated + public static final BlobErrorCode INCREMENTAL_COPY_OF_EARLIER_SNAPSHOT_NOT_ALLOWED + = fromString("IncrementalCopyOfEarlierSnapshotNotAllowed"); + + /** + * Insufficient account permissions. */ @Generated public static final BlobErrorCode INSUFFICIENT_ACCOUNT_PERMISSIONS = fromString("InsufficientAccountPermissions"); /** - * Static value InternalError for BlobErrorCode. + * Internal error. */ @Generated public static final BlobErrorCode INTERNAL_ERROR = fromString("InternalError"); /** - * Static value InvalidAuthenticationInfo for BlobErrorCode. + * Invalid authentication information. */ @Generated public static final BlobErrorCode INVALID_AUTHENTICATION_INFO = fromString("InvalidAuthenticationInfo"); /** - * Static value InvalidHeaderValue for BlobErrorCode. + * Invalid header value. */ @Generated public static final BlobErrorCode INVALID_HEADER_VALUE = fromString("InvalidHeaderValue"); /** - * Static value InvalidHttpVerb for BlobErrorCode. + * Invalid HTTP verb. */ @Generated public static final BlobErrorCode INVALID_HTTP_VERB = fromString("InvalidHttpVerb"); /** - * Static value InvalidInput for BlobErrorCode. + * Invalid input. */ @Generated public static final BlobErrorCode INVALID_INPUT = fromString("InvalidInput"); /** - * Static value InvalidMd5 for BlobErrorCode. + * Invalid MD5. */ @Generated public static final BlobErrorCode INVALID_MD5 = fromString("InvalidMd5"); /** - * Static value InvalidMetadata for BlobErrorCode. + * Invalid metadata. */ @Generated public static final BlobErrorCode INVALID_METADATA = fromString("InvalidMetadata"); /** - * Static value InvalidQueryParameterValue for BlobErrorCode. + * Invalid query parameter value. */ @Generated public static final BlobErrorCode INVALID_QUERY_PARAMETER_VALUE = fromString("InvalidQueryParameterValue"); /** - * Static value InvalidRange for BlobErrorCode. + * Invalid range. */ @Generated public static final BlobErrorCode INVALID_RANGE = fromString("InvalidRange"); /** - * Static value InvalidResourceName for BlobErrorCode. + * Invalid request URL. + */ + @Generated + public static final BlobErrorCode INVALID_REQUEST_URL = fromString("InvalidRequestUrl"); + + /** + * Invalid resource name. */ @Generated public static final BlobErrorCode INVALID_RESOURCE_NAME = fromString("InvalidResourceName"); /** - * Static value InvalidUri for BlobErrorCode. + * Invalid URI. */ @Generated public static final BlobErrorCode INVALID_URI = fromString("InvalidUri"); /** - * Static value InvalidXmlDocument for BlobErrorCode. + * Invalid XML document. */ @Generated public static final BlobErrorCode INVALID_XML_DOCUMENT = fromString("InvalidXmlDocument"); /** - * Static value InvalidXmlNodeValue for BlobErrorCode. + * Invalid XML node value. */ @Generated public static final BlobErrorCode INVALID_XML_NODE_VALUE = fromString("InvalidXmlNodeValue"); /** - * Static value Md5Mismatch for BlobErrorCode. + * MD5 mismatch. */ @Generated public static final BlobErrorCode MD5MISMATCH = fromString("Md5Mismatch"); /** - * Static value MetadataTooLarge for BlobErrorCode. + * Metadata too large. */ @Generated public static final BlobErrorCode METADATA_TOO_LARGE = fromString("MetadataTooLarge"); /** - * Static value MissingContentLengthHeader for BlobErrorCode. + * Missing content length header. */ @Generated public static final BlobErrorCode MISSING_CONTENT_LENGTH_HEADER = fromString("MissingContentLengthHeader"); /** - * Static value MissingRequiredQueryParameter for BlobErrorCode. + * Missing required XML node. */ @Generated - public static final BlobErrorCode MISSING_REQUIRED_QUERY_PARAMETER = fromString("MissingRequiredQueryParameter"); + public static final BlobErrorCode MISSING_REQUIRED_XML_NODE = fromString("MissingRequiredXmlNode"); /** - * Static value MissingRequiredHeader for BlobErrorCode. + * Missing required header. */ @Generated public static final BlobErrorCode MISSING_REQUIRED_HEADER = fromString("MissingRequiredHeader"); /** - * Static value MissingRequiredXmlNode for BlobErrorCode. + * Missing required query parameter. */ @Generated - public static final BlobErrorCode MISSING_REQUIRED_XML_NODE = fromString("MissingRequiredXmlNode"); + public static final BlobErrorCode MISSING_REQUIRED_QUERY_PARAMETER = fromString("MissingRequiredQueryParameter"); /** - * Static value MultipleConditionHeadersNotSupported for BlobErrorCode. + * Multiple condition headers not supported. */ @Generated public static final BlobErrorCode MULTIPLE_CONDITION_HEADERS_NOT_SUPPORTED = fromString("MultipleConditionHeadersNotSupported"); /** - * Static value OperationTimedOut for BlobErrorCode. + * No authentication information. + */ + @Generated + public static final BlobErrorCode NO_AUTHENTICATION_INFORMATION = fromString("NoAuthenticationInformation"); + + /** + * Operation timed out. */ @Generated public static final BlobErrorCode OPERATION_TIMED_OUT = fromString("OperationTimedOut"); /** - * Static value OutOfRangeInput for BlobErrorCode. + * Out of range input. */ @Generated public static final BlobErrorCode OUT_OF_RANGE_INPUT = fromString("OutOfRangeInput"); /** - * Static value OutOfRangeQueryParameterValue for BlobErrorCode. + * Out of range query parameter value. */ @Generated public static final BlobErrorCode OUT_OF_RANGE_QUERY_PARAMETER_VALUE = fromString("OutOfRangeQueryParameterValue"); /** - * Static value RequestBodyTooLarge for BlobErrorCode. + * Request body too large. */ @Generated public static final BlobErrorCode REQUEST_BODY_TOO_LARGE = fromString("RequestBodyTooLarge"); /** - * Static value ResourceTypeMismatch for BlobErrorCode. + * Resource type mismatch. */ @Generated public static final BlobErrorCode RESOURCE_TYPE_MISMATCH = fromString("ResourceTypeMismatch"); /** - * Static value RequestUrlFailedToParse for BlobErrorCode. + * Request URL failed to parse. */ @Generated public static final BlobErrorCode REQUEST_URL_FAILED_TO_PARSE = fromString("RequestUrlFailedToParse"); /** - * Static value ResourceAlreadyExists for BlobErrorCode. + * Resource already exists. */ @Generated public static final BlobErrorCode RESOURCE_ALREADY_EXISTS = fromString("ResourceAlreadyExists"); /** - * Static value ResourceNotFound for BlobErrorCode. + * Resource not found. */ @Generated public static final BlobErrorCode RESOURCE_NOT_FOUND = fromString("ResourceNotFound"); /** - * Static value ServerBusy for BlobErrorCode. + * Server busy. */ @Generated public static final BlobErrorCode SERVER_BUSY = fromString("ServerBusy"); /** - * Static value UnsupportedHeader for BlobErrorCode. + * Unsupported header. */ @Generated public static final BlobErrorCode UNSUPPORTED_HEADER = fromString("UnsupportedHeader"); /** - * Static value UnsupportedXmlNode for BlobErrorCode. + * Unsupported XML node. */ @Generated public static final BlobErrorCode UNSUPPORTED_XML_NODE = fromString("UnsupportedXmlNode"); /** - * Static value UnsupportedQueryParameter for BlobErrorCode. + * Unsupported query parameter. */ @Generated public static final BlobErrorCode UNSUPPORTED_QUERY_PARAMETER = fromString("UnsupportedQueryParameter"); /** - * Static value UnsupportedHttpVerb for BlobErrorCode. + * Unsupported HTTP verb. */ @Generated public static final BlobErrorCode UNSUPPORTED_HTTP_VERB = fromString("UnsupportedHttpVerb"); /** - * Static value AppendPositionConditionNotMet for BlobErrorCode. + * Append position condition not met. */ @Generated public static final BlobErrorCode APPEND_POSITION_CONDITION_NOT_MET = fromString("AppendPositionConditionNotMet"); /** - * Static value BlobAlreadyExists for BlobErrorCode. + * Blob already exists. */ @Generated public static final BlobErrorCode BLOB_ALREADY_EXISTS = fromString("BlobAlreadyExists"); /** - * Static value BlobImmutableDueToPolicy for BlobErrorCode. + * Blob is immutable due to policy. */ @Generated public static final BlobErrorCode BLOB_IMMUTABLE_DUE_TO_POLICY = fromString("BlobImmutableDueToPolicy"); /** - * Static value BlobNotFound for BlobErrorCode. + * Blob not found. */ @Generated public static final BlobErrorCode BLOB_NOT_FOUND = fromString("BlobNotFound"); /** - * Static value BlobOverwritten for BlobErrorCode. + * Blob overwritten. */ @Generated public static final BlobErrorCode BLOB_OVERWRITTEN = fromString("BlobOverwritten"); /** - * Static value BlobTierInadequateForContentLength for BlobErrorCode. + * Blob tier inadequate for content length. */ @Generated public static final BlobErrorCode BLOB_TIER_INADEQUATE_FOR_CONTENT_LENGTH = fromString("BlobTierInadequateForContentLength"); /** - * Static value BlobUsesCustomerSpecifiedEncryption for BlobErrorCode. + * Blob uses customer specified encryption. */ @Generated public static final BlobErrorCode BLOB_USES_CUSTOMER_SPECIFIED_ENCRYPTION = fromString("BlobUsesCustomerSpecifiedEncryption"); /** - * Static value BlockCountExceedsLimit for BlobErrorCode. + * Block count exceeds limit. */ @Generated public static final BlobErrorCode BLOCK_COUNT_EXCEEDS_LIMIT = fromString("BlockCountExceedsLimit"); /** - * Static value BlockListTooLong for BlobErrorCode. + * Block list too long. */ @Generated public static final BlobErrorCode BLOCK_LIST_TOO_LONG = fromString("BlockListTooLong"); /** - * Static value CannotChangeToLowerTier for BlobErrorCode. + * Cannot change to lower tier. */ @Generated public static final BlobErrorCode CANNOT_CHANGE_TO_LOWER_TIER = fromString("CannotChangeToLowerTier"); /** - * Static value CannotVerifyCopySource for BlobErrorCode. + * Cannot verify copy source. */ @Generated public static final BlobErrorCode CANNOT_VERIFY_COPY_SOURCE = fromString("CannotVerifyCopySource"); /** - * Static value ContainerAlreadyExists for BlobErrorCode. + * Container already exists. */ @Generated public static final BlobErrorCode CONTAINER_ALREADY_EXISTS = fromString("ContainerAlreadyExists"); /** - * Static value ContainerBeingDeleted for BlobErrorCode. + * Container being deleted. */ @Generated public static final BlobErrorCode CONTAINER_BEING_DELETED = fromString("ContainerBeingDeleted"); /** - * Static value ContainerDisabled for BlobErrorCode. + * Container disabled. */ @Generated public static final BlobErrorCode CONTAINER_DISABLED = fromString("ContainerDisabled"); /** - * Static value ContainerNotFound for BlobErrorCode. + * Container not found. */ @Generated public static final BlobErrorCode CONTAINER_NOT_FOUND = fromString("ContainerNotFound"); /** - * Static value ContentLengthLargerThanTierLimit for BlobErrorCode. + * Content length larger than tier limit. */ @Generated public static final BlobErrorCode CONTENT_LENGTH_LARGER_THAN_TIER_LIMIT = fromString("ContentLengthLargerThanTierLimit"); /** - * Static value CopyAcrossAccountsNotSupported for BlobErrorCode. + * Copy across accounts not supported. */ @Generated public static final BlobErrorCode COPY_ACROSS_ACCOUNTS_NOT_SUPPORTED = fromString("CopyAcrossAccountsNotSupported"); /** - * Static value CopyIdMismatch for BlobErrorCode. + * Copy ID mismatch. */ @Generated public static final BlobErrorCode COPY_ID_MISMATCH = fromString("CopyIdMismatch"); /** - * Static value FeatureVersionMismatch for BlobErrorCode. + * Feature version mismatch. */ @Generated public static final BlobErrorCode FEATURE_VERSION_MISMATCH = fromString("FeatureVersionMismatch"); /** - * Static value IncrementalCopyBlobMismatch for BlobErrorCode. + * Feature is not enabled. + */ + @Generated + public static final BlobErrorCode FEATURE_NOT_ENABLED = fromString("FeatureNotEnabled"); + + /** + * Incremental copy blob mismatch. */ @Generated public static final BlobErrorCode INCREMENTAL_COPY_BLOB_MISMATCH = fromString("IncrementalCopyBlobMismatch"); /** - * Static value IncrementalCopyOfEarlierSnapshotNotAllowed for BlobErrorCode. + * Incremental copy of an earlier version snapshot is not allowed. */ @Generated - public static final BlobErrorCode INCREMENTAL_COPY_OF_EARLIER_SNAPSHOT_NOT_ALLOWED - = fromString("IncrementalCopyOfEarlierSnapshotNotAllowed"); + public static final BlobErrorCode INCREMENTAL_COPY_OF_EARLIER_VERSION_SNAPSHOT_NOT_ALLOWED + = fromString("IncrementalCopyOfEarlierVersionSnapshotNotAllowed"); /** - * Static value IncrementalCopySourceMustBeSnapshot for BlobErrorCode. + * Incremental copy source must be snapshot. */ @Generated public static final BlobErrorCode INCREMENTAL_COPY_SOURCE_MUST_BE_SNAPSHOT = fromString("IncrementalCopySourceMustBeSnapshot"); /** - * Static value InfiniteLeaseDurationRequired for BlobErrorCode. + * Infinite lease duration required. */ @Generated public static final BlobErrorCode INFINITE_LEASE_DURATION_REQUIRED = fromString("InfiniteLeaseDurationRequired"); /** - * Static value InvalidBlobOrBlock for BlobErrorCode. + * Invalid blob or block. */ @Generated public static final BlobErrorCode INVALID_BLOB_OR_BLOCK = fromString("InvalidBlobOrBlock"); /** - * Static value InvalidBlobTier for BlobErrorCode. + * Invalid blob tier. */ @Generated public static final BlobErrorCode INVALID_BLOB_TIER = fromString("InvalidBlobTier"); /** - * Static value InvalidBlobType for BlobErrorCode. + * Invalid blob type. */ @Generated public static final BlobErrorCode INVALID_BLOB_TYPE = fromString("InvalidBlobType"); /** - * Static value InvalidBlockId for BlobErrorCode. + * Invalid block ID. */ @Generated public static final BlobErrorCode INVALID_BLOCK_ID = fromString("InvalidBlockId"); /** - * Static value InvalidBlockList for BlobErrorCode. + * Invalid block list. */ @Generated public static final BlobErrorCode INVALID_BLOCK_LIST = fromString("InvalidBlockList"); /** - * Static value InvalidOperation for BlobErrorCode. + * Invalid operation. */ @Generated public static final BlobErrorCode INVALID_OPERATION = fromString("InvalidOperation"); /** - * Static value InvalidPageRange for BlobErrorCode. + * Invalid page range. */ @Generated public static final BlobErrorCode INVALID_PAGE_RANGE = fromString("InvalidPageRange"); /** - * Static value InvalidSourceBlobType for BlobErrorCode. + * Invalid source blob type. */ @Generated public static final BlobErrorCode INVALID_SOURCE_BLOB_TYPE = fromString("InvalidSourceBlobType"); /** - * Static value InvalidSourceBlobUrl for BlobErrorCode. + * Invalid source blob URL. */ @Generated public static final BlobErrorCode INVALID_SOURCE_BLOB_URL = fromString("InvalidSourceBlobUrl"); /** - * Static value InvalidVersionForPageBlobOperation for BlobErrorCode. + * Invalid version for page blob operation. */ @Generated public static final BlobErrorCode INVALID_VERSION_FOR_PAGE_BLOB_OPERATION = fromString("InvalidVersionForPageBlobOperation"); /** - * Static value LeaseAlreadyPresent for BlobErrorCode. + * Lease already present. */ @Generated public static final BlobErrorCode LEASE_ALREADY_PRESENT = fromString("LeaseAlreadyPresent"); /** - * Static value LeaseAlreadyBroken for BlobErrorCode. + * Lease already broken. */ @Generated public static final BlobErrorCode LEASE_ALREADY_BROKEN = fromString("LeaseAlreadyBroken"); /** - * Static value LeaseIdMismatchWithBlobOperation for BlobErrorCode. + * Lease ID mismatch with blob operation. */ @Generated public static final BlobErrorCode LEASE_ID_MISMATCH_WITH_BLOB_OPERATION = fromString("LeaseIdMismatchWithBlobOperation"); /** - * Static value LeaseIdMismatchWithContainerOperation for BlobErrorCode. + * Lease ID mismatch with container operation. */ @Generated public static final BlobErrorCode LEASE_ID_MISMATCH_WITH_CONTAINER_OPERATION = fromString("LeaseIdMismatchWithContainerOperation"); /** - * Static value LeaseIdMismatchWithLeaseOperation for BlobErrorCode. + * Lease ID mismatch with lease operation. */ @Generated public static final BlobErrorCode LEASE_ID_MISMATCH_WITH_LEASE_OPERATION = fromString("LeaseIdMismatchWithLeaseOperation"); /** - * Static value LeaseIdMissing for BlobErrorCode. + * Lease ID missing. */ @Generated public static final BlobErrorCode LEASE_ID_MISSING = fromString("LeaseIdMissing"); /** - * Static value LeaseIsBreakingAndCannotBeAcquired for BlobErrorCode. + * Lease is breaking and cannot be acquired. */ @Generated public static final BlobErrorCode LEASE_IS_BREAKING_AND_CANNOT_BE_ACQUIRED = fromString("LeaseIsBreakingAndCannotBeAcquired"); /** - * Static value LeaseIsBreakingAndCannotBeChanged for BlobErrorCode. + * Lease is breaking and cannot be changed. */ @Generated public static final BlobErrorCode LEASE_IS_BREAKING_AND_CANNOT_BE_CHANGED = fromString("LeaseIsBreakingAndCannotBeChanged"); /** - * Static value LeaseIsBrokenAndCannotBeRenewed for BlobErrorCode. + * Lease is broken and cannot be renewed. */ @Generated public static final BlobErrorCode LEASE_IS_BROKEN_AND_CANNOT_BE_RENEWED = fromString("LeaseIsBrokenAndCannotBeRenewed"); /** - * Static value LeaseLost for BlobErrorCode. + * Lease lost. */ @Generated public static final BlobErrorCode LEASE_LOST = fromString("LeaseLost"); /** - * Static value LeaseNotPresentWithBlobOperation for BlobErrorCode. + * Lease not present with blob operation. */ @Generated public static final BlobErrorCode LEASE_NOT_PRESENT_WITH_BLOB_OPERATION = fromString("LeaseNotPresentWithBlobOperation"); /** - * Static value LeaseNotPresentWithContainerOperation for BlobErrorCode. + * Lease not present with container operation. */ @Generated public static final BlobErrorCode LEASE_NOT_PRESENT_WITH_CONTAINER_OPERATION = fromString("LeaseNotPresentWithContainerOperation"); /** - * Static value LeaseNotPresentWithLeaseOperation for BlobErrorCode. + * Lease not present with lease operation. */ @Generated public static final BlobErrorCode LEASE_NOT_PRESENT_WITH_LEASE_OPERATION = fromString("LeaseNotPresentWithLeaseOperation"); /** - * Static value MaxBlobSizeConditionNotMet for BlobErrorCode. + * Maximum blob size condition not met. */ @Generated public static final BlobErrorCode MAX_BLOB_SIZE_CONDITION_NOT_MET = fromString("MaxBlobSizeConditionNotMet"); /** - * Static value NoAuthenticationInformation for BlobErrorCode. - */ - @Generated - public static final BlobErrorCode NO_AUTHENTICATION_INFORMATION = fromString("NoAuthenticationInformation"); - - /** - * Static value NoPendingCopyOperation for BlobErrorCode. + * No pending copy operation. */ @Generated public static final BlobErrorCode NO_PENDING_COPY_OPERATION = fromString("NoPendingCopyOperation"); /** - * Static value OperationNotAllowedOnIncrementalCopyBlob for BlobErrorCode. + * Operation not allowed on incremental copy blob. */ @Generated public static final BlobErrorCode OPERATION_NOT_ALLOWED_ON_INCREMENTAL_COPY_BLOB = fromString("OperationNotAllowedOnIncrementalCopyBlob"); /** - * Static value PendingCopyOperation for BlobErrorCode. + * Pending copy operation. */ @Generated public static final BlobErrorCode PENDING_COPY_OPERATION = fromString("PendingCopyOperation"); /** - * Static value PreviousSnapshotCannotBeNewer for BlobErrorCode. + * Previous snapshot not found. */ @Generated - public static final BlobErrorCode PREVIOUS_SNAPSHOT_CANNOT_BE_NEWER = fromString("PreviousSnapshotCannotBeNewer"); + public static final BlobErrorCode PREVIOUS_SNAPSHOT_NOT_FOUND = fromString("PreviousSnapshotNotFound"); /** - * Static value PreviousSnapshotNotFound for BlobErrorCode. + * Previous snapshot operation not supported. */ @Generated - public static final BlobErrorCode PREVIOUS_SNAPSHOT_NOT_FOUND = fromString("PreviousSnapshotNotFound"); + public static final BlobErrorCode PREVIOUS_SNAPSHOT_OPERATION_NOT_SUPPORTED + = fromString("PreviousSnapshotOperationNotSupported"); /** - * Static value PreviousSnapshotOperationNotSupported for BlobErrorCode. + * Previous snapshot cannot be newer. */ @Generated - public static final BlobErrorCode PREVIOUS_SNAPSHOT_OPERATION_NOT_SUPPORTED - = fromString("PreviousSnapshotOperationNotSupported"); + public static final BlobErrorCode PREVIOUS_SNAPSHOT_CANNOT_BE_NEWER = fromString("PreviousSnapshotCannotBeNewer"); /** - * Static value SequenceNumberConditionNotMet for BlobErrorCode. + * Sequence number condition not met. */ @Generated public static final BlobErrorCode SEQUENCE_NUMBER_CONDITION_NOT_MET = fromString("SequenceNumberConditionNotMet"); /** - * Static value SequenceNumberIncrementTooLarge for BlobErrorCode. + * Sequence number increment too large. */ @Generated public static final BlobErrorCode SEQUENCE_NUMBER_INCREMENT_TOO_LARGE = fromString("SequenceNumberIncrementTooLarge"); /** - * Static value SnapshotCountExceeded for BlobErrorCode. + * Snapshot count exceeded. */ @Generated public static final BlobErrorCode SNAPSHOT_COUNT_EXCEEDED = fromString("SnapshotCountExceeded"); /** - * Static value SnapshotOperationRateExceeded for BlobErrorCode. + * Snapshot operation rate exceeded. */ @Generated public static final BlobErrorCode SNAPSHOT_OPERATION_RATE_EXCEEDED = fromString("SnapshotOperationRateExceeded"); /** - * Static value SnapshotsPresent for BlobErrorCode. + * Snapshots present. */ @Generated public static final BlobErrorCode SNAPSHOTS_PRESENT = fromString("SnapshotsPresent"); /** - * Static value SourceConditionNotMet for BlobErrorCode. + * Source condition not met. */ @Generated public static final BlobErrorCode SOURCE_CONDITION_NOT_MET = fromString("SourceConditionNotMet"); /** - * Static value SystemInUse for BlobErrorCode. + * System in use. */ @Generated public static final BlobErrorCode SYSTEM_IN_USE = fromString("SystemInUse"); /** - * Static value TargetConditionNotMet for BlobErrorCode. + * Target condition not met. */ @Generated public static final BlobErrorCode TARGET_CONDITION_NOT_MET = fromString("TargetConditionNotMet"); /** - * Static value UnauthorizedBlobOverwrite for BlobErrorCode. + * Unauthorized blob overwrite. */ @Generated public static final BlobErrorCode UNAUTHORIZED_BLOB_OVERWRITE = fromString("UnauthorizedBlobOverwrite"); /** - * Static value BlobBeingRehydrated for BlobErrorCode. + * Blob being rehydrated. */ @Generated public static final BlobErrorCode BLOB_BEING_REHYDRATED = fromString("BlobBeingRehydrated"); /** - * Static value BlobArchived for BlobErrorCode. + * Blob archived. */ @Generated public static final BlobErrorCode BLOB_ARCHIVED = fromString("BlobArchived"); /** - * Static value BlobNotArchived for BlobErrorCode. + * Blob not archived. */ @Generated public static final BlobErrorCode BLOB_NOT_ARCHIVED = fromString("BlobNotArchived"); /** - * Static value AuthorizationSourceIPMismatch for BlobErrorCode. + * Authorization source IP mismatch. */ @Generated public static final BlobErrorCode AUTHORIZATION_SOURCE_IPMISMATCH = fromString("AuthorizationSourceIPMismatch"); /** - * Static value AuthorizationProtocolMismatch for BlobErrorCode. + * Authorization protocol mismatch. */ @Generated public static final BlobErrorCode AUTHORIZATION_PROTOCOL_MISMATCH = fromString("AuthorizationProtocolMismatch"); /** - * Static value AuthorizationPermissionMismatch for BlobErrorCode. + * Authorization permission mismatch. */ @Generated public static final BlobErrorCode AUTHORIZATION_PERMISSION_MISMATCH = fromString("AuthorizationPermissionMismatch"); /** - * Static value AuthorizationServiceMismatch for BlobErrorCode. + * Authorization service mismatch. */ @Generated public static final BlobErrorCode AUTHORIZATION_SERVICE_MISMATCH = fromString("AuthorizationServiceMismatch"); /** - * Static value AuthorizationResourceTypeMismatch for BlobErrorCode. + * Authorization resource type mismatch. */ @Generated public static final BlobErrorCode AUTHORIZATION_RESOURCE_TYPE_MISMATCH = fromString("AuthorizationResourceTypeMismatch"); /** - * Static value BlobAccessTierNotSupportedForAccountType for BlobErrorCode. + * Blob access tier not supported for account type. */ @Generated public static final BlobErrorCode BLOB_ACCESS_TIER_NOT_SUPPORTED_FOR_ACCOUNT_TYPE = fromString("BlobAccessTierNotSupportedForAccountType"); - /** - * Static value SnapshotOperationRateExceeded for BlobErrorCode. - * - * @deprecated Please use {@link BlobErrorCode#SNAPSHOT_OPERATION_RATE_EXCEEDED} - */ - @Generated - @Deprecated - public static final BlobErrorCode SNAPHOT_OPERATION_RATE_EXCEEDED = fromString("SnapshotOperationRateExceeded"); - - /** - * Static value IncrementalCopyOfEralierVersionSnapshotNotAllowed for BlobErrorCode. - * - * @deprecated Please use {@link BlobErrorCode#INCREMENTAL_COPY_OF_EARLIER_SNAPSHOT_NOT_ALLOWED} - */ - @Generated - @Deprecated - public static final BlobErrorCode INCREMENTAL_COPY_OF_ERALIER_VERSION_SNAPSHOT_NOT_ALLOWED - = fromString("IncrementalCopyOfEralierVersionSnapshotNotAllowed"); - - /** - * Static value IncrementalCopyOfEarlierVersionSnapshotNotAllowed for BlobErrorCode. - * - * @deprecated Please use {@link BlobErrorCode#INCREMENTAL_COPY_OF_EARLIER_SNAPSHOT_NOT_ALLOWED} - */ - @Generated - @Deprecated - public static final BlobErrorCode INCREMENTAL_COPY_OF_EARLIER_VERSION_SNAPSHOT_NOT_ALLOWED - = fromString("IncrementalCopyOfEarlierVersionSnapshotNotAllowed"); - /** * Creates a new instance of BlobErrorCode value. * @@ -776,4 +766,21 @@ public static BlobErrorCode fromString(String name) { public static Collection values() { return values(BlobErrorCode.class); } + + /** + * Static value SnapshotOperationRateExceeded for BlobErrorCode. + * + * @deprecated Please use {@link BlobErrorCode#SNAPSHOT_OPERATION_RATE_EXCEEDED} + */ + @Deprecated + public static final BlobErrorCode SNAPHOT_OPERATION_RATE_EXCEEDED = fromString("SnapshotOperationRateExceeded"); + + /** + * Static value IncrementalCopyOfEralierVersionSnapshotNotAllowed for BlobErrorCode. + * + * @deprecated Please use {@link BlobErrorCode#INCREMENTAL_COPY_OF_EARLIER_SNAPSHOT_NOT_ALLOWED} + */ + @Deprecated + public static final BlobErrorCode INCREMENTAL_COPY_OF_ERALIER_VERSION_SNAPSHOT_NOT_ALLOWED + = fromString("IncrementalCopyOfEralierVersionSnapshotNotAllowed"); } 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 985430e8d0a9e..9954b43080ceb 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,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// This file is not generated. The Blob TypeSpec does not describe it, so it is maintained by hand; +// edits here are preserved across regeneration. package com.azure.storage.blob.models; 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 cdbf65dad1d01..011297a23dc7b 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 @@ -1,27 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; /** - * Defines values for BlobImmutabilityPolicyMode. + * The immutability policy mode. */ public enum BlobImmutabilityPolicyMode { + /** - * Enum value Mutable. + * Response only. The immutability policy is mutable. */ - MUTABLE("Mutable"), - + MUTABLE("mutable"), /** - * Enum value Unlocked. + * The immutability policy is unlocked. */ - UNLOCKED("Unlocked"), - + UNLOCKED("unlocked"), /** - * Enum value Locked. + * The immutability policy is locked. */ - LOCKED("Locked"); + LOCKED("locked"); /** * The actual serialized value for a BlobImmutabilityPolicyMode instance. @@ -34,7 +32,7 @@ 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. */ 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 7b3558005a5ea..370f41fe94788 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 @@ -25,6 +25,9 @@ public final class BlobItem { private final BlobItemInternal blobItemInternal; + // Whether this item is a virtual directory in a hierarchical listing; the service doesn't send it per item. + private Boolean isPrefix; + static { BlobItemConstructorProxy.setAccessor(BlobItem::new); } @@ -220,7 +223,7 @@ public Boolean isCurrentVersion() { * @return the BlobItem object itself. */ public BlobItem setCurrentVersion(Boolean isCurrentVersion) { - blobItemInternal.setIsCurrentVersion(isCurrentVersion); + blobItemInternal.setCurrentVersion(isCurrentVersion); return this; } @@ -281,7 +284,7 @@ public BlobItem setHasVersionsOnly(Boolean hasVersionsOnly) { * @return the isPrefix value. */ public Boolean isPrefix() { - return blobItemInternal.isPrefix() != null && blobItemInternal.isPrefix(); + return isPrefix != null && isPrefix; } /** @@ -291,7 +294,7 @@ public Boolean isPrefix() { * @return the BlobItem object itself. */ public BlobItem setIsPrefix(Boolean isPrefix) { - blobItemInternal.setIsPrefix(isPrefix); + this.isPrefix = isPrefix; return this; } } 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 ccd3b89a3f5bb..af2a46a128a0f 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 @@ -767,7 +767,7 @@ public Boolean isSealed() { * @return the BlobItemProperties object itself. */ public BlobItemProperties setSealed(Boolean sealed) { - internalProperties.setIsSealed(sealed); + internalProperties.setSealed(sealed); return this; } 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 c594741e75564..57fcc15ef4211 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,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -14,30 +13,31 @@ import javax.xml.stream.XMLStreamException; /** - * a summary of request statistics grouped by API in hour or minute aggregates for blobs. + * The metrics properties. */ @Fluent public final class BlobMetrics implements XmlSerializable { + /* - * The version of Storage Analytics to configure. + * The version of the metrics properties. */ @Generated private String version; /* - * Indicates whether metrics are enabled for the Blob service. + * Whether the metrics are enabled. */ @Generated private boolean enabled; /* - * Indicates whether metrics should generate summary statistics for called API operations. + * Whether to include API in the metrics. */ @Generated private Boolean includeApis; /* - * the retention policy which determines how long the associated data should persist + * The retention policy of the metrics. */ @Generated private BlobRetentionPolicy retentionPolicy; @@ -50,8 +50,18 @@ public BlobMetrics() { } /** - * Get the version property: The version of Storage Analytics to configure. - * + * Creates an instance of BlobMetrics class. + * + * @param enabled the enabled value to set. + */ + @Generated + private BlobMetrics(boolean enabled) { + this.enabled = enabled; + } + + /** + * Get the version property: The version of the metrics properties. + * * @return the version value. */ @Generated @@ -60,8 +70,8 @@ public String getVersion() { } /** - * Set the version property: The version of Storage Analytics to configure. - * + * Set the version property: The version of the metrics properties. + * * @param version the version value to set. * @return the BlobMetrics object itself. */ @@ -72,8 +82,8 @@ public BlobMetrics setVersion(String version) { } /** - * Get the enabled property: Indicates whether metrics are enabled for the Blob service. - * + * Get the enabled property: Whether the metrics are enabled. + * * @return the enabled value. */ @Generated @@ -82,8 +92,8 @@ public boolean isEnabled() { } /** - * Set the enabled property: Indicates whether metrics are enabled for the Blob service. - * + * Set the enabled property. + * * @param enabled the enabled value to set. * @return the BlobMetrics object itself. */ @@ -94,9 +104,8 @@ public BlobMetrics setEnabled(boolean enabled) { } /** - * Get the includeApis property: Indicates whether metrics should generate summary statistics for called API - * operations. - * + * Get the includeApis property: Whether to include API in the metrics. + * * @return the includeApis value. */ @Generated @@ -105,9 +114,8 @@ public Boolean isIncludeApis() { } /** - * Set the includeApis property: Indicates whether metrics should generate summary statistics for called API - * operations. - * + * Set the includeApis property: Whether to include API in the metrics. + * * @param includeApis the includeApis value to set. * @return the BlobMetrics object itself. */ @@ -118,9 +126,8 @@ public BlobMetrics setIncludeApis(Boolean includeApis) { } /** - * Get the retentionPolicy property: the retention policy which determines how long the associated data should - * persist. - * + * Get the retentionPolicy property: The retention policy of the metrics. + * * @return the retentionPolicy value. */ @Generated @@ -129,9 +136,8 @@ public BlobRetentionPolicy getRetentionPolicy() { } /** - * Set the retentionPolicy property: the retention policy which determines how long the associated data should - * persist. - * + * Set the retentionPolicy property: The retention policy of the metrics. + * * @param retentionPolicy the retentionPolicy value to set. * @return the BlobMetrics object itself. */ @@ -150,7 +156,7 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName = rootElementName == null || rootElementName.isEmpty() ? "BlobMetrics" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "Metrics" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("Version", this.version); xmlWriter.writeBooleanElement("Enabled", this.enabled); @@ -161,10 +167,11 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. */ @Generated @@ -174,36 +181,42 @@ public static BlobMetrics fromXml(XmlReader xmlReader) throws XMLStreamException /** * 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. */ @Generated public static BlobMetrics fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { String finalRootElementName - = rootElementName == null || rootElementName.isEmpty() ? "BlobMetrics" : rootElementName; + = rootElementName == null || rootElementName.isEmpty() ? "Metrics" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - BlobMetrics deserializedBlobMetrics = new BlobMetrics(); + String version = null; + boolean enabled = false; + Boolean includeApis = null; + BlobRetentionPolicy retentionPolicy = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); - if ("Version".equals(elementName.getLocalPart())) { - deserializedBlobMetrics.version = reader.getStringElement(); + version = reader.getStringElement(); } else if ("Enabled".equals(elementName.getLocalPart())) { - deserializedBlobMetrics.enabled = reader.getBooleanElement(); + enabled = reader.getBooleanElement(); } else if ("IncludeAPIs".equals(elementName.getLocalPart())) { - deserializedBlobMetrics.includeApis = reader.getNullableElement(Boolean::parseBoolean); + includeApis = reader.getNullableElement(Boolean::parseBoolean); } else if ("RetentionPolicy".equals(elementName.getLocalPart())) { - deserializedBlobMetrics.retentionPolicy = BlobRetentionPolicy.fromXml(reader, "RetentionPolicy"); + retentionPolicy = BlobRetentionPolicy.fromXml(reader, "RetentionPolicy"); } else { reader.skipElement(); } } - + BlobMetrics deserializedBlobMetrics = new BlobMetrics(enabled); + deserializedBlobMetrics.version = version; + deserializedBlobMetrics.includeApis = includeApis; + deserializedBlobMetrics.retentionPolicy = retentionPolicy; return deserializedBlobMetrics; }); } 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 6ee8ae5579da7..c414ae1918c63 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 @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// This file is not generated. The Blob TypeSpec does not describe it, so it is maintained by hand; +// edits here are preserved across regeneration. package com.azure.storage.blob.models; 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 2b235727b5a8e..ec56c4fd9522f 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 @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// This file is not generated. The Blob TypeSpec does not describe it, so it is maintained by hand; +// edits here are preserved across regeneration. package com.azure.storage.blob.models; @@ -28,6 +29,9 @@ public final class BlobQueryHeaders { */ private String errorCode; + // Not on the generated header class: the emitter drops the response's Content-Type (the body media type). + private String contentType; + private BlobQueryHeaders(BlobsQueryHeaders internalHeaders) { this.internalHeaders = internalHeaders; } @@ -72,7 +76,7 @@ public BlobQueryHeaders setLastModified(OffsetDateTime lastModified) { * @return the metadata value. */ public Map getMetadata() { - return internalHeaders.getXMsMeta(); + return internalHeaders.getMetadata(); } /** @@ -82,7 +86,7 @@ public Map getMetadata() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setMetadata(Map metadata) { - internalHeaders.setXMsMeta(metadata); + internalHeaders.setMetadata(metadata); return this; } @@ -115,7 +119,7 @@ public BlobQueryHeaders setContentLength(Long contentLength) { * @return the contentType value. */ public String getContentType() { - return internalHeaders.getContentType(); + return contentType; } /** @@ -126,7 +130,7 @@ public String getContentType() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setContentType(String contentType) { - internalHeaders.setContentType(contentType); + this.contentType = contentType; return this; } @@ -186,7 +190,7 @@ public BlobQueryHeaders setETag(String eTag) { * @return the contentMd5 value. */ public byte[] getContentMd5() { - return internalHeaders.getContentMD5(); + return internalHeaders.getContentMd5(); } /** @@ -198,7 +202,7 @@ public byte[] getContentMd5() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setContentMd5(byte[] contentMd5) { - internalHeaders.setContentMD5(contentMd5); + internalHeaders.setContentMd5(contentMd5); return this; } @@ -309,7 +313,7 @@ public BlobQueryHeaders setContentLanguage(String contentLanguage) { * @return the blobSequenceNumber value. */ public Long getBlobSequenceNumber() { - return internalHeaders.getXMsBlobSequenceNumber(); + return internalHeaders.getBlobSequenceNumber(); } /** @@ -320,7 +324,7 @@ public Long getBlobSequenceNumber() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setBlobSequenceNumber(Long blobSequenceNumber) { - internalHeaders.setXMsBlobSequenceNumber(blobSequenceNumber); + internalHeaders.setBlobSequenceNumber(blobSequenceNumber); return this; } @@ -331,7 +335,7 @@ public BlobQueryHeaders setBlobSequenceNumber(Long blobSequenceNumber) { * @return the blobType value. */ public BlobType getBlobType() { - return internalHeaders.getXMsBlobType(); + return internalHeaders.getBlobType(); } /** @@ -342,7 +346,7 @@ public BlobType getBlobType() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setBlobType(BlobType blobType) { - internalHeaders.setXMsBlobType(blobType); + internalHeaders.setBlobType(blobType); return this; } @@ -358,7 +362,7 @@ public BlobQueryHeaders setBlobType(BlobType blobType) { * @return the copyCompletionTime value. */ public OffsetDateTime getCopyCompletionTime() { - return internalHeaders.getXMsCopyCompletionTime(); + return internalHeaders.getCopyCompletionTime(); } /** @@ -374,7 +378,7 @@ public OffsetDateTime getCopyCompletionTime() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setCopyCompletionTime(OffsetDateTime copyCompletionTime) { - internalHeaders.setXMsCopyCompletionTime(copyCompletionTime); + internalHeaders.setCopyCompletionTime(copyCompletionTime); return this; } @@ -389,7 +393,7 @@ public BlobQueryHeaders setCopyCompletionTime(OffsetDateTime copyCompletionTime) * @return the copyStatusDescription value. */ public String getCopyStatusDescription() { - return internalHeaders.getXMsCopyStatusDescription(); + return internalHeaders.getCopyStatusDescription(); } /** @@ -404,7 +408,7 @@ public String getCopyStatusDescription() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setCopyStatusDescription(String copyStatusDescription) { - internalHeaders.setXMsCopyStatusDescription(copyStatusDescription); + internalHeaders.setCopyStatusDescription(copyStatusDescription); return this; } @@ -416,7 +420,7 @@ public BlobQueryHeaders setCopyStatusDescription(String copyStatusDescription) { * @return the copyId value. */ public String getCopyId() { - return internalHeaders.getXMsCopyId(); + return internalHeaders.getCopyId(); } /** @@ -428,7 +432,7 @@ public String getCopyId() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setCopyId(String copyId) { - internalHeaders.setXMsCopyId(copyId); + internalHeaders.setCopyId(copyId); return this; } @@ -444,7 +448,7 @@ public BlobQueryHeaders setCopyId(String copyId) { * @return the copyProgress value. */ public String getCopyProgress() { - return internalHeaders.getXMsCopyProgress(); + return internalHeaders.getCopyProgress(); } /** @@ -460,7 +464,7 @@ public String getCopyProgress() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setCopyProgress(String copyProgress) { - internalHeaders.setXMsCopyProgress(copyProgress); + internalHeaders.setCopyProgress(copyProgress); return this; } @@ -475,7 +479,7 @@ public BlobQueryHeaders setCopyProgress(String copyProgress) { * @return the copySource value. */ public String getCopySource() { - return internalHeaders.getXMsCopySource(); + return internalHeaders.getCopySource(); } /** @@ -490,7 +494,7 @@ public String getCopySource() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setCopySource(String copySource) { - internalHeaders.setXMsCopySource(copySource); + internalHeaders.setCopySource(copySource); return this; } @@ -502,7 +506,7 @@ public BlobQueryHeaders setCopySource(String copySource) { * @return the copyStatus value. */ public CopyStatusType getCopyStatus() { - return internalHeaders.getXMsCopyStatus(); + return internalHeaders.getCopyStatus(); } /** @@ -514,7 +518,7 @@ public CopyStatusType getCopyStatus() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setCopyStatus(CopyStatusType copyStatus) { - internalHeaders.setXMsCopyStatus(copyStatus); + internalHeaders.setCopyStatus(copyStatus); return this; } @@ -526,7 +530,7 @@ public BlobQueryHeaders setCopyStatus(CopyStatusType copyStatus) { * @return the leaseDuration value. */ public LeaseDurationType getLeaseDuration() { - return internalHeaders.getXMsLeaseDuration(); + return internalHeaders.getDuration(); } /** @@ -538,7 +542,7 @@ public LeaseDurationType getLeaseDuration() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setLeaseDuration(LeaseDurationType leaseDuration) { - internalHeaders.setXMsLeaseDuration(leaseDuration); + internalHeaders.setDuration(leaseDuration); return this; } @@ -549,7 +553,7 @@ public BlobQueryHeaders setLeaseDuration(LeaseDurationType leaseDuration) { * @return the leaseState value. */ public LeaseStateType getLeaseState() { - return internalHeaders.getXMsLeaseState(); + return internalHeaders.getLeaseState(); } /** @@ -560,7 +564,7 @@ public LeaseStateType getLeaseState() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setLeaseState(LeaseStateType leaseState) { - internalHeaders.setXMsLeaseState(leaseState); + internalHeaders.setLeaseState(leaseState); return this; } @@ -571,7 +575,7 @@ public BlobQueryHeaders setLeaseState(LeaseStateType leaseState) { * @return the leaseStatus value. */ public LeaseStatusType getLeaseStatus() { - return internalHeaders.getXMsLeaseStatus(); + return internalHeaders.getLeaseStatus(); } /** @@ -582,7 +586,7 @@ public LeaseStatusType getLeaseStatus() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setLeaseStatus(LeaseStatusType leaseStatus) { - internalHeaders.setXMsLeaseStatus(leaseStatus); + internalHeaders.setLeaseStatus(leaseStatus); return this; } @@ -594,7 +598,7 @@ public BlobQueryHeaders setLeaseStatus(LeaseStatusType leaseStatus) { * @return the clientRequestId value. */ public String getClientRequestId() { - return internalHeaders.getXMsClientRequestId(); + return internalHeaders.getClientRequestId(); } /** @@ -606,7 +610,7 @@ public String getClientRequestId() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setClientRequestId(String clientRequestId) { - internalHeaders.setXMsClientRequestId(clientRequestId); + internalHeaders.setClientRequestId(clientRequestId); return this; } @@ -617,7 +621,7 @@ public BlobQueryHeaders setClientRequestId(String clientRequestId) { * @return the requestId value. */ public String getRequestId() { - return internalHeaders.getXMsRequestId(); + return internalHeaders.getRequestId(); } /** @@ -628,7 +632,7 @@ public String getRequestId() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setRequestId(String requestId) { - internalHeaders.setXMsRequestId(requestId); + internalHeaders.setRequestId(requestId); return this; } @@ -640,7 +644,7 @@ public BlobQueryHeaders setRequestId(String requestId) { * @return the version value. */ public String getVersion() { - return internalHeaders.getXMsVersion(); + return internalHeaders.getVersion(); } /** @@ -652,7 +656,7 @@ public String getVersion() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setVersion(String version) { - internalHeaders.setXMsVersion(version); + internalHeaders.setVersion(version); return this; } @@ -707,7 +711,7 @@ public BlobQueryHeaders setDateProperty(OffsetDateTime dateProperty) { * @return the blobCommittedBlockCount value. */ public Integer getBlobCommittedBlockCount() { - return internalHeaders.getXMsBlobCommittedBlockCount(); + return internalHeaders.getBlobCommittedBlockCount(); } /** @@ -718,7 +722,7 @@ public Integer getBlobCommittedBlockCount() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setBlobCommittedBlockCount(Integer blobCommittedBlockCount) { - internalHeaders.setXMsBlobCommittedBlockCount(blobCommittedBlockCount); + internalHeaders.setBlobCommittedBlockCount(blobCommittedBlockCount); return this; } @@ -732,7 +736,7 @@ public BlobQueryHeaders setBlobCommittedBlockCount(Integer blobCommittedBlockCou * @return the serverEncrypted value. */ public Boolean isServerEncrypted() { - return internalHeaders.isXMsServerEncrypted(); + return internalHeaders.isServerEncrypted(); } /** @@ -746,7 +750,7 @@ public Boolean isServerEncrypted() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setServerEncrypted(Boolean serverEncrypted) { - internalHeaders.setXMsServerEncrypted(serverEncrypted); + internalHeaders.setServerEncrypted(serverEncrypted); return this; } @@ -758,7 +762,7 @@ public BlobQueryHeaders setServerEncrypted(Boolean serverEncrypted) { * @return the encryptionKeySha256 value. */ public String getEncryptionKeySha256() { - return internalHeaders.getXMsEncryptionKeySha256(); + return internalHeaders.getEncryptionKeySha256(); } /** @@ -770,7 +774,7 @@ public String getEncryptionKeySha256() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setEncryptionKeySha256(String encryptionKeySha256) { - internalHeaders.setXMsEncryptionKeySha256(encryptionKeySha256); + internalHeaders.setEncryptionKeySha256(encryptionKeySha256); return this; } @@ -783,7 +787,7 @@ public BlobQueryHeaders setEncryptionKeySha256(String encryptionKeySha256) { * @return the encryptionScope value. */ public String getEncryptionScope() { - return internalHeaders.getXMsEncryptionScope(); + return internalHeaders.getEncryptionScope(); } /** @@ -796,7 +800,7 @@ public String getEncryptionScope() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setEncryptionScope(String encryptionScope) { - internalHeaders.setXMsEncryptionScope(encryptionScope); + internalHeaders.setEncryptionScope(encryptionScope); return this; } @@ -810,7 +814,7 @@ public BlobQueryHeaders setEncryptionScope(String encryptionScope) { * @return the blobContentMd5 value. */ public byte[] getBlobContentMd5() { - return internalHeaders.getXMsBlobContentMd5(); + return internalHeaders.getBlobContentMd5(); } /** @@ -824,7 +828,7 @@ public byte[] getBlobContentMd5() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setBlobContentMd5(byte[] blobContentMd5) { - internalHeaders.setXMsBlobContentMd5(blobContentMd5); + internalHeaders.setBlobContentMd5(blobContentMd5); return this; } @@ -839,7 +843,7 @@ public BlobQueryHeaders setBlobContentMd5(byte[] blobContentMd5) { * @return the contentCrc64 value. */ public byte[] getContentCrc64() { - return internalHeaders.getXMsContentCrc64(); + return internalHeaders.getContentCrc64(); } /** @@ -854,7 +858,7 @@ public byte[] getContentCrc64() { * @return the BlobQueryHeaders object itself. */ public BlobQueryHeaders setContentCrc64(byte[] contentCrc64) { - internalHeaders.setXMsContentCrc64(contentCrc64); + internalHeaders.setContentCrc64(contentCrc64); return this; } 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 6b4042dbc0d93..9031d8567ad32 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,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -14,23 +13,29 @@ import javax.xml.stream.XMLStreamException; /** - * the retention policy which determines how long the associated data should persist. + * The retention policy. */ @Fluent public final class BlobRetentionPolicy implements XmlSerializable { + /* - * Indicates whether a retention policy is enabled for the storage service + * Whether the policy is enabled. */ @Generated 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 + * The number of days to retain the logs. */ @Generated private Integer days; + /* + * Whether to allow permanent delete. + */ + @Generated + private Boolean allowPermanentDelete; + /** * Creates an instance of BlobRetentionPolicy class. */ @@ -39,8 +44,18 @@ public BlobRetentionPolicy() { } /** - * Get the enabled property: Indicates whether a retention policy is enabled for the storage service. - * + * Creates an instance of BlobRetentionPolicy class. + * + * @param enabled the enabled value to set. + */ + @Generated + private BlobRetentionPolicy(boolean enabled) { + this.enabled = enabled; + } + + /** + * Get the enabled property: Whether the policy is enabled. + * * @return the enabled value. */ @Generated @@ -49,8 +64,8 @@ public boolean isEnabled() { } /** - * Set the enabled property: Indicates whether a retention policy is enabled for the storage service. - * + * Set the enabled property. + * * @param enabled the enabled value to set. * @return the BlobRetentionPolicy object itself. */ @@ -61,9 +76,8 @@ 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. - * + * Get the days property: The number of days to retain the logs. + * * @return the days value. */ @Generated @@ -72,9 +86,8 @@ 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. - * + * Set the days property: The number of days to retain the logs. + * * @param days the days value to set. * @return the BlobRetentionPolicy object itself. */ @@ -84,6 +97,28 @@ public BlobRetentionPolicy setDays(Integer days) { return this; } + /** + * Get the allowPermanentDelete property: Whether to allow permanent delete. + * + * @return the allowPermanentDelete value. + */ + @Generated + public Boolean isAllowPermanentDelete() { + return this.allowPermanentDelete; + } + + /** + * Set the allowPermanentDelete property: Whether to allow permanent delete. + * + * @param allowPermanentDelete the allowPermanentDelete value to set. + * @return the BlobRetentionPolicy object itself. + */ + @Generated + public BlobRetentionPolicy setAllowPermanentDelete(Boolean allowPermanentDelete) { + this.allowPermanentDelete = allowPermanentDelete; + return this; + } + @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @@ -93,20 +128,21 @@ public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLStreamException { - rootElementName - = rootElementName == null || rootElementName.isEmpty() ? "BlobRetentionPolicy" : rootElementName; + rootElementName = rootElementName == null || rootElementName.isEmpty() ? "RetentionPolicy" : rootElementName; xmlWriter.writeStartElement(rootElementName); xmlWriter.writeBooleanElement("Enabled", this.enabled); xmlWriter.writeNumberElement("Days", this.days); + xmlWriter.writeBooleanElement("AllowPermanentDelete", this.allowPermanentDelete); 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. */ @Generated @@ -116,32 +152,38 @@ public static BlobRetentionPolicy fromXml(XmlReader xmlReader) throws XMLStreamE /** * 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. */ @Generated public static BlobRetentionPolicy fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { String finalRootElementName - = rootElementName == null || rootElementName.isEmpty() ? "BlobRetentionPolicy" : rootElementName; + = rootElementName == null || rootElementName.isEmpty() ? "RetentionPolicy" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - BlobRetentionPolicy deserializedBlobRetentionPolicy = new BlobRetentionPolicy(); + boolean enabled = false; + Integer days = null; + Boolean allowPermanentDelete = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); - if ("Enabled".equals(elementName.getLocalPart())) { - deserializedBlobRetentionPolicy.enabled = reader.getBooleanElement(); + enabled = reader.getBooleanElement(); } else if ("Days".equals(elementName.getLocalPart())) { - deserializedBlobRetentionPolicy.days = reader.getNullableElement(Integer::parseInt); + days = reader.getNullableElement(Integer::parseInt); + } else if ("AllowPermanentDelete".equals(elementName.getLocalPart())) { + allowPermanentDelete = reader.getNullableElement(Boolean::parseBoolean); } else { reader.skipElement(); } } - + BlobRetentionPolicy deserializedBlobRetentionPolicy = new BlobRetentionPolicy(enabled); + deserializedBlobRetentionPolicy.days = days; + deserializedBlobRetentionPolicy.allowPermanentDelete = allowPermanentDelete; 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 bca534287dc66..e0082f3314c80 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; @@ -16,49 +16,48 @@ import javax.xml.stream.XMLStreamException; /** - * Storage Service Properties. + * The blob service properties. */ @Fluent public final class BlobServiceProperties implements XmlSerializable { /* - * Azure Analytics Logging settings. + * The logging properties. */ @Generated private BlobAnalyticsLogging logging; /* - * a summary of request statistics grouped by API in hour or minute aggregates for blobs + * The hour metrics properties. */ @Generated private BlobMetrics hourMetrics; /* - * a summary of request statistics grouped by API in hour or minute aggregates for blobs + * The minute metrics properties. */ @Generated private BlobMetrics minuteMetrics; /* - * The set of CORS rules. + * The CORS properties. */ @Generated 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 service version. */ @Generated private String defaultServiceVersion; /* - * the retention policy which determines how long the associated data should persist + * The delete retention policy. */ @Generated private BlobRetentionPolicy deleteRetentionPolicy; /* - * The properties that enable an account to host a static website + * The static website properties. */ @Generated private StaticWebsite staticWebsite; @@ -71,7 +70,7 @@ public BlobServiceProperties() { } /** - * Get the logging property: Azure Analytics Logging settings. + * Get the logging property: The logging properties. * * @return the logging value. */ @@ -81,7 +80,7 @@ public BlobAnalyticsLogging getLogging() { } /** - * Set the logging property: Azure Analytics Logging settings. + * Set the logging property: The logging properties. * * @param logging the logging value to set. * @return the BlobServiceProperties object itself. @@ -93,8 +92,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. + * Get the hourMetrics property: The hour metrics properties. * * @return the hourMetrics value. */ @@ -104,8 +102,7 @@ public BlobMetrics getHourMetrics() { } /** - * Set the hourMetrics property: a summary of request statistics grouped by API in hour or minute aggregates for - * blobs. + * Set the hourMetrics property: The hour metrics properties. * * @param hourMetrics the hourMetrics value to set. * @return the BlobServiceProperties object itself. @@ -117,8 +114,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. + * Get the minuteMetrics property: The minute metrics properties. * * @return the minuteMetrics value. */ @@ -128,8 +124,7 @@ public BlobMetrics getMinuteMetrics() { } /** - * Set the minuteMetrics property: a summary of request statistics grouped by API in hour or minute aggregates for - * blobs. + * Set the minuteMetrics property: The minute metrics properties. * * @param minuteMetrics the minuteMetrics value to set. * @return the BlobServiceProperties object itself. @@ -141,7 +136,7 @@ public BlobServiceProperties setMinuteMetrics(BlobMetrics minuteMetrics) { } /** - * Get the cors property: The set of CORS rules. + * Get the cors property: The CORS properties. * * @return the cors value. */ @@ -154,7 +149,7 @@ public List getCors() { } /** - * Set the cors property: The set of CORS rules. + * Set the cors property: The CORS properties. * * @param cors the cors value to set. * @return the BlobServiceProperties object itself. @@ -166,9 +161,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. + * Get the defaultServiceVersion property: The default service version. * * @return the defaultServiceVersion value. */ @@ -178,9 +171,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. + * Set the defaultServiceVersion property: The default service version. * * @param defaultServiceVersion the defaultServiceVersion value to set. * @return the BlobServiceProperties object itself. @@ -192,8 +183,7 @@ public BlobServiceProperties setDefaultServiceVersion(String defaultServiceVersi } /** - * Get the deleteRetentionPolicy property: the retention policy which determines how long the associated data should - * persist. + * Get the deleteRetentionPolicy property: The delete retention policy. * * @return the deleteRetentionPolicy value. */ @@ -203,8 +193,7 @@ public BlobRetentionPolicy getDeleteRetentionPolicy() { } /** - * Set the deleteRetentionPolicy property: the retention policy which determines how long the associated data should - * persist. + * Set the deleteRetentionPolicy property: The delete retention policy. * * @param deleteRetentionPolicy the deleteRetentionPolicy value to set. * @return the BlobServiceProperties object itself. @@ -216,7 +205,7 @@ public BlobServiceProperties setDeleteRetentionPolicy(BlobRetentionPolicy delete } /** - * Get the staticWebsite property: The properties that enable an account to host a static website. + * Get the staticWebsite property: The static website properties. * * @return the staticWebsite value. */ @@ -226,7 +215,7 @@ public StaticWebsite getStaticWebsite() { } /** - * Set the staticWebsite property: The properties that enable an account to host a static website. + * Set the staticWebsite property: The static website properties. * * @param staticWebsite the staticWebsite value to set. * @return the BlobServiceProperties object itself. 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 81f3d6928ec63..2d81e8d19676e 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,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -18,8 +17,9 @@ */ @Fluent public final class BlobServiceStatistics implements XmlSerializable { + /* - * Geo-Replication information for the Secondary Storage Service + * The geo-replication stats. */ @Generated private GeoReplication geoReplication; @@ -32,8 +32,8 @@ public BlobServiceStatistics() { } /** - * Get the geoReplication property: Geo-Replication information for the Secondary Storage Service. - * + * Get the geoReplication property: The geo-replication stats. + * * @return the geoReplication value. */ @Generated @@ -42,8 +42,8 @@ public GeoReplication getGeoReplication() { } /** - * Set the geoReplication property: Geo-Replication information for the Secondary Storage Service. - * + * Set the geoReplication property. + * * @param geoReplication the geoReplication value to set. * @return the BlobServiceStatistics object itself. */ @@ -71,7 +71,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. @@ -84,7 +84,7 @@ public static BlobServiceStatistics fromXml(XmlReader xmlReader) throws XMLStrea /** * 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. @@ -100,14 +100,12 @@ public static BlobServiceStatistics fromXml(XmlReader xmlReader, String rootElem 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 6955bfddf97d0..ed7e2e39a78db 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,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -14,18 +13,19 @@ import javax.xml.stream.XMLStreamException; /** - * signed identifier. + * A signed identifier. */ @Fluent public final class BlobSignedIdentifier implements XmlSerializable { + /* - * a unique id + * The unique ID for the signed identifier. */ @Generated private String id; /* - * An Access policy + * The access policy for the signed identifier. */ @Generated private BlobAccessPolicy accessPolicy; @@ -38,8 +38,18 @@ public BlobSignedIdentifier() { } /** - * Get the id property: a unique id. - * + * Creates an instance of BlobSignedIdentifier class. + * + * @param id the id value to set. + */ + @Generated + private BlobSignedIdentifier(String id) { + this.id = id; + } + + /** + * Get the id property: The unique ID for the signed identifier. + * * @return the id value. */ @Generated @@ -48,8 +58,8 @@ public String getId() { } /** - * Set the id property: a unique id. - * + * Set the id property. + * * @param id the id value to set. * @return the BlobSignedIdentifier object itself. */ @@ -60,8 +70,8 @@ public BlobSignedIdentifier setId(String id) { } /** - * Get the accessPolicy property: An Access policy. - * + * Get the accessPolicy property: The access policy for the signed identifier. + * * @return the accessPolicy value. */ @Generated @@ -70,8 +80,8 @@ public BlobAccessPolicy getAccessPolicy() { } /** - * Set the accessPolicy property: An Access policy. - * + * Set the accessPolicy property: The access policy for the signed identifier. + * * @param accessPolicy the accessPolicy value to set. * @return the BlobSignedIdentifier object itself. */ @@ -99,10 +109,11 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. */ @Generated @@ -112,12 +123,13 @@ public static BlobSignedIdentifier fromXml(XmlReader xmlReader) throws XMLStream /** * 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. */ @Generated @@ -125,19 +137,20 @@ public static BlobSignedIdentifier fromXml(XmlReader xmlReader, String rootEleme String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "SignedIdentifier" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - BlobSignedIdentifier deserializedBlobSignedIdentifier = new BlobSignedIdentifier(); + String id = null; + BlobAccessPolicy accessPolicy = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); - if ("Id".equals(elementName.getLocalPart())) { - deserializedBlobSignedIdentifier.id = reader.getStringElement(); + id = reader.getStringElement(); } else if ("AccessPolicy".equals(elementName.getLocalPart())) { - deserializedBlobSignedIdentifier.accessPolicy = BlobAccessPolicy.fromXml(reader, "AccessPolicy"); + accessPolicy = BlobAccessPolicy.fromXml(reader, "AccessPolicy"); } else { reader.skipElement(); } } - + BlobSignedIdentifier deserializedBlobSignedIdentifier = new BlobSignedIdentifier(id); + deserializedBlobSignedIdentifier.accessPolicy = accessPolicy; 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 8e4447a018fdf..631e26cf5ce19 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 @@ -1,25 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; /** - * Defines values for BlobType. + * The blob type. */ public enum BlobType { /** - * Enum value BlockBlob. + * The blob is a block blob. */ BLOCK_BLOB("BlockBlob"), /** - * Enum value PageBlob. + * The blob is a page blob. */ PAGE_BLOB("PageBlob"), /** - * Enum value AppendBlob. + * The blob is an append blob. */ APPEND_BLOB("AppendBlob"); 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 e87618f8d23c9..ee94133512adb 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -13,7 +13,7 @@ import javax.xml.stream.XMLStreamException; /** - * Represents a single block in a block blob. It describes the block's ID and size. + * Represents a single block in a block blob. */ @Fluent public final class Block implements XmlSerializable { @@ -30,17 +30,23 @@ public final class Block implements XmlSerializable { @Generated private long sizeLong; - /* - * The SizeInt property. + /** + * Creates an instance of Block class. */ @Generated - private int sizeInt; + public Block() { + } /** * Creates an instance of Block class. + * + * @param name the name value to set. + * @param sizeLong the sizeLong value to set. */ @Generated - public Block() { + private Block(String name, long sizeLong) { + this.name = name; + this.sizeLong = sizeLong; } /** @@ -54,7 +60,7 @@ public String getName() { } /** - * Set the name property: The base64 encoded block ID. + * Set the name property. * * @param name the name value to set. * @return the Block object itself. @@ -76,7 +82,7 @@ public long getSizeLong() { } /** - * Set the sizeLong property: The block size in bytes. + * Set the sizeLong property. * * @param sizeLong the sizeLong value to set. * @return the Block object itself. @@ -87,32 +93,6 @@ public Block setSizeLong(long sizeLong) { return this; } - /** - * Get the sizeInt property: The SizeInt property. - * - * @return the sizeInt value. - * @deprecated Use {@link #getSizeLong()} - */ - @Generated - @Deprecated - public int getSize() { - return (int) this.sizeLong; - } - - /** - * Set the sizeInt property: The SizeInt property. - * - * @param sizeInt the sizeInt value to set. - * @return the Block object itself. - * @deprecated Use {@link #setSizeLong(long)} - */ - @Generated - @Deprecated - public Block setSize(int sizeInt) { - this.sizeInt = sizeInt; - return this.setSizeLong(sizeInt); - } - @Generated @Override public XmlWriter toXml(XmlWriter xmlWriter) throws XMLStreamException { @@ -126,7 +106,6 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt xmlWriter.writeStartElement(rootElementName); xmlWriter.writeStringElement("Name", this.name); xmlWriter.writeLongElement("Size", this.sizeLong); - xmlWriter.writeIntElement("SizeInt", this.sizeInt); return xmlWriter.writeEndElement(); } @@ -136,6 +115,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt * @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. */ @Generated @@ -151,26 +131,49 @@ public static Block fromXml(XmlReader xmlReader) throws XMLStreamException { * 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. */ @Generated public static Block fromXml(XmlReader xmlReader, String rootElementName) throws XMLStreamException { String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "Block" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - Block deserializedBlock = new Block(); + String name = null; + long sizeLong = 0L; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); if ("Name".equals(elementName.getLocalPart())) { - deserializedBlock.name = reader.getStringElement(); + name = reader.getStringElement(); } else if ("Size".equals(elementName.getLocalPart())) { - deserializedBlock.sizeLong = reader.getLongElement(); - } else if ("SizeInt".equals(elementName.getLocalPart())) { - deserializedBlock.sizeInt = reader.getIntElement(); + sizeLong = reader.getLongElement(); } else { reader.skipElement(); } } - return deserializedBlock; + return new Block(name, sizeLong); }); } + + /** + * Get the size property: The block size in bytes. + * + * @return the size value. + * @deprecated Use {@link #getSizeLong()} + */ + @Deprecated + public int getSize() { + return (int) this.sizeLong; + } + + /** + * Set the size property: The block size in bytes. + * + * @param size the size value to set. + * @return the Block object itself. + * @deprecated Use {@link #setSizeLong(long)} + */ + @Deprecated + public Block setSize(int size) { + return this.setSizeLong(size); + } } 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 4f92e4210d628..0ec3bf56b7497 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 @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -16,18 +15,19 @@ import javax.xml.stream.XMLStreamException; /** - * The BlockList model. + * Contains the committed and uncommitted blocks in a block blob. */ @Fluent public final class BlockList implements XmlSerializable { + /* - * The CommittedBlocks property. + * The list of committed blocks. */ @Generated private List committedBlocks; /* - * The UncommittedBlocks property. + * The list of uncommitted blocks. */ @Generated private List uncommittedBlocks; @@ -40,8 +40,8 @@ public BlockList() { } /** - * Get the committedBlocks property: The CommittedBlocks property. - * + * Get the committedBlocks property: The list of committed blocks. + * * @return the committedBlocks value. */ @Generated @@ -53,8 +53,8 @@ public List getCommittedBlocks() { } /** - * Set the committedBlocks property: The CommittedBlocks property. - * + * Set the committedBlocks property. + * * @param committedBlocks the committedBlocks value to set. * @return the BlockList object itself. */ @@ -65,8 +65,8 @@ public BlockList setCommittedBlocks(List committedBlocks) { } /** - * Get the uncommittedBlocks property: The UncommittedBlocks property. - * + * Get the uncommittedBlocks property: The list of uncommitted blocks. + * * @return the uncommittedBlocks value. */ @Generated @@ -78,8 +78,8 @@ public List getUncommittedBlocks() { } /** - * Set the uncommittedBlocks property: The UncommittedBlocks property. - * + * Set the uncommittedBlocks property. + * * @param uncommittedBlocks the uncommittedBlocks value to set. * @return the BlockList object itself. */ @@ -119,7 +119,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. @@ -132,7 +132,7 @@ public static BlockList fromXml(XmlReader xmlReader) throws XMLStreamException { /** * 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. @@ -148,7 +148,6 @@ public static BlockList fromXml(XmlReader xmlReader, String rootElementName) thr 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(); @@ -177,7 +176,6 @@ public static BlockList fromXml(XmlReader xmlReader, String rootElementName) thr 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 1169afc1805a3..6e2ce38116f39 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 @@ -1,25 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; /** - * Defines values for BlockListType. + * The block list types. */ public enum BlockListType { /** - * Enum value committed. + * Committed blocks. */ COMMITTED("committed"), /** - * Enum value uncommitted. + * Uncommitted blocks. */ UNCOMMITTED("uncommitted"), /** - * Enum value all. + * Both committed and uncommitted blocks. */ ALL("all"); 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 c47a03bae01bc..51149ef5f73ef 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 @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -16,24 +15,25 @@ import javax.xml.stream.XMLStreamException; /** - * The BlockLookupList model. + * The block lookup list. */ @Fluent public final class BlockLookupList implements XmlSerializable { + /* - * The Committed property. + * The committed blocks. */ @Generated private List committed = new ArrayList<>(); /* - * The Uncommitted property. + * The uncommitted blocks. */ @Generated private List uncommitted = new ArrayList<>(); /* - * The Latest property. + * The latest blocks. */ @Generated private List latest = new ArrayList<>(); @@ -46,8 +46,8 @@ public BlockLookupList() { } /** - * Get the committed property: The Committed property. - * + * Get the committed property: The committed blocks. + * * @return the committed value. */ @Generated @@ -56,8 +56,8 @@ public List getCommitted() { } /** - * Set the committed property: The Committed property. - * + * Set the committed property: The committed blocks. + * * @param committed the committed value to set. * @return the BlockLookupList object itself. */ @@ -68,8 +68,8 @@ public BlockLookupList setCommitted(List committed) { } /** - * Get the uncommitted property: The Uncommitted property. - * + * Get the uncommitted property: The uncommitted blocks. + * * @return the uncommitted value. */ @Generated @@ -78,8 +78,8 @@ public List getUncommitted() { } /** - * Set the uncommitted property: The Uncommitted property. - * + * Set the uncommitted property: The uncommitted blocks. + * * @param uncommitted the uncommitted value to set. * @return the BlockLookupList object itself. */ @@ -90,8 +90,8 @@ public BlockLookupList setUncommitted(List uncommitted) { } /** - * Get the latest property: The Latest property. - * + * Get the latest property: The latest blocks. + * * @return the latest value. */ @Generated @@ -100,8 +100,8 @@ public List getLatest() { } /** - * Set the latest property: The Latest property. - * + * Set the latest property: The latest blocks. + * * @param latest the latest value to set. * @return the BlockLookupList object itself. */ @@ -142,7 +142,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. @@ -155,7 +155,7 @@ public static BlockLookupList fromXml(XmlReader xmlReader) throws XMLStreamExcep /** * 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. @@ -171,7 +171,6 @@ public static BlockLookupList fromXml(XmlReader xmlReader, String rootElementNam 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())) { @@ -182,7 +181,6 @@ public static BlockLookupList fromXml(XmlReader xmlReader, String rootElementNam 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 e547cf3f5e85d..b6cb1244a1f77 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 @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -14,18 +13,19 @@ import javax.xml.stream.XMLStreamException; /** - * The ClearRange model. + * A clear range. */ @Fluent public final class ClearRange implements XmlSerializable { + /* - * The Start property. + * The start of the byte range. */ @Generated private long start; /* - * The End property. + * The end of the byte range. */ @Generated private long end; @@ -38,8 +38,20 @@ public ClearRange() { } /** - * Get the start property: The Start property. - * + * Creates an instance of ClearRange class. + * + * @param start the start value to set. + * @param end the end value to set. + */ + @Generated + private ClearRange(long start, long end) { + this.start = start; + this.end = end; + } + + /** + * Get the start property: The start of the byte range. + * * @return the start value. */ @Generated @@ -48,8 +60,8 @@ public long getStart() { } /** - * Set the start property: The Start property. - * + * Set the start property. + * * @param start the start value to set. * @return the ClearRange object itself. */ @@ -60,8 +72,8 @@ public ClearRange setStart(long start) { } /** - * Get the end property: The End property. - * + * Get the end property: The end of the byte range. + * * @return the end value. */ @Generated @@ -70,8 +82,8 @@ public long getEnd() { } /** - * Set the end property: The End property. - * + * Set the end property. + * * @param end the end value to set. * @return the ClearRange object itself. */ @@ -99,10 +111,11 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. */ @Generated @@ -112,12 +125,13 @@ public static ClearRange fromXml(XmlReader xmlReader) throws XMLStreamException /** * 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. */ @Generated @@ -125,20 +139,19 @@ public static ClearRange fromXml(XmlReader xmlReader, String rootElementName) th String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "ClearRange" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - ClearRange deserializedClearRange = new ClearRange(); + long start = 0L; + long end = 0L; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); - if ("Start".equals(elementName.getLocalPart())) { - deserializedClearRange.start = reader.getLongElement(); + start = reader.getLongElement(); } else if ("End".equals(elementName.getLocalPart())) { - deserializedClearRange.end = reader.getLongElement(); + end = reader.getLongElement(); } else { reader.skipElement(); } } - - return deserializedClearRange; + return new ClearRange(start, end); }); } } 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 7ff46019be09f..490731e07d45d 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 @@ -1,30 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; /** - * Defines values for CopyStatusType. + * The copy status. */ public enum CopyStatusType { + /** - * Enum value pending. + * The copy operation is pending. */ PENDING("pending"), - /** - * Enum value success. + * The copy operation succeeded. */ SUCCESS("success"), - /** - * Enum value aborted. + * The copy operation was aborted. */ ABORTED("aborted"), - /** - * Enum value failed. + * The copy operation failed. */ FAILED("failed"); @@ -39,7 +36,7 @@ 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. */ 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 cea0834b1f03d..a4dfa8a220c16 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,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// This file is not generated. The Blob TypeSpec does not describe it, so it is maintained by hand; +// edits here are preserved across regeneration. package com.azure.storage.blob.models; 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 d0905a9f3e024..51f5eb98d563b 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 @@ -1,20 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; /** - * Defines values for DeleteSnapshotsOptionType. + * Specifies the delete behavior of blob snapshots. */ public enum DeleteSnapshotsOptionType { + /** - * Enum value include. + * Delete the blob and snapshots. */ INCLUDE("include"), - /** - * Enum value only. + * Only delete the snapshots. */ ONLY("only"); @@ -29,7 +28,7 @@ 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. */ 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 182cc57063a77..c7408b63d2952 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 @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; /** - * Defines values for EncryptionAlgorithmType. + * The algorithm used to produce the encryption key hash. */ public enum EncryptionAlgorithmType { /** - * Enum value AES256. + * The AES256 encryption algorithm. */ AES256("AES256"); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/FileShareTokenIntent.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/FileShareTokenIntent.java index 4a757bbce1761..4f2c7fdbdcc3e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/FileShareTokenIntent.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/FileShareTokenIntent.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; @@ -9,11 +9,11 @@ import java.util.Collection; /** - * Defines values for FileShareTokenIntent. + * The file share token intent types. */ public final class FileShareTokenIntent extends ExpandableStringEnum { /** - * Static value backup for FileShareTokenIntent. + * The file share token intent is backup. */ @Generated public static final FileShareTokenIntent BACKUP = fromString("backup"); 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 1223c6d98cfb3..857cab09216ca 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 @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -17,18 +16,19 @@ import javax.xml.stream.XMLStreamException; /** - * Geo-Replication information for the Secondary Storage Service. + * Geo-replication information for the secondary storage service. */ @Fluent public final class GeoReplication implements XmlSerializable { + /* - * The status of the secondary location + * The status of the secondary location. */ @Generated private GeoReplicationStatus status; /* - * A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available for + * A date-time value that indicates where 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. */ @Generated @@ -41,9 +41,25 @@ public final class GeoReplication implements XmlSerializable { public GeoReplication() { } + /** + * Creates an instance of GeoReplication class. + * + * @param status the status value to set. + * @param lastSyncTime the lastSyncTime value to set. + */ + @Generated + private GeoReplication(GeoReplicationStatus status, OffsetDateTime lastSyncTime) { + this.status = status; + if (lastSyncTime == null) { + this.lastSyncTime = null; + } else { + this.lastSyncTime = new DateTimeRfc1123(lastSyncTime); + } + } + /** * Get the status property: The status of the secondary location. - * + * * @return the status value. */ @Generated @@ -52,8 +68,8 @@ public GeoReplicationStatus getStatus() { } /** - * Set the status property: The status of the secondary location. - * + * Set the status property. + * * @param status the status value to set. * @return the GeoReplication object itself. */ @@ -64,10 +80,10 @@ public GeoReplication setStatus(GeoReplicationStatus status) { } /** - * Get the lastSyncTime property: A GMT date/time value, to the second. All primary writes preceding this value are + * Get the lastSyncTime property: A date-time value that indicates where 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. */ @Generated @@ -79,20 +95,14 @@ 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. - * + * Set the lastSyncTime property. + * * @param lastSyncTime the lastSyncTime value to set. * @return the GeoReplication object itself. */ @Generated public GeoReplication setLastSyncTime(OffsetDateTime lastSyncTime) { - if (lastSyncTime == null) { - this.lastSyncTime = null; - } else { - this.lastSyncTime = new DateTimeRfc1123(lastSyncTime); - } + this.lastSyncTime = lastSyncTime == null ? null : new DateTimeRfc1123(lastSyncTime); return this; } @@ -114,10 +124,11 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. */ @Generated @@ -127,12 +138,13 @@ public static GeoReplication fromXml(XmlReader xmlReader) throws XMLStreamExcept /** * 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. */ @Generated @@ -140,20 +152,22 @@ public static GeoReplication fromXml(XmlReader xmlReader, String rootElementName String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "GeoReplication" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - GeoReplication deserializedGeoReplication = new GeoReplication(); + GeoReplicationStatus status = null; + OffsetDateTime lastSyncTime = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); - if ("Status".equals(elementName.getLocalPart())) { - deserializedGeoReplication.status = GeoReplicationStatus.fromString(reader.getStringElement()); + status = GeoReplicationStatus.fromString(reader.getStringElement()); } else if ("LastSyncTime".equals(elementName.getLocalPart())) { - deserializedGeoReplication.lastSyncTime = reader.getNullableElement(DateTimeRfc1123::new); + DateTimeRfc1123 lastSyncTimeHolder = reader.getNullableElement(DateTimeRfc1123::new); + if (lastSyncTimeHolder != null) { + lastSyncTime = lastSyncTimeHolder.getDateTime(); + } } else { reader.skipElement(); } } - - return deserializedGeoReplication; + return new GeoReplication(status, lastSyncTime); }); } } 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 4b0f4f8faf34e..63aa28749fd5d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; @@ -9,23 +9,23 @@ import java.util.Collection; /** - * The status of the secondary location. + * The geo-replication status. */ public final class GeoReplicationStatus extends ExpandableStringEnum { /** - * Static value live for GeoReplicationStatus. + * Geo-replication is live. */ @Generated public static final GeoReplicationStatus LIVE = fromString("live"); /** - * Static value bootstrap for GeoReplicationStatus. + * Geo-replication is bootstrap. */ @Generated public static final GeoReplicationStatus BOOTSTRAP = fromString("bootstrap"); /** - * Static value unavailable for GeoReplicationStatus. + * Geo-replication is unavailable. */ @Generated public static final GeoReplicationStatus UNAVAILABLE = fromString("unavailable"); 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 8ec2b6cf3a583..aaa131b802ff6 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 @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -18,20 +17,21 @@ */ @Fluent public final class KeyInfo implements XmlSerializable { + /* - * The date-time the key is active in ISO 8601 UTC time + * The date-time the key is active. */ @Generated private String start; /* - * The date-time the key expires in ISO 8601 UTC time + * The date-time the key expires. */ @Generated private String expiry; /* - * The delegated user tenant id in Azure AD + * The delegated user tenant ID in Entra ID. */ @Generated private String delegatedUserTenantId; @@ -44,8 +44,20 @@ public KeyInfo() { } /** - * Get the start property: The date-time the key is active in ISO 8601 UTC time. - * + * Creates an instance of KeyInfo class. + * + * @param start the start value to set. + * @param expiry the expiry value to set. + */ + @Generated + private KeyInfo(String start, String expiry) { + this.start = start; + this.expiry = expiry; + } + + /** + * Get the start property: The date-time the key is active. + * * @return the start value. */ @Generated @@ -54,8 +66,8 @@ public String getStart() { } /** - * Set the start property: The date-time the key is active in ISO 8601 UTC time. - * + * Set the start property. + * * @param start the start value to set. * @return the KeyInfo object itself. */ @@ -66,8 +78,8 @@ public KeyInfo setStart(String start) { } /** - * Get the expiry property: The date-time the key expires in ISO 8601 UTC time. - * + * Get the expiry property: The date-time the key expires. + * * @return the expiry value. */ @Generated @@ -76,8 +88,8 @@ public String getExpiry() { } /** - * Set the expiry property: The date-time the key expires in ISO 8601 UTC time. - * + * Set the expiry property. + * * @param expiry the expiry value to set. * @return the KeyInfo object itself. */ @@ -88,8 +100,8 @@ public KeyInfo setExpiry(String expiry) { } /** - * Get the delegatedUserTenantId property: The delegated user tenant id in Azure AD. - * + * Get the delegatedUserTenantId property: The delegated user tenant ID in Entra ID. + * * @return the delegatedUserTenantId value. */ @Generated @@ -98,8 +110,8 @@ public String getDelegatedUserTenantId() { } /** - * Set the delegatedUserTenantId property: The delegated user tenant id in Azure AD. - * + * Set the delegatedUserTenantId property: The delegated user tenant ID in Entra ID. + * * @param delegatedUserTenantId the delegatedUserTenantId value to set. * @return the KeyInfo object itself. */ @@ -128,10 +140,11 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. */ @Generated @@ -141,12 +154,13 @@ public static KeyInfo fromXml(XmlReader xmlReader) throws XMLStreamException { /** * 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. */ @Generated @@ -154,21 +168,23 @@ public static KeyInfo fromXml(XmlReader xmlReader, String rootElementName) throw String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "KeyInfo" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - KeyInfo deserializedKeyInfo = new KeyInfo(); + String start = null; + String expiry = null; + String delegatedUserTenantId = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); - if ("Start".equals(elementName.getLocalPart())) { - deserializedKeyInfo.start = reader.getStringElement(); + start = reader.getStringElement(); } else if ("Expiry".equals(elementName.getLocalPart())) { - deserializedKeyInfo.expiry = reader.getStringElement(); + expiry = reader.getStringElement(); } else if ("DelegatedUserTid".equals(elementName.getLocalPart())) { - deserializedKeyInfo.delegatedUserTenantId = reader.getStringElement(); + delegatedUserTenantId = reader.getStringElement(); } else { reader.skipElement(); } } - + KeyInfo deserializedKeyInfo = new KeyInfo(start, expiry); + deserializedKeyInfo.delegatedUserTenantId = delegatedUserTenantId; 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 ce5ac31938a78..6532e33933641 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 @@ -1,20 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; /** - * Defines values for LeaseDurationType. + * The lease duration. */ public enum LeaseDurationType { /** - * Enum value infinite. + * The lease is of infinite duration. */ INFINITE("infinite"), /** - * Enum value fixed. + * The lease is of fixed duration. */ FIXED("fixed"); 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 c76a09b519fb3..2010b83f685be 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 @@ -1,35 +1,35 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; /** - * Defines values for LeaseStateType. + * The lease state. */ public enum LeaseStateType { /** - * Enum value available. + * The lease is available. */ AVAILABLE("available"), /** - * Enum value leased. + * The lease is currently leased. */ LEASED("leased"), /** - * Enum value expired. + * The lease is expired. */ EXPIRED("expired"), /** - * Enum value breaking. + * The lease is breaking. */ BREAKING("breaking"), /** - * Enum value broken. + * The lease is broken. */ BROKEN("broken"); 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 2de9c2c873627..5070c82db70b5 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 @@ -1,20 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; /** - * Defines values for LeaseStatusType. + * The lease status. */ public enum LeaseStatusType { + /** - * Enum value locked. + * The lease is locked. */ LOCKED("locked"), - /** - * Enum value unlocked. + * The lease is unlocked. */ UNLOCKED("unlocked"); @@ -29,7 +28,7 @@ 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. */ 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 9615a6ce401be..2b77e69b8782c 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 @@ -1,25 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; /** - * Defines values for ListBlobContainersIncludeType. + * Specifies what additional information should be returned as part of the list operation. */ public enum ListBlobContainersIncludeType { /** - * Enum value metadata. + * Include metadata. */ METADATA("metadata"), /** - * Enum value deleted. + * Include soft-deleted containers. */ DELETED("deleted"), /** - * Enum value system. + * Include system containers. */ SYSTEM("system"); 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 975ec377007b5..72c46343a76a6 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 @@ -1,60 +1,60 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; /** - * Defines values for ListBlobsIncludeItem. + * Specifies additional datasets to include when listing blobs in a container. */ public enum ListBlobsIncludeItem { /** - * Enum value copy. + * Include copies. */ COPY("copy"), /** - * Enum value deleted. + * Include deleted blobs. */ DELETED("deleted"), /** - * Enum value metadata. + * Include metadata. */ METADATA("metadata"), /** - * Enum value snapshots. + * Include snapshots. */ SNAPSHOTS("snapshots"), /** - * Enum value uncommittedblobs. + * Include uncommitted blobs. */ UNCOMMITTEDBLOBS("uncommittedblobs"), /** - * Enum value versions. + * Include versions. */ VERSIONS("versions"), /** - * Enum value tags. + * Include tags. */ TAGS("tags"), /** - * Enum value immutabilitypolicy. + * Include immutability policies. */ IMMUTABILITY_POLICY("immutabilitypolicy"), /** - * Enum value legalhold. + * Include legal hold. */ LEGAL_HOLD("legalhold"), /** - * Enum value deletedwithversions. + * Include deleted with versions. */ DELETED_WITH_VERSIONS("deletedwithversions"); 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 500149ccc530d..0178a18c0db69 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -16,7 +16,7 @@ import javax.xml.stream.XMLStreamException; /** - * the list of pages. + * The result of the Get Pages API. */ @Fluent public final class PageList implements XmlSerializable { @@ -37,19 +37,20 @@ public PageList setNextMarker(PageList pageList, String marker) { } /* - * The PageRange property. + * The page ranges. */ @Generated private List pageRange = new ArrayList<>(); /* - * The ClearRange property. + * The clear ranges. */ @Generated private List clearRange = new ArrayList<>(); /* - * The NextMarker property. + * An opaque string value that identifies the portion of the result set to be returned with the next operation. Use + * this value in the next request to continue the listing operation. */ @Generated private String nextMarker; @@ -62,7 +63,7 @@ public PageList() { } /** - * Get the pageRange property: The PageRange property. + * Get the pageRange property: The page ranges. * * @return the pageRange value. */ @@ -72,7 +73,7 @@ public List getPageRange() { } /** - * Set the pageRange property: The PageRange property. + * Set the pageRange property. * * @param pageRange the pageRange value to set. * @return the PageList object itself. @@ -84,7 +85,7 @@ public PageList setPageRange(List pageRange) { } /** - * Get the clearRange property: The ClearRange property. + * Get the clearRange property: The clear ranges. * * @return the clearRange value. */ @@ -94,7 +95,7 @@ public List getClearRange() { } /** - * Set the clearRange property: The ClearRange property. + * Set the clearRange property. * * @param clearRange the clearRange value to set. * @return the PageList object itself. @@ -106,7 +107,8 @@ public PageList setClearRange(List clearRange) { } /** - * Get the nextMarker property: The NextMarker property. + * Get the nextMarker property: An opaque string value that identifies the portion of the result set to be returned + * with the next operation. Use this value in the next request to continue the listing operation. * * @return the nextMarker value. */ @@ -116,7 +118,7 @@ private String getNextMarker() { } /** - * Set the nextMarker property: The NextMarker property. + * Set the nextMarker property. * * @param nextMarker the nextMarker value to set. * @return the PageList object itself. 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 d7cea95c67e66..c46865061dfe6 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 @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -14,18 +13,19 @@ import javax.xml.stream.XMLStreamException; /** - * The PageRange model. + * A page range. */ @Fluent public final class PageRange implements XmlSerializable { + /* - * The Start property. + * The start of the byte range. */ @Generated private long start; /* - * The End property. + * The end of the byte range. */ @Generated private long end; @@ -38,8 +38,20 @@ public PageRange() { } /** - * Get the start property: The Start property. - * + * Creates an instance of PageRange class. + * + * @param start the start value to set. + * @param end the end value to set. + */ + @Generated + private PageRange(long start, long end) { + this.start = start; + this.end = end; + } + + /** + * Get the start property: The start of the byte range. + * * @return the start value. */ @Generated @@ -48,8 +60,8 @@ public long getStart() { } /** - * Set the start property: The Start property. - * + * Set the start property. + * * @param start the start value to set. * @return the PageRange object itself. */ @@ -60,8 +72,8 @@ public PageRange setStart(long start) { } /** - * Get the end property: The End property. - * + * Get the end property: The end of the byte range. + * * @return the end value. */ @Generated @@ -70,8 +82,8 @@ public long getEnd() { } /** - * Set the end property: The End property. - * + * Set the end property. + * * @param end the end value to set. * @return the PageRange object itself. */ @@ -99,10 +111,11 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. */ @Generated @@ -112,12 +125,13 @@ public static PageRange fromXml(XmlReader xmlReader) throws XMLStreamException { /** * 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. */ @Generated @@ -125,20 +139,19 @@ public static PageRange fromXml(XmlReader xmlReader, String rootElementName) thr String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "PageRange" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - PageRange deserializedPageRange = new PageRange(); + long start = 0L; + long end = 0L; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); - if ("Start".equals(elementName.getLocalPart())) { - deserializedPageRange.start = reader.getLongElement(); + start = reader.getLongElement(); } else if ("End".equals(elementName.getLocalPart())) { - deserializedPageRange.end = reader.getLongElement(); + end = reader.getLongElement(); } else { reader.skipElement(); } } - - return deserializedPageRange; + return new PageRange(start, end); }); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PathRenameMode.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PathRenameMode.java index 864ec9e3a73c1..2ef1fdfc82649 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PathRenameMode.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/PathRenameMode.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// This file is not generated. The Blob TypeSpec does not describe it, so it is maintained by hand; +// edits here are preserved across regeneration. package com.azure.storage.blob.models; 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 3e87f67a8011b..2680931808d8d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; @@ -9,20 +9,20 @@ import java.util.Collection; /** - * Defines values for PublicAccessType. + * The public access type. */ public final class PublicAccessType extends ExpandableStringEnum { /** - * Static value container for PublicAccessType. + * Blob access. */ @Generated - public static final PublicAccessType CONTAINER = fromString("container"); + public static final PublicAccessType BLOB = fromString("blob"); /** - * Static value blob for PublicAccessType. + * Container access. */ @Generated - public static final PublicAccessType BLOB = fromString("blob"); + public static final PublicAccessType CONTAINER = fromString("container"); /** * Creates a new instance of PublicAccessType value. 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 aefb65e817fa1..2cead9f84137d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; @@ -9,18 +9,17 @@ import java.util.Collection; /** - * If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid values are - * High and Standard. + * The priority of the rehydrate operation. */ public final class RehydratePriority extends ExpandableStringEnum { /** - * Static value High for RehydratePriority. + * The rehydrate priority is high. */ @Generated public static final RehydratePriority HIGH = fromString("High"); /** - * Static value Standard for RehydratePriority. + * The rehydrate priority is standard. */ @Generated public static final RehydratePriority STANDARD = fromString("Standard"); 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 b53fe1e30289f..16ff99b00ded7 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 @@ -1,25 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; /** - * Defines values for SequenceNumberActionType. + * The sequence number actions. */ public enum SequenceNumberActionType { + /** - * Enum value max. + * Set the maximum for the sequence number. */ MAX("max"), - /** - * Enum value update. + * Update the sequence number. */ UPDATE("update"), - /** - * Enum value increment. + * Increment the sequence number. */ INCREMENT("increment"); @@ -34,7 +32,7 @@ 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. */ 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 9bd5e6d7938ca..d2a526d4351c1 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 @@ -1,50 +1,50 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; /** - * Defines values for SkuName. + * The account SKU. */ public enum SkuName { /** - * Enum value Standard_LRS. + * The standard LRS SKU. */ STANDARD_LRS("Standard_LRS"), /** - * Enum value Standard_GRS. + * The standard GRS SKU. */ STANDARD_GRS("Standard_GRS"), /** - * Enum value Standard_RAGRS. + * The standard RAGRS SKU. */ STANDARD_RAGRS("Standard_RAGRS"), /** - * Enum value Standard_ZRS. + * The standard ZRS SKU. */ STANDARD_ZRS("Standard_ZRS"), /** - * Enum value Premium_LRS. + * The premium LRS SKU. */ PREMIUM_LRS("Premium_LRS"), /** - * Enum value Standard_GZRS. + * The standard GZRS SKU. */ STANDARD_GZRS("Standard_GZRS"), /** - * Enum value Premium_ZRS. + * The premium ZRS SKU. */ PREMIUM_ZRS("Premium_ZRS"), /** - * Enum value Standard_RAGZRS. + * The standard RAGZRS SKU. */ STANDARD_RAGZRS("Standard_RAGZRS"); 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 a4163af288fb0..b7f33bb121132 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 @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -18,26 +17,27 @@ */ @Fluent public final class StaticWebsite implements XmlSerializable { + /* - * Indicates whether this account is hosting a static website + * Indicates whether this account is hosting a static website. */ @Generated private boolean enabled; /* - * The default name of the index page under each directory + * The index document. */ @Generated private String indexDocument; /* - * The absolute path of the custom 404 page + * The error document. */ @Generated private String errorDocument404Path; /* - * Absolute path of the default index page + * Absolute path of the default index page. */ @Generated private String defaultIndexDocumentPath; @@ -49,9 +49,19 @@ public final class StaticWebsite implements XmlSerializable { public StaticWebsite() { } + /** + * Creates an instance of StaticWebsite class. + * + * @param enabled the enabled value to set. + */ + @Generated + private StaticWebsite(boolean enabled) { + this.enabled = enabled; + } + /** * Get the enabled property: Indicates whether this account is hosting a static website. - * + * * @return the enabled value. */ @Generated @@ -60,8 +70,8 @@ public boolean isEnabled() { } /** - * Set the enabled property: Indicates whether this account is hosting a static website. - * + * Set the enabled property. + * * @param enabled the enabled value to set. * @return the StaticWebsite object itself. */ @@ -72,8 +82,8 @@ public StaticWebsite setEnabled(boolean enabled) { } /** - * Get the indexDocument property: The default name of the index page under each directory. - * + * Get the indexDocument property: The index document. + * * @return the indexDocument value. */ @Generated @@ -82,8 +92,8 @@ public String getIndexDocument() { } /** - * Set the indexDocument property: The default name of the index page under each directory. - * + * Set the indexDocument property: The index document. + * * @param indexDocument the indexDocument value to set. * @return the StaticWebsite object itself. */ @@ -94,8 +104,8 @@ public StaticWebsite setIndexDocument(String indexDocument) { } /** - * Get the errorDocument404Path property: The absolute path of the custom 404 page. - * + * Get the errorDocument404Path property: The error document. + * * @return the errorDocument404Path value. */ @Generated @@ -104,8 +114,8 @@ public String getErrorDocument404Path() { } /** - * Set the errorDocument404Path property: The absolute path of the custom 404 page. - * + * Set the errorDocument404Path property: The error document. + * * @param errorDocument404Path the errorDocument404Path value to set. * @return the StaticWebsite object itself. */ @@ -117,7 +127,7 @@ public StaticWebsite setErrorDocument404Path(String errorDocument404Path) { /** * Get the defaultIndexDocumentPath property: Absolute path of the default index page. - * + * * @return the defaultIndexDocumentPath value. */ @Generated @@ -127,7 +137,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. */ @@ -157,10 +167,11 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. */ @Generated @@ -170,12 +181,13 @@ public static StaticWebsite fromXml(XmlReader xmlReader) throws XMLStreamExcepti /** * 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. */ @Generated @@ -183,23 +195,28 @@ public static StaticWebsite fromXml(XmlReader xmlReader, String rootElementName) String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "StaticWebsite" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - StaticWebsite deserializedStaticWebsite = new StaticWebsite(); + boolean enabled = false; + String indexDocument = null; + String errorDocument404Path = null; + String defaultIndexDocumentPath = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); - if ("Enabled".equals(elementName.getLocalPart())) { - deserializedStaticWebsite.enabled = reader.getBooleanElement(); + enabled = reader.getBooleanElement(); } else if ("IndexDocument".equals(elementName.getLocalPart())) { - deserializedStaticWebsite.indexDocument = reader.getStringElement(); + indexDocument = reader.getStringElement(); } else if ("ErrorDocument404Path".equals(elementName.getLocalPart())) { - deserializedStaticWebsite.errorDocument404Path = reader.getStringElement(); + errorDocument404Path = reader.getStringElement(); } else if ("DefaultIndexDocumentPath".equals(elementName.getLocalPart())) { - deserializedStaticWebsite.defaultIndexDocumentPath = reader.getStringElement(); + defaultIndexDocumentPath = reader.getStringElement(); } else { reader.skipElement(); } } - + StaticWebsite deserializedStaticWebsite = new StaticWebsite(enabled); + deserializedStaticWebsite.indexDocument = indexDocument; + deserializedStaticWebsite.errorDocument404Path = errorDocument404Path; + deserializedStaticWebsite.defaultIndexDocumentPath = defaultIndexDocumentPath; return deserializedStaticWebsite; }); } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SyncCopyStatusType.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SyncCopyStatusType.java index 3dadcb480e62b..d125795c7345c 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SyncCopyStatusType.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/SyncCopyStatusType.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// This file is not generated. The Blob TypeSpec does not describe it, so it is maintained by hand; +// edits here are preserved across regeneration. package com.azure.storage.blob.models; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/TaggedBlobItem.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/TaggedBlobItem.java index f0e53c7158c26..7d604fa0dc352 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/TaggedBlobItem.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/TaggedBlobItem.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// This file is not generated. The Blob TypeSpec does not describe it, so it is maintained by hand; +// edits here are preserved across regeneration. package com.azure.storage.blob.models; 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 435cae7a408f4..ef5888ad498f3 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 @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -21,50 +20,51 @@ */ @Fluent public final class UserDelegationKey implements XmlSerializable { + /* - * The Azure Active Directory object ID in GUID format. + * The Entra ID object ID in GUID format. */ @Generated private String signedObjectId; /* - * The Azure Active Directory tenant ID in GUID format + * The Entra ID tenant ID in GUID format. */ @Generated private String signedTenantId; /* - * The date-time the key is active + * The date-time the key is active. */ @Generated private OffsetDateTime signedStart; /* - * The date-time the key expires + * The date-time the key expires. */ @Generated private OffsetDateTime signedExpiry; /* - * Abbreviation of the Azure Storage service that accepts the key + * Abbreviation of the Azure Storage service that accepts the key. */ @Generated private String signedService; /* - * The service version that created the key + * The service version that created the key. */ @Generated private String signedVersion; /* - * The delegated user tenant id in Azure AD. Return if DelegatedUserTid is specified. + * The delegated user tenant ID in Entra ID. Returned if DelegatedUserTid is specified. */ @Generated private String signedDelegatedUserTenantId; /* - * The key as a base64 string + * The base64 encoded key value. */ @Generated private String value; @@ -77,8 +77,31 @@ public UserDelegationKey() { } /** - * Get the signedObjectId property: The Azure Active Directory object ID in GUID format. - * + * Creates an instance of UserDelegationKey class. + * + * @param signedObjectId the signedObjectId value to set. + * @param signedTenantId the signedTenantId value to set. + * @param signedStart the signedStart value to set. + * @param signedExpiry the signedExpiry value to set. + * @param signedService the signedService value to set. + * @param signedVersion the signedVersion value to set. + * @param value the value value to set. + */ + @Generated + private UserDelegationKey(String signedObjectId, String signedTenantId, OffsetDateTime signedStart, + OffsetDateTime signedExpiry, String signedService, String signedVersion, String value) { + this.signedObjectId = signedObjectId; + this.signedTenantId = signedTenantId; + this.signedStart = signedStart; + this.signedExpiry = signedExpiry; + this.signedService = signedService; + this.signedVersion = signedVersion; + this.value = value; + } + + /** + * Get the signedObjectId property: The Entra ID object ID in GUID format. + * * @return the signedObjectId value. */ @Generated @@ -87,8 +110,8 @@ public String getSignedObjectId() { } /** - * Set the signedObjectId property: The Azure Active Directory object ID in GUID format. - * + * Set the signedObjectId property. + * * @param signedObjectId the signedObjectId value to set. * @return the UserDelegationKey object itself. */ @@ -99,8 +122,8 @@ public UserDelegationKey setSignedObjectId(String signedObjectId) { } /** - * Get the signedTenantId property: The Azure Active Directory tenant ID in GUID format. - * + * Get the signedTenantId property: The Entra ID tenant ID in GUID format. + * * @return the signedTenantId value. */ @Generated @@ -109,8 +132,8 @@ public String getSignedTenantId() { } /** - * Set the signedTenantId property: The Azure Active Directory tenant ID in GUID format. - * + * Set the signedTenantId property. + * * @param signedTenantId the signedTenantId value to set. * @return the UserDelegationKey object itself. */ @@ -122,7 +145,7 @@ public UserDelegationKey setSignedTenantId(String signedTenantId) { /** * Get the signedStart property: The date-time the key is active. - * + * * @return the signedStart value. */ @Generated @@ -131,8 +154,8 @@ public OffsetDateTime getSignedStart() { } /** - * Set the signedStart property: The date-time the key is active. - * + * Set the signedStart property. + * * @param signedStart the signedStart value to set. * @return the UserDelegationKey object itself. */ @@ -144,7 +167,7 @@ public UserDelegationKey setSignedStart(OffsetDateTime signedStart) { /** * Get the signedExpiry property: The date-time the key expires. - * + * * @return the signedExpiry value. */ @Generated @@ -153,8 +176,8 @@ public OffsetDateTime getSignedExpiry() { } /** - * Set the signedExpiry property: The date-time the key expires. - * + * Set the signedExpiry property. + * * @param signedExpiry the signedExpiry value to set. * @return the UserDelegationKey object itself. */ @@ -166,7 +189,7 @@ public UserDelegationKey setSignedExpiry(OffsetDateTime signedExpiry) { /** * Get the signedService property: Abbreviation of the Azure Storage service that accepts the key. - * + * * @return the signedService value. */ @Generated @@ -175,8 +198,8 @@ public String getSignedService() { } /** - * Set the signedService property: Abbreviation of the Azure Storage service that accepts the key. - * + * Set the signedService property. + * * @param signedService the signedService value to set. * @return the UserDelegationKey object itself. */ @@ -188,7 +211,7 @@ public UserDelegationKey setSignedService(String signedService) { /** * Get the signedVersion property: The service version that created the key. - * + * * @return the signedVersion value. */ @Generated @@ -197,8 +220,8 @@ public String getSignedVersion() { } /** - * Set the signedVersion property: The service version that created the key. - * + * Set the signedVersion property. + * * @param signedVersion the signedVersion value to set. * @return the UserDelegationKey object itself. */ @@ -209,9 +232,9 @@ public UserDelegationKey setSignedVersion(String signedVersion) { } /** - * Get the signedDelegatedUserTenantId property: The delegated user tenant id in Azure AD. Return if + * Get the signedDelegatedUserTenantId property: The delegated user tenant ID in Entra ID. Returned if * DelegatedUserTid is specified. - * + * * @return the signedDelegatedUserTenantId value. */ @Generated @@ -220,9 +243,8 @@ public String getSignedDelegatedUserTenantId() { } /** - * Set the signedDelegatedUserTenantId property: The delegated user tenant id in Azure AD. Return if - * DelegatedUserTid is specified. - * + * Set the signedDelegatedUserTenantId property. + * * @param signedDelegatedUserTenantId the signedDelegatedUserTenantId value to set. * @return the UserDelegationKey object itself. */ @@ -233,8 +255,8 @@ public UserDelegationKey setSignedDelegatedUserTenantId(String signedDelegatedUs } /** - * Get the value property: The key as a base64 string. - * + * Get the value property: The base64 encoded key value. + * * @return the value value. */ @Generated @@ -243,8 +265,8 @@ public String getValue() { } /** - * Set the value property: The key as a base64 string. - * + * Set the value property. + * * @param value the value value to set. * @return the UserDelegationKey object itself. */ @@ -280,10 +302,11 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. */ @Generated @@ -293,12 +316,13 @@ public static UserDelegationKey fromXml(XmlReader xmlReader) throws XMLStreamExc /** * 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. */ @Generated @@ -306,33 +330,41 @@ public static UserDelegationKey fromXml(XmlReader xmlReader, String rootElementN String finalRootElementName = rootElementName == null || rootElementName.isEmpty() ? "UserDelegationKey" : rootElementName; return xmlReader.readObject(finalRootElementName, reader -> { - UserDelegationKey deserializedUserDelegationKey = new UserDelegationKey(); + String signedObjectId = null; + String signedTenantId = null; + OffsetDateTime signedStart = null; + OffsetDateTime signedExpiry = null; + String signedService = null; + String signedVersion = null; + String signedDelegatedUserTenantId = null; + String value = null; while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); - if ("SignedOid".equals(elementName.getLocalPart())) { - deserializedUserDelegationKey.signedObjectId = reader.getStringElement(); + signedObjectId = reader.getStringElement(); } else if ("SignedTid".equals(elementName.getLocalPart())) { - deserializedUserDelegationKey.signedTenantId = reader.getStringElement(); + signedTenantId = reader.getStringElement(); } else if ("SignedStart".equals(elementName.getLocalPart())) { - deserializedUserDelegationKey.signedStart + signedStart = reader.getNullableElement(dateString -> CoreUtils.parseBestOffsetDateTime(dateString)); } else if ("SignedExpiry".equals(elementName.getLocalPart())) { - deserializedUserDelegationKey.signedExpiry + signedExpiry = reader.getNullableElement(dateString -> CoreUtils.parseBestOffsetDateTime(dateString)); } else if ("SignedService".equals(elementName.getLocalPart())) { - deserializedUserDelegationKey.signedService = reader.getStringElement(); + signedService = reader.getStringElement(); } else if ("SignedVersion".equals(elementName.getLocalPart())) { - deserializedUserDelegationKey.signedVersion = reader.getStringElement(); + signedVersion = reader.getStringElement(); } else if ("SignedDelegatedUserTid".equals(elementName.getLocalPart())) { - deserializedUserDelegationKey.signedDelegatedUserTenantId = reader.getStringElement(); + signedDelegatedUserTenantId = reader.getStringElement(); } else if ("Value".equals(elementName.getLocalPart())) { - deserializedUserDelegationKey.value = reader.getStringElement(); + value = reader.getStringElement(); } else { reader.skipElement(); } } - + UserDelegationKey deserializedUserDelegationKey = new UserDelegationKey(signedObjectId, signedTenantId, + signedStart, signedExpiry, signedService, signedVersion, value); + deserializedUserDelegationKey.signedDelegatedUserTenantId = signedDelegatedUserTenantId; 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 0680e6d4bbc6d..4379082342032 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 @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the data models for AzureBlobStorage. - * null. + * Package containing the data models for Blob. */ package com.azure.storage.blob.models; diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/package-info.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/package-info.java index 54ad226872756..5b3fee76fd02e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/package-info.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/package-info.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the classes for BlobServiceClient. + * Package containing the classes for Blob. */ package com.azure.storage.blob; 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 6ab72e2bc59fe..257b85d7a9f4b 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 @@ -19,6 +19,9 @@ import com.azure.storage.blob.BlobContainerAsyncClient; import com.azure.storage.blob.BlobServiceAsyncClient; import com.azure.storage.blob.BlobServiceVersion; +import com.azure.core.http.rest.RequestOptions; +import com.azure.storage.blob.implementation.AppendBlobAsyncClientInternal; +import com.azure.storage.blob.implementation.util.RequestOptionsHelper; import com.azure.storage.blob.implementation.accesshelpers.AppendBlobItemConstructorProxy; import com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockFromUrlHeaders; import com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockHeaders; @@ -133,6 +136,14 @@ public final class AppendBlobAsyncClient extends BlobAsyncClientBase { EncryptionScope encryptionScope, String versionId) { super(pipeline, url, serviceVersion, accountName, containerName, blobName, snapshot, customerProvidedKey, encryptionScope, versionId); + this.appendBlobClientInternal = new AppendBlobAsyncClientInternal(this.azureBlobStorage.getAppendBlobs()); + } + + private final AppendBlobAsyncClientInternal appendBlobClientInternal; + + private RequestOptions appendBlobRequestOptions(Context context) { + return RequestOptionsHelper.blobRequestOptions(context, this.azureBlobStorage.getUrl(), getContainerName(), + getBlobName()); } /** @@ -299,19 +310,25 @@ Mono> createWithResponse(AppendBlobCreateOptions option BlobImmutabilityPolicy immutabilityPolicy = options.getImmutabilityPolicy() == null ? new BlobImmutabilityPolicy() : options.getImmutabilityPolicy(); - return this.azureBlobStorage.getAppendBlobs() - .createWithResponseAsync(containerName, blobName, 0, null, options.getMetadata(), - requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), - requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, - ModelHelper.tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), - immutabilityPolicy.getPolicyMode(), options.hasLegalHold(), options.getHeaders(), - getCustomerProvidedKey(), encryptionScope, context) + BlobHttpHeaders headers = options.getHeaders() == null ? new BlobHttpHeaders() : options.getHeaders(); + CpkInfo cpk = getCustomerProvidedKey(); + RequestOptions requestOptions = appendBlobRequestOptions(context); + + return this.appendBlobClientInternal + .createWithResponse(options.getMetadata(), null, headers.getContentType(), headers.getContentEncoding(), + headers.getContentLanguage(), headers.getContentMd5(), headers.getCacheControl(), + requestConditions.getLeaseId(), headers.getContentDisposition(), + cpk == null ? null : cpk.getEncryptionKey(), cpk == null ? null : cpk.getEncryptionKeySha256(), + cpk == null ? null : cpk.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), + requestConditions.getTagsConditions(), ModelHelper.tagsToString(options.getTags()), + immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), options.hasLegalHold(), + requestConditions, requestOptions) .map(rb -> { AppendBlobsCreateHeaders hd = rb.getDeserializedHeaders(); - AppendBlobItem item = new AppendBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), - hd.isXMsRequestServerEncrypted(), hd.getXMsEncryptionKeySha256(), hd.getXMsEncryptionScope(), null, - null, hd.getXMsVersionId()); + AppendBlobItem item + = new AppendBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMd5(), hd.isServerEncrypted(), + hd.getEncryptionKeySha256(), hd.getEncryptionScope(), null, null, hd.getVersionId()); return new SimpleResponse<>(rb, item); }); } @@ -539,19 +556,20 @@ Mono> appendBlockWithResponseInternal(AppendBlobAppendB context = ContentValidationModeResolver.addContentValidationMode(context == null ? Context.NONE : context, options.getContentValidationAlgorithm(), length, false); - return this.azureBlobStorage.getAppendBlobs() - .appendBlockWithResponseAsync(containerName, blobName, length, data, null, options.getContentMd5(), null, - requestConditions.getLeaseId(), requestConditions.getMaxSize(), requestConditions.getAppendPosition(), - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, null, null, getCustomerProvidedKey(), encryptionScope, - context) + CpkInfo cpk = getCustomerProvidedKey(); + + return this.appendBlobClientInternal + .appendBlockWithResponse(length, data, null, options.getContentMd5(), null, requestConditions.getLeaseId(), + requestConditions.getMaxSize(), requestConditions.getAppendPosition(), + cpk == null ? null : cpk.getEncryptionKey(), cpk == null ? null : cpk.getEncryptionKeySha256(), + cpk == null ? null : cpk.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), + requestConditions.getTagsConditions(), null, null, requestConditions, appendBlobRequestOptions(context)) .map(rb -> { AppendBlobsAppendBlockHeaders hd = rb.getDeserializedHeaders(); - AppendBlobItem item - = AppendBlobItemConstructorProxy.create(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), - hd.isXMsRequestServerEncrypted(), hd.getXMsEncryptionKeySha256(), hd.getXMsEncryptionScope(), - hd.getXMsBlobAppendOffset(), hd.getXMsBlobCommittedBlockCount(), null, hd.getXMsContentCrc64()); + AppendBlobItem item = AppendBlobItemConstructorProxy.create(hd.getETag(), hd.getLastModified(), + hd.getContentMd5(), hd.isServerEncrypted(), hd.getEncryptionKeySha256(), hd.getEncryptionScope(), + hd.getBlobAppendOffset(), hd.getBlobCommittedBlockCount(), null, hd.getContentCrc64()); return new SimpleResponse<>(rb, item); }); } @@ -684,23 +702,24 @@ Mono> appendBlockFromUrlWithResponse(AppendBlobAppendBl EncryptionAlgorithmType sourceCpkAlgorithm = sourceCustomerProvidedKey != null ? sourceCustomerProvidedKey.getEncryptionAlgorithm() : null; - return this.azureBlobStorage.getAppendBlobs() - .appendBlockFromUrlWithResponseAsync(containerName, blobName, options.getSourceUrl(), 0, - sourceRange.toString(), options.getSourceContentMd5(), null, null, null, + CpkInfo cpk = getCustomerProvidedKey(); + + return this.appendBlobClientInternal + .appendBlockFromUrlWithResponse(options.getSourceUrl(), 0, sourceRange.toString(), + options.getSourceContentMd5(), null, null, null, cpk == null ? null : cpk.getEncryptionKey(), + cpk == null ? null : cpk.getEncryptionKeySha256(), cpk == null ? null : cpk.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), destRequestConditions.getLeaseId(), destRequestConditions.getMaxSize(), - destRequestConditions.getAppendPosition(), destRequestConditions.getIfModifiedSince(), - destRequestConditions.getIfUnmodifiedSince(), destRequestConditions.getIfMatch(), - destRequestConditions.getIfNoneMatch(), destRequestConditions.getTagsConditions(), + destRequestConditions.getAppendPosition(), destRequestConditions.getTagsConditions(), sourceRequestConditions.getIfModifiedSince(), sourceRequestConditions.getIfUnmodifiedSince(), - sourceRequestConditions.getIfMatch(), sourceRequestConditions.getIfNoneMatch(), null, sourceAuth, + sourceRequestConditions.getIfMatch(), sourceRequestConditions.getIfNoneMatch(), sourceAuth, options.getSourceShareTokenIntent(), sourceCpkKey, sourceCpkKeySha256, sourceCpkAlgorithm, - getCustomerProvidedKey(), encryptionScope, context) + destRequestConditions, appendBlobRequestOptions(context)) .map(rb -> { AppendBlobsAppendBlockFromUrlHeaders hd = rb.getDeserializedHeaders(); - AppendBlobItem item - = AppendBlobItemConstructorProxy.create(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), - hd.isXMsRequestServerEncrypted(), hd.getXMsEncryptionKeySha256(), hd.getXMsEncryptionScope(), - hd.getXMsBlobAppendOffset(), hd.getXMsBlobCommittedBlockCount(), null, hd.getXMsContentCrc64()); + AppendBlobItem item = AppendBlobItemConstructorProxy.create(hd.getETag(), hd.getLastModified(), + hd.getContentMd5(), hd.isServerEncrypted(), hd.getEncryptionKeySha256(), hd.getEncryptionScope(), + hd.getBlobAppendOffset(), hd.getBlobCommittedBlockCount(), null, hd.getContentCrc64()); return new SimpleResponse<>(rb, item); }); } @@ -757,11 +776,10 @@ Mono> sealWithResponse(AppendBlobSealOptions options, Context con requestConditions = (requestConditions == null) ? new AppendBlobRequestConditions() : requestConditions; context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getAppendBlobs() - .sealNoCustomHeadersWithResponseAsync(containerName, blobName, null, null, requestConditions.getLeaseId(), - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getAppendPosition(), context); + return this.appendBlobClientInternal + .sealWithResponse(null, requestConditions.getLeaseId(), requestConditions.getAppendPosition(), + requestConditions, appendBlobRequestOptions(context)) + .map(rb -> (Response) 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 3fd0b8d28e93d..48d19fe89988a 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 @@ -8,6 +8,7 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.ResponseBase; import com.azure.core.http.rest.SimpleResponse; @@ -19,10 +20,12 @@ import com.azure.storage.blob.BlobContainerClient; import com.azure.storage.blob.BlobServiceClient; import com.azure.storage.blob.BlobServiceVersion; +import com.azure.storage.blob.implementation.AppendBlobClientInternal; import com.azure.storage.blob.implementation.models.AppendBlobsCreateHeaders; import com.azure.storage.blob.implementation.models.EncryptionScope; import com.azure.storage.blob.implementation.util.BlobConstants; import com.azure.storage.blob.implementation.util.ModelHelper; +import com.azure.storage.blob.implementation.util.RequestOptionsHelper; import com.azure.storage.blob.models.AppendBlobItem; import com.azure.storage.blob.models.AppendBlobRequestConditions; import com.azure.storage.blob.models.BlobErrorCode; @@ -138,6 +141,14 @@ public final class AppendBlobClient extends BlobClientBase { super(asyncClient, pipeline, url, serviceVersion, accountName, containerName, blobName, snapshot, customerProvidedKey, encryptionScope, versionId); this.appendBlobAsyncClient = asyncClient; + this.appendBlobClientInternal = new AppendBlobClientInternal(this.azureBlobStorage.getAppendBlobs()); + } + + private final AppendBlobClientInternal appendBlobClientInternal; + + private RequestOptions appendBlobRequestOptions(Context context) { + return RequestOptionsHelper.blobRequestOptions(context, this.azureBlobStorage.getUrl(), getContainerName(), + getBlobName()); } /** @@ -358,20 +369,28 @@ public Response createWithResponse(AppendBlobCreateOptions optio 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); + BlobHttpHeaders createHeaders + = finalOptions.getHeaders() == null ? new BlobHttpHeaders() : finalOptions.getHeaders(); + CpkInfo createCpk = getCustomerProvidedKey(); + RequestOptions createOptions = appendBlobRequestOptions(finalContext); + + Callable> operation + = () -> this.appendBlobClientInternal.createWithResponse(finalOptions.getMetadata(), null, + createHeaders.getContentType(), createHeaders.getContentEncoding(), createHeaders.getContentLanguage(), + createHeaders.getContentMd5(), createHeaders.getCacheControl(), requestConditions.getLeaseId(), + createHeaders.getContentDisposition(), createCpk == null ? null : createCpk.getEncryptionKey(), + createCpk == null ? null : createCpk.getEncryptionKeySha256(), + createCpk == null ? null : createCpk.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), + requestConditions.getTagsConditions(), ModelHelper.tagsToString(finalOptions.getTags()), + immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), finalOptions.hasLegalHold(), + requestConditions, createOptions); 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()); + AppendBlobItem item + = new AppendBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMd5(), hd.isServerEncrypted(), + hd.getEncryptionKeySha256(), hd.getEncryptionScope(), null, null, hd.getVersionId()); return new SimpleResponse<>(response, item); } @@ -732,11 +751,9 @@ public Response sealWithResponse(AppendBlobSealOptions options, Duration t : 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 + = () -> this.appendBlobClientInternal.sealWithResponse(null, requestConditions.getLeaseId(), + requestConditions.getAppendPosition(), requestConditions, appendBlobRequestOptions(finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } 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 db89ba3019bfe..04d07d93fcee2 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 @@ -31,8 +31,10 @@ import com.azure.storage.blob.BlobContainerClientBuilder; import com.azure.storage.blob.BlobServiceAsyncClient; import com.azure.storage.blob.BlobServiceVersion; +import com.azure.core.http.rest.RequestOptions; +import com.azure.storage.blob.implementation.util.RequestOptionsHelper; +import com.azure.storage.blob.implementation.BlobAsyncClientInternal; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; -import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; import com.azure.storage.blob.implementation.accesshelpers.BlobDownloadAsyncResponseConstructorProxy; import com.azure.storage.blob.implementation.accesshelpers.BlobLayoutPagingAccessHelper; import com.azure.storage.blob.implementation.accesshelpers.BlobPropertiesConstructorProxy; @@ -43,11 +45,13 @@ import com.azure.storage.blob.implementation.models.BlobsDownloadHeaders; import com.azure.storage.blob.implementation.models.BlobsGetAccountInfoHeaders; import com.azure.storage.blob.implementation.models.BlobsGetLayoutHeaders; +import com.azure.storage.blob.implementation.models.BlobsQueryHeaders; import com.azure.storage.blob.implementation.models.BlobsSetImmutabilityPolicyHeaders; -import com.azure.storage.blob.implementation.models.BlobsStartCopyFromURLHeaders; +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.QueryRequestType; import com.azure.storage.blob.implementation.models.QuerySerialization; import com.azure.storage.blob.implementation.util.BlobLayoutCacheValue; import com.azure.storage.blob.implementation.util.BlobLayoutRangeResolver; @@ -55,6 +59,7 @@ 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.BuilderHelper; import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobBeginCopySourceRequestConditions; @@ -163,6 +168,13 @@ public class BlobAsyncClientBase { */ protected final AzureBlobStorageImpl azureBlobStorage; + final BlobAsyncClientInternal blobClientInternal; + + RequestOptions blobRequestOptions(Context context) { + return RequestOptionsHelper.blobRequestOptions(context, this.azureBlobStorage.getUrl(), getContainerName(), + getBlobName()); + } + private final String snapshot; private final String versionId; private final CpkInfo customerProvidedKey; @@ -258,10 +270,8 @@ protected BlobAsyncClientBase(HttpPipeline pipeline, String url, BlobServiceVers if (blobName == null) { throw LOGGER.logExceptionAsError(new NullPointerException("'blobName' can not be set to null.")); } - this.azureBlobStorage = new AzureBlobStorageImplBuilder().pipeline(pipeline) - .url(url) - .version(serviceVersion.getVersion()) - .buildClient(); + this.azureBlobStorage = BuilderHelper.createAzureBlobStorage(pipeline, url, serviceVersion); + this.blobClientInternal = new BlobAsyncClientInternal(this.azureBlobStorage.getBlobs()); this.serviceVersion = serviceVersion; this.accountName = accountName; @@ -775,22 +785,22 @@ private Mono onStart(String sourceUrl, Map metadat throw LOGGER.logExceptionAsError(new IllegalArgumentException("'sourceUrl' is not a valid url.", ex)); } - return withContext(context -> azureBlobStorage.getBlobs() - .startCopyFromURLWithResponseAsync(containerName, blobName, sourceUrl, null, metadata, tier, priority, + return withContext(context -> { + RequestOptions startCopyOptions = blobRequestOptions(context); + + return this.blobClientInternal.startCopyFromUrlWithResponse(sourceUrl, null, metadata, tier, priority, sourceModifiedRequestConditions.getIfModifiedSince(), sourceModifiedRequestConditions.getIfUnmodifiedSince(), sourceModifiedRequestConditions.getIfMatch(), sourceModifiedRequestConditions.getIfNoneMatch(), sourceModifiedRequestConditions.getTagsConditions(), - destinationRequestConditions.getIfModifiedSince(), destinationRequestConditions.getIfUnmodifiedSince(), - destinationRequestConditions.getIfMatch(), destinationRequestConditions.getIfNoneMatch(), - destinationRequestConditions.getTagsConditions(), destinationRequestConditions.getLeaseId(), null, + destinationRequestConditions.getTagsConditions(), destinationRequestConditions.getLeaseId(), ModelHelper.tagsToString(tags), sealBlob, immutabilityPolicy.getExpiryTime(), - immutabilityPolicy.getPolicyMode(), legalHold, context)).map(response -> { - final BlobsStartCopyFromURLHeaders headers = response.getDeserializedHeaders(); + immutabilityPolicy.getPolicyMode(), legalHold, destinationRequestConditions, startCopyOptions); + }).map(response -> { + final BlobsStartCopyFromUrlHeaders headers = response.getDeserializedHeaders(); - return new BlobCopyInfo(sourceUrl, headers.getXMsCopyId(), headers.getXMsCopyStatus(), - headers.getETag(), headers.getLastModified(), ModelHelper.getErrorCode(response.getHeaders()), - headers.getXMsVersionId()); - }); + return new BlobCopyInfo(sourceUrl, headers.getCopyId(), headers.getCopyStatus(), headers.getETag(), + headers.getLastModified(), ModelHelper.getErrorCode(response.getHeaders()), headers.getVersionId()); + }); } private Mono> onPoll(PollResponse pollResponse) { @@ -874,9 +884,8 @@ public Mono> abortCopyFromUrlWithResponse(String copyId, String l } Mono> abortCopyFromUrlWithResponse(String copyId, String leaseId, Context context) { - return this.azureBlobStorage.getBlobs() - .abortCopyFromURLNoCustomHeadersWithResponseAsync(containerName, blobName, copyId, null, leaseId, null, - context); + return this.blobClientInternal.abortCopyFromUrlWithResponse(copyId, null, leaseId, blobRequestOptions(context)) + .map(rb -> (Response) rb); } /** @@ -1009,18 +1018,19 @@ Mono> copyFromUrlWithResponse(BlobCopyFromUrlOptions options, C String sourceAuth = options.getSourceAuthorization() == null ? null : options.getSourceAuthorization().toString(); - return this.azureBlobStorage.getBlobs() - .copyFromURLWithResponseAsync(containerName, blobName, options.getCopySource(), null, options.getMetadata(), - options.getTier(), sourceModifiedRequestConditions.getIfModifiedSince(), + RequestOptions copyFromUrlOptions = blobRequestOptions(context); + + return this.blobClientInternal + .copyFromUrlWithResponse(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()), + sourceModifiedRequestConditions.getIfNoneMatch(), destRequestConditions.getTagsConditions(), + destRequestConditions.getLeaseId(), null, ModelHelper.tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), options.hasLegalHold(), - sourceAuth, options.getCopySourceTagsMode(), options.getSourceShareTokenIntent(), this.encryptionScope, - context) - .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getXMsCopyId())); + sourceAuth, this.encryptionScope == null ? null : this.encryptionScope.getEncryptionScope(), + ModelHelper.toCopySourceTags(options.getCopySourceTagsMode()), options.getSourceShareTokenIntent(), + destRequestConditions, copyFromUrlOptions) + .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getCopyId())); } /** @@ -1306,8 +1316,8 @@ Mono downloadStreamWithResponseInternal(BlobRange ran firstRangeContext).map(response -> { BlobsDownloadHeaders blobsDownloadHeaders = new BlobsDownloadHeaders(response.getHeaders()); String eTag = blobsDownloadHeaders.getETag(); - BlobDownloadHeaders blobDownloadHeaders = ModelHelper.populateBlobDownloadHeaders(blobsDownloadHeaders, - ModelHelper.getErrorCode(response.getHeaders())); + BlobDownloadHeaders blobDownloadHeaders + = ModelHelper.populateBlobDownloadHeaders(blobsDownloadHeaders, response.getHeaders()); /* * If the customer did not specify a count, they are reading to the end of the blob. Extract this value @@ -1358,12 +1368,22 @@ Mono downloadStreamWithResponseInternal(BlobRange ran private Mono downloadRange(BlobRange range, BlobRequestConditions requestConditions, String eTag, Boolean getMD5, Context context) { - return azureBlobStorage.getBlobs() - .downloadNoCustomHeadersWithResponseAsync(containerName, blobName, snapshot, versionId, null, - range.toHeaderValue(), requestConditions.getLeaseId(), getMD5, null, null, - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), eTag, - requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, customerProvidedKey, - context); + // Each retried range re-reads with the ETag the first response returned, not the caller's ifMatch, so the + // conditions passed here are the caller's with ifMatch replaced. + RequestConditions rangeConditions + = new RequestConditions().setIfModifiedSince(requestConditions.getIfModifiedSince()) + .setIfUnmodifiedSince(requestConditions.getIfUnmodifiedSince()) + .setIfMatch(eTag) + .setIfNoneMatch(requestConditions.getIfNoneMatch()); + + return this.blobClientInternal + .downloadWithResponse(snapshot, versionId, null, range.toHeaderValue(), requestConditions.getLeaseId(), + getMD5, null, null, customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKey(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKeySha256(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionAlgorithm(), + requestConditions.getTagsConditions(), rangeConditions, + blobRequestOptions(ModelHelper.streamingContext(context))) + .map(ModelHelper::toStreamResponse); } /** @@ -1743,13 +1763,11 @@ Mono> deleteWithResponse(DeleteSnapshotsOptionType deleteBlobSnap BlobRequestConditions requestConditions, Context context) { requestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; - return this.azureBlobStorage.getBlobs() - .deleteNoCustomHeadersWithResponseAsync(containerName, blobName, snapshot, versionId, null, - requestConditions.getLeaseId(), deleteBlobSnapshotOptions, requestConditions.getIfModifiedSince(), - requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, null, - requestConditions.getAccessTierIfModifiedSince(), requestConditions.getAccessTierIfUnmodifiedSince(), - context); + return this.blobClientInternal + .deleteWithResponse(snapshot, versionId, null, requestConditions.getLeaseId(), deleteBlobSnapshotOptions, + requestConditions.getTagsConditions(), null, requestConditions.getAccessTierIfModifiedSince(), + requestConditions.getAccessTierIfUnmodifiedSince(), requestConditions, blobRequestOptions(context)) + .map(rb -> (Response) rb); } /** @@ -1891,12 +1909,12 @@ Mono> getPropertiesWithResponse(BlobRequestConditions r requestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getBlobs() - .getPropertiesWithResponseAsync(containerName, blobName, snapshot, versionId, null, - requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), - requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, customerProvidedKey, - context) + return this.blobClientInternal + .getPropertiesWithResponse(snapshot, versionId, null, requestConditions.getLeaseId(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKey(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKeySha256(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionAlgorithm(), + requestConditions.getTagsConditions(), requestConditions, blobRequestOptions(context)) .map(rb -> new SimpleResponse<>(rb, BlobPropertiesConstructorProxy .create(new BlobPropertiesInternalGetProperties(rb.getDeserializedHeaders())))); } @@ -1904,9 +1922,13 @@ Mono> getPropertiesWithResponse(BlobRequestConditions r Mono> getPropertiesWithResponseNoHeaders(Context context) { context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getBlobs() - .getPropertiesNoCustomHeadersWithResponseAsync(containerName, blobName, snapshot, versionId, null, null, - null, null, null, null, null, null, customerProvidedKey, context); + return this.blobClientInternal + .getPropertiesWithResponse(snapshot, versionId, null, null, + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKey(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKeySha256(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionAlgorithm(), null, null, + blobRequestOptions(context)) + .map(rb -> (Response) rb); } /** @@ -2023,11 +2045,13 @@ private Mono> getLayou : finalOptions.getRequestConditions(); context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getBlobs() - .getLayoutWithResponseAsync(containerName, blobName, snapshot, versionId, marker, pageSize, null, - range.toHeaderValue(), requestConditions.getLeaseId(), requestConditions.getTagsConditions(), - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), null, customerProvidedKey, context) + return this.blobClientInternal + .getLayoutWithResponse(snapshot, versionId, marker, pageSize, null, range.toHeaderValue(), + requestConditions.getLeaseId(), requestConditions.getTagsConditions(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKey(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKeySha256(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionAlgorithm(), requestConditions, + blobRequestOptions(context)) .map(BlobAsyncClientBase::toLayoutPagedResponse); } @@ -2104,11 +2128,14 @@ Mono> setHttpHeadersWithResponse(BlobHttpHeaders headers, BlobReq Context context) { requestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; - return this.azureBlobStorage.getBlobs() - .setHttpHeadersNoCustomHeadersWithResponseAsync(containerName, blobName, null, - requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), - requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, headers, context); + BlobHttpHeaders h = headers == null ? new BlobHttpHeaders() : headers; + + return this.blobClientInternal + .setHttpHeadersWithResponse(null, h.getCacheControl(), h.getContentType(), h.getContentMd5(), + h.getContentEncoding(), h.getContentLanguage(), requestConditions.getLeaseId(), + h.getContentDisposition(), requestConditions.getTagsConditions(), requestConditions, + blobRequestOptions(context)) + .map(rb -> (Response) rb); } /** @@ -2173,12 +2200,16 @@ Mono> setMetadataWithResponse(Map metadata, BlobR requestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getBlobs() - .setMetadataNoCustomHeadersWithResponseAsync(containerName, blobName, null, metadata, - requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), - requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, customerProvidedKey, - encryptionScope, context); + RequestOptions setMetadataOptions = blobRequestOptions(context); + + return this.blobClientInternal + .setMetadataWithResponse(null, metadata, requestConditions.getLeaseId(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKey(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKeySha256(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), + requestConditions.getTagsConditions(), requestConditions, setMetadataOptions) + .map(rb -> (Response) rb); } /** @@ -2234,11 +2265,11 @@ Mono>> getTagsWithResponse(BlobGetTagsOptions optio options = (options == null) ? new BlobGetTagsOptions() : options; BlobRequestConditions requestConditions = (options.getRequestConditions() == null) ? new BlobRequestConditions() : options.getRequestConditions(); - return this.azureBlobStorage.getBlobs() - .getTagsWithResponseAsync(containerName, blobName, null, null, snapshot, versionId, - requestConditions.getTagsConditions(), requestConditions.getLeaseId(), - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), context) + return this.blobClientInternal + .getTagsWithResponse(null, snapshot, versionId, requestConditions.getLeaseId(), + requestConditions.getTagsConditions(), requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), + requestConditions.getIfNoneMatch(), blobRequestOptions(context)) .map(response -> { Map tags = new HashMap<>(); for (BlobTag tag : response.getValue().getBlobTagSet()) { @@ -2311,15 +2342,16 @@ Mono> setTagsWithResponse(BlobSetTagsOptions options, Context con if (options.getTags() != null) { tagList = new ArrayList<>(); for (Map.Entry entry : options.getTags().entrySet()) { - tagList.add(new BlobTag().setKey(entry.getKey()).setValue(entry.getValue())); + tagList.add(new BlobTag(entry.getKey(), entry.getValue())); } } - BlobTags t = new BlobTags().setBlobTagSet(tagList); - return this.azureBlobStorage.getBlobs() - .setTagsNoCustomHeadersWithResponseAsync(containerName, blobName, null, versionId, null, null, null, - requestConditions.getTagsConditions(), requestConditions.getLeaseId(), - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), t, context); + BlobTags t = new BlobTags(tagList); + return this.blobClientInternal + .setTagsWithResponse(t, null, versionId, null, null, requestConditions.getTagsConditions(), + requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), + requestConditions.getIfNoneMatch(), blobRequestOptions(context)) + .map(rb -> (Response) rb); } /** @@ -2384,13 +2416,15 @@ Mono> createSnapshotWithResponse(Map new SimpleResponse<>(rb, this.getSnapshotClient(rb.getDeserializedHeaders().getXMsSnapshot()))); + RequestOptions snapshotOptions = blobRequestOptions(context); + + return this.blobClientInternal.createSnapshotWithResponse(null, metadata, + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKey(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKeySha256(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), + requestConditions.getTagsConditions(), requestConditions.getLeaseId(), requestConditions, snapshotOptions) + .map(rb -> new SimpleResponse<>(rb, this.getSnapshotClient(rb.getDeserializedHeaders().getSnapshot()))); } /** @@ -2492,9 +2526,10 @@ public Mono> setAccessTierWithResponse(BlobSetAccessTierOptions o Mono> setTierWithResponse(BlobSetAccessTierOptions options, Context context) { StorageImplUtils.assertNotNull("options", options); - return this.azureBlobStorage.getBlobs() - .setTierNoCustomHeadersWithResponseAsync(containerName, blobName, options.getTier(), snapshot, versionId, - null, options.getPriority(), null, options.getLeaseId(), options.getTagsConditions(), context); + return this.blobClientInternal + .setTierWithResponse(options.getTier(), snapshot, versionId, null, options.getPriority(), + options.getLeaseId(), options.getTagsConditions(), blobRequestOptions(context)) + .map(rb -> (Response) rb); } /** @@ -2545,8 +2580,8 @@ public Mono> undeleteWithResponse() { } Mono> undeleteWithResponse(Context context) { - return this.azureBlobStorage.getBlobs() - .undeleteNoCustomHeadersWithResponseAsync(containerName, blobName, null, null, context); + return this.blobClientInternal.undeleteWithResponse(null, blobRequestOptions(context)) + .map(rb -> (Response) rb); } /** @@ -2598,13 +2633,11 @@ public Mono> getAccountInfoWithResponse() { } Mono> getAccountInfoWithResponse(Context context) { - return this.azureBlobStorage.getBlobs() - .getAccountInfoWithResponseAsync(containerName, blobName, null, null, context) - .map(rb -> { - BlobsGetAccountInfoHeaders hd = rb.getDeserializedHeaders(); - return new SimpleResponse<>(rb, - new StorageAccountInfo(hd.getXMsSkuName(), hd.getXMsAccountKind(), hd.isXMsIsHnsEnabled())); - }); + return this.blobClientInternal.getAccountInfoWithResponse(null, blobRequestOptions(context)).map(rb -> { + BlobsGetAccountInfoHeaders hd = rb.getDeserializedHeaders(); + return new SimpleResponse<>(rb, + new StorageAccountInfo(hd.getSkuName(), hd.getAccountKind(), hd.isHierarchicalNamespaceEnabled())); + }); } /** @@ -2869,21 +2902,24 @@ Mono queryWithResponse(BlobQueryOptions queryOptions, Co QuerySerialization out = BlobQueryReader.transformOutputSerialization(queryOptions.getOutputSerialization(), LOGGER); - QueryRequest qr = new QueryRequest().setExpression(queryOptions.getExpression()) - .setInputSerialization(in) + QueryRequest qr = new QueryRequest(QueryRequestType.SQL, queryOptions.getExpression()).setInputSerialization(in) .setOutputSerialization(out); - return this.azureBlobStorage.getBlobs() - .queryWithResponseAsync(containerName, blobName, getSnapshotId(), null, requestConditions.getLeaseId(), - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, qr, getCustomerProvidedKey(), context) + CpkInfo queryCpk = getCustomerProvidedKey(); + + return this.blobClientInternal + .queryWithResponse(qr, getSnapshotId(), null, requestConditions.getLeaseId(), + queryCpk == null ? null : queryCpk.getEncryptionKey(), + queryCpk == null ? null : queryCpk.getEncryptionKeySha256(), + queryCpk == null ? null : queryCpk.getEncryptionAlgorithm(), requestConditions.getTagsConditions(), + requestConditions, blobRequestOptions(ModelHelper.streamingContext(context))) .map(response -> new BlobQueryAsyncResponse(response.getRequest(), response.getStatusCode(), response.getHeaders(), /* Parse the avro reactive stream. */ - new BlobQueryReader(response.getValue(), queryOptions.getProgressConsumer(), + new BlobQueryReader(response.getValue().toFluxByteBuffer(), queryOptions.getProgressConsumer(), queryOptions.getErrorConsumer()).read(), - ModelHelper.transformQueryHeaders(response.getDeserializedHeaders(), response.getHeaders()))); + ModelHelper.transformQueryHeaders(new BlobsQueryHeaders(response.getHeaders()), + response.getHeaders()))); } /** @@ -2965,15 +3001,15 @@ Mono> setImmutabilityPolicyWithResponse(BlobImm BlobRequestConditionProperty.IF_MODIFIED_SINCE), "setImmutabilityPolicy(WithResponse)", "requestConditions"); - return this.azureBlobStorage.getBlobs() - .setImmutabilityPolicyWithResponseAsync(containerName, blobName, null, null, - finalRequestConditions.getIfUnmodifiedSince(), finalImmutabilityPolicy.getExpiryTime(), - finalImmutabilityPolicy.getPolicyMode(), snapshot, versionId, context) + return this.blobClientInternal + .setImmutabilityPolicyWithResponse(finalImmutabilityPolicy.getExpiryTime(), null, + finalRequestConditions.getIfUnmodifiedSince(), finalImmutabilityPolicy.getPolicyMode(), snapshot, + versionId, blobRequestOptions(context)) .map(response -> { BlobsSetImmutabilityPolicyHeaders headers = response.getDeserializedHeaders(); BlobImmutabilityPolicy responsePolicy - = new BlobImmutabilityPolicy().setPolicyMode(headers.getXMsImmutabilityPolicyMode()) - .setExpiryTime(headers.getXMsImmutabilityPolicyUntilDate()); + = new BlobImmutabilityPolicy().setPolicyMode(headers.getImmutabilityPolicyMode()) + .setExpiryTime(headers.getImmutabilityPolicyExpiresOn()); return new SimpleResponse<>(response, responsePolicy); }); } @@ -3026,9 +3062,9 @@ public Mono> deleteImmutabilityPolicyWithResponse() { Mono> deleteImmutabilityPolicyWithResponse(Context context) { context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getBlobs() - .deleteImmutabilityPolicyNoCustomHeadersWithResponseAsync(containerName, blobName, null, null, snapshot, - versionId, context); + return this.blobClientInternal + .deleteImmutabilityPolicyWithResponse(null, snapshot, versionId, blobRequestOptions(context)) + .map(rb -> (Response) rb); } /** @@ -3081,9 +3117,9 @@ public Mono> setLegalHoldWithResponse(boolean lega Mono> setLegalHoldWithResponse(boolean legalHold, Context context) { context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getBlobs() - .setLegalHoldWithResponseAsync(containerName, blobName, legalHold, null, null, snapshot, versionId, context) + return this.blobClientInternal + .setLegalHoldWithResponse(legalHold, null, snapshot, versionId, blobRequestOptions(context)) .map(response -> new SimpleResponse<>(response, - new InternalBlobLegalHoldResult(response.getDeserializedHeaders().isXMsLegalHold()))); + new InternalBlobLegalHoldResult(response.getDeserializedHeaders().isLegalHold()))); } } 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 9a367004ca934..86f3b1f793c97 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 @@ -12,6 +12,7 @@ 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.RequestOptions; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.ResponseBase; import com.azure.core.http.rest.SimpleResponse; @@ -29,13 +30,13 @@ 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.BlobClientInternal; import com.azure.storage.blob.implementation.accesshelpers.BlobPropertiesConstructorProxy; import com.azure.storage.blob.implementation.models.BlobLayoutInternal; 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.BlobsCopyFromUrlHeaders; import com.azure.storage.blob.implementation.models.BlobsCreateSnapshotHeaders; import com.azure.storage.blob.implementation.models.BlobsGetAccountInfoHeaders; import com.azure.storage.blob.implementation.models.BlobsGetLayoutHeaders; @@ -43,7 +44,7 @@ import com.azure.storage.blob.implementation.models.BlobsGetTagsHeaders; 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.BlobsStartCopyFromUrlHeaders; import com.azure.storage.blob.implementation.models.EncryptionScope; import com.azure.storage.blob.implementation.models.InternalBlobLegalHoldResult; import com.azure.storage.blob.implementation.util.BlobLayoutCacheValue; @@ -51,7 +52,9 @@ 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.BuilderHelper; import com.azure.storage.blob.implementation.util.ModelHelper; +import com.azure.storage.blob.implementation.util.RequestOptionsHelper; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobBeginCopySourceRequestConditions; import com.azure.storage.blob.models.BlobCopyInfo; @@ -189,6 +192,13 @@ public class BlobClientBase { private final BlobAsyncClientBase client; + final BlobClientInternal blobClientInternal; + + RequestOptions blobRequestOptions(Context context) { + return RequestOptionsHelper.blobRequestOptions(context, this.azureBlobStorage.getUrl(), getContainerName(), + getBlobName()); + } + /** * Constructor used by {@link SpecializedBlobClientBuilder}. * @@ -226,10 +236,8 @@ protected BlobClientBase(BlobAsyncClientBase client, HttpPipeline pipeline, Stri 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.azureBlobStorage = BuilderHelper.createAzureBlobStorage(pipeline, url, serviceVersion); + this.blobClientInternal = new BlobClientInternal(this.azureBlobStorage.getBlobs()); this.serviceVersion = serviceVersion; this.accountName = accountName; @@ -728,9 +736,11 @@ 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 = () -> this.blobClientInternal.getPropertiesWithResponse(snapshot, + versionId, null, null, customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKey(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKeySha256(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionAlgorithm(), null, null, + blobRequestOptions(context)); return new SimpleResponse<>(sendRequest(operation, timeout, BlobStorageException.class), true); } catch (RuntimeException e) { if (e instanceof BlobStorageException) { @@ -892,25 +902,25 @@ 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, + RequestOptions startCopyOptions = blobRequestOptions(Context.NONE); + ResponseBase response + = this.blobClientInternal.startCopyFromUrlWithResponse(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()), + sourceModifiedConditions.getTagsConditions(), destinationRequestConditions.getTagsConditions(), + destinationRequestConditions.getLeaseId(), ModelHelper.tagsToString(options.getTags()), options.isSealDestination(), immutabilityPolicy.getExpiryTime(), - immutabilityPolicy.getPolicyMode(), options.isLegalHold(), Context.NONE); + immutabilityPolicy.getPolicyMode(), options.isLegalHold(), destinationRequestConditions, + startCopyOptions); - BlobsStartCopyFromURLHeaders headers = response.getDeserializedHeaders(); - copyId.set(headers.getXMsCopyId()); + BlobsStartCopyFromUrlHeaders headers = response.getDeserializedHeaders(); + copyId.set(headers.getCopyId()); return new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS, - new BlobCopyInfo(options.getSourceUrl(), headers.getXMsCopyId(), headers.getXMsCopyStatus(), + new BlobCopyInfo(options.getSourceUrl(), headers.getCopyId(), headers.getCopyStatus(), headers.getETag(), headers.getLastModified(), ModelHelper.getErrorCode(response.getHeaders()), - headers.getXMsVersionId())); + headers.getVersionId())); }; Function, PollResponse> pollOperation @@ -1010,9 +1020,8 @@ 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 = () -> this.azureBlobStorage.getBlobs() - .abortCopyFromURLNoCustomHeadersWithResponse(containerName, blobName, copyId, null, leaseId, null, - finalContext); + Callable> operation = () -> this.blobClientInternal.abortCopyFromUrlWithResponse(copyId, null, + leaseId, blobRequestOptions(finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -1146,21 +1155,22 @@ public Response copyFromUrlWithResponse(BlobCopyFromUrlOptions options, = options.getSourceAuthorization() == null ? null : options.getSourceAuthorization().toString(); Context finalContext = context == null ? Context.NONE : context; - Callable> operation = () -> this.azureBlobStorage.getBlobs() - .copyFromURLWithResponse(containerName, blobName, options.getCopySource(), null, options.getMetadata(), - options.getTier(), sourceModifiedRequestConditions.getIfModifiedSince(), + RequestOptions copyFromUrlOptions = blobRequestOptions(finalContext); + + Callable> operation + = () -> this.blobClientInternal.copyFromUrlWithResponse(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()), + sourceModifiedRequestConditions.getIfNoneMatch(), destRequestConditions.getTagsConditions(), + destRequestConditions.getLeaseId(), null, ModelHelper.tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), options.hasLegalHold(), - sourceAuth, options.getCopySourceTagsMode(), options.getSourceShareTokenIntent(), this.encryptionScope, - finalContext); + sourceAuth, this.encryptionScope == null ? null : this.encryptionScope.getEncryptionScope(), + ModelHelper.toCopySourceTags(options.getCopySourceTagsMode()), options.getSourceShareTokenIntent(), + destRequestConditions, copyFromUrlOptions); - ResponseBase response + ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); - return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsCopyId()); + return new SimpleResponse<>(response, response.getDeserializedHeaders().getCopyId()); } /** @@ -1717,14 +1727,11 @@ public Response deleteWithResponse(DeleteSnapshotsOptionType deleteBlobSna 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, - finalRequestConditions.getAccessTierIfModifiedSince(), - finalRequestConditions.getAccessTierIfUnmodifiedSince(), finalContext); + Callable> operation = () -> this.blobClientInternal.deleteWithResponse(snapshot, versionId, null, + finalRequestConditions.getLeaseId(), deleteBlobSnapshotOptions, finalRequestConditions.getTagsConditions(), + null, finalRequestConditions.getAccessTierIfModifiedSince(), + finalRequestConditions.getAccessTierIfUnmodifiedSince(), finalRequestConditions, + blobRequestOptions(finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -1852,12 +1859,13 @@ public Response getPropertiesWithResponse(BlobRequestConditions 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); + Callable> operation + = () -> this.blobClientInternal.getPropertiesWithResponse(snapshot, versionId, null, + finalRequestConditions.getLeaseId(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKey(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKeySha256(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionAlgorithm(), + finalRequestConditions.getTagsConditions(), finalRequestConditions, blobRequestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response, BlobPropertiesConstructorProxy @@ -1942,12 +1950,13 @@ private ResponseBase getLayoutPageRes BlobRequestConditions requestConditions = options.getRequestConditions() == null ? new BlobRequestConditions() : options.getRequestConditions(); - Callable> operation = () -> this.azureBlobStorage - .getBlobs() - .getLayoutWithResponse(containerName, blobName, snapshot, versionId, marker, pageSize, null, + Callable> operation + = () -> this.blobClientInternal.getLayoutWithResponse(snapshot, versionId, marker, pageSize, null, range.toHeaderValue(), requestConditions.getLeaseId(), requestConditions.getTagsConditions(), - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), null, customerProvidedKey, context); + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKey(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKeySha256(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionAlgorithm(), requestConditions, + blobRequestOptions(context)); return sendRequest(operation, null, BlobStorageException.class); } @@ -2020,12 +2029,12 @@ public Response setHttpHeadersWithResponse(BlobHttpHeaders headers, BlobRe = 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); + BlobHttpHeaders h = headers == null ? new BlobHttpHeaders() : headers; + + Callable> operation = () -> this.blobClientInternal.setHttpHeadersWithResponse(null, + h.getCacheControl(), h.getContentType(), h.getContentMd5(), h.getContentEncoding(), h.getContentLanguage(), + finalRequestConditions.getLeaseId(), h.getContentDisposition(), finalRequestConditions.getTagsConditions(), + finalRequestConditions, blobRequestOptions(finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -2087,12 +2096,15 @@ public Response setMetadataWithResponse(Map metadata, Blob = requestConditions == null ? new BlobRequestConditions() : requestConditions; Context finalContext = context == null ? Context.NONE : context; - 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); + RequestOptions setMetadataOptions = blobRequestOptions(finalContext); + + Callable> operation + = () -> this.blobClientInternal.setMetadataWithResponse(null, metadata, finalRequestConditions.getLeaseId(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKey(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKeySha256(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), + finalRequestConditions.getTagsConditions(), finalRequestConditions, setMetadataOptions); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -2149,11 +2161,11 @@ public Response> getTagsWithResponse(BlobGetTagsOptions opti : 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(), + Callable> operation + = () -> this.blobClientInternal.getTagsWithResponse(null, snapshot, versionId, + requestConditions.getLeaseId(), requestConditions.getTagsConditions(), requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), finalContext); + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), blobRequestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); @@ -2220,15 +2232,14 @@ public Response setTagsWithResponse(BlobSetTagsOptions options, Duration t if (options.getTags() != null) { tagList = new ArrayList<>(); for (Map.Entry entry : options.getTags().entrySet()) { - tagList.add(new BlobTag().setKey(entry.getKey()).setValue(entry.getValue())); + tagList.add(new BlobTag(entry.getKey(), 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(), - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), t, finalContext); + BlobTags t = new BlobTags(tagList); + Callable> operation = () -> this.blobClientInternal.setTagsWithResponse(t, null, versionId, null, + null, requestConditions.getTagsConditions(), requestConditions.getLeaseId(), + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), blobRequestOptions(finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -2288,17 +2299,20 @@ public Response createSnapshotWithResponse(Map m BlobRequestConditions finalRequestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; - 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); + RequestOptions snapshotOptions = blobRequestOptions(finalContext); + + Callable> operation + = () -> this.blobClientInternal.createSnapshotWithResponse(null, metadata, + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKey(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionKeySha256(), + customerProvidedKey == null ? null : customerProvidedKey.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), + finalRequestConditions.getTagsConditions(), finalRequestConditions.getLeaseId(), finalRequestConditions, + snapshotOptions); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); - return new SimpleResponse<>(response, - this.getSnapshotClient(response.getDeserializedHeaders().getXMsSnapshot())); + return new SimpleResponse<>(response, this.getSnapshotClient(response.getDeserializedHeaders().getSnapshot())); } /** @@ -2392,9 +2406,9 @@ 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 = () -> this.blobClientInternal.setTierWithResponse(options.getTier(), + snapshot, versionId, null, options.getPriority(), options.getLeaseId(), options.getTagsConditions(), + blobRequestOptions(finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -2440,8 +2454,8 @@ 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 + = () -> this.blobClientInternal.undeleteWithResponse(null, blobRequestOptions(finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -2489,13 +2503,13 @@ 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, null, null, finalContext); + Callable> operation + = () -> this.blobClientInternal.getAccountInfoWithResponse(null, blobRequestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); BlobsGetAccountInfoHeaders hd = response.getDeserializedHeaders(); - return new SimpleResponse<>(response, new StorageAccountInfo(hd.getXMsSkuName(), hd.getXMsAccountKind())); + return new SimpleResponse<>(response, new StorageAccountInfo(hd.getSkuName(), hd.getAccountKind())); } /** @@ -2888,17 +2902,16 @@ public Response setImmutabilityPolicyWithResponse(BlobIm "setImmutabilityPolicy(WithResponse)", "requestConditions"); Callable> operation - = () -> this.azureBlobStorage.getBlobs() - .setImmutabilityPolicyWithResponse(containerName, blobName, null, null, - finalRequestConditions.getIfUnmodifiedSince(), finalImmutabilityPolicy.getExpiryTime(), - finalImmutabilityPolicy.getPolicyMode(), snapshot, versionId, finalContext); + = () -> this.blobClientInternal.setImmutabilityPolicyWithResponse(finalImmutabilityPolicy.getExpiryTime(), + null, finalRequestConditions.getIfUnmodifiedSince(), finalImmutabilityPolicy.getPolicyMode(), snapshot, + versionId, blobRequestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); BlobsSetImmutabilityPolicyHeaders headers = response.getDeserializedHeaders(); BlobImmutabilityPolicy responsePolicy - = new BlobImmutabilityPolicy().setPolicyMode(headers.getXMsImmutabilityPolicyMode()) - .setExpiryTime(headers.getXMsImmutabilityPolicyUntilDate()); + = new BlobImmutabilityPolicy().setPolicyMode(headers.getImmutabilityPolicyMode()) + .setExpiryTime(headers.getImmutabilityPolicyExpiresOn()); return new SimpleResponse<>(response, responsePolicy); } @@ -2943,9 +2956,8 @@ 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, snapshot, - versionId, finalContext); + Callable> operation = () -> this.blobClientInternal.deleteImmutabilityPolicyWithResponse(null, + snapshot, versionId, blobRequestOptions(finalContext)); return sendRequest(operation, timeout, BlobStorageException.class); } @@ -2993,13 +3005,12 @@ public BlobLegalHoldResult setLegalHold(boolean legalHold) { 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, snapshot, versionId, - finalContext); + Callable> operation = () -> this.blobClientInternal + .setLegalHoldWithResponse(legalHold, null, snapshot, versionId, blobRequestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response, - new InternalBlobLegalHoldResult(response.getDeserializedHeaders().isXMsLegalHold())); + new InternalBlobLegalHoldResult(response.getDeserializedHeaders().isLegalHold())); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseAsyncClient.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseAsyncClient.java index 5bab379708f62..12cad86b50b24 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseAsyncClient.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/BlobLeaseAsyncClient.java @@ -8,15 +8,20 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.HttpPipeline; import com.azure.core.http.RequestConditions; +import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; +import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.BlobAsyncClient; import com.azure.storage.blob.BlobContainerAsyncClient; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; -import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; +import com.azure.storage.blob.implementation.BlobAsyncClientInternal; +import com.azure.storage.blob.implementation.BlobContainerAsyncClientInternal; +import com.azure.storage.blob.implementation.util.RequestOptionsHelper; +import com.azure.storage.blob.implementation.util.BuilderHelper; import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.BlobLeaseRequestConditions; import com.azure.storage.blob.options.BlobAcquireLeaseOptions; @@ -72,16 +77,27 @@ public final class BlobLeaseAsyncClient { private final String blobName; private final boolean isBlob; private final AzureBlobStorageImpl client; + private final BlobAsyncClientInternal blobClientInternal; + private final BlobContainerAsyncClientInternal containerClientInternal; private final String accountName; private volatile String leaseId; + // A lease client addresses either a container or a blob, so the request has to be scoped to whichever this + // client was built for. + private RequestOptions leaseRequestOptions(Context context) { + return this.isBlob + ? RequestOptionsHelper.blobRequestOptions(context, this.client.getUrl(), containerName, blobName) + : RequestOptionsHelper.containerRequestOptions(context, this.client.getUrl(), containerName); + } + BlobLeaseAsyncClient(HttpPipeline pipeline, String url, String containerName, String blobName, String leaseId, - boolean isBlob, String accountName, String serviceVersion) { + boolean isBlob, String accountName, BlobServiceVersion serviceVersion) { this.isBlob = isBlob; this.leaseId = leaseId; - this.client - = new AzureBlobStorageImplBuilder().pipeline(pipeline).url(url).version(serviceVersion).buildClient(); + this.client = BuilderHelper.createAzureBlobStorage(pipeline, url, serviceVersion); + this.blobClientInternal = new BlobAsyncClientInternal(this.client.getBlobs()); + this.containerClientInternal = new BlobContainerAsyncClientInternal(this.client.getContainers()); this.accountName = accountName; this.containerName = containerName; this.blobName = blobName; @@ -200,17 +216,16 @@ Mono> acquireLeaseWithResponse(BlobAcquireLeaseOptions options, Mono> response; if (this.isBlob) { - response = this.client.getBlobs() - .acquireLeaseWithResponseAsync(containerName, blobName, null, options.getDuration(), this.leaseId, - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, context) - .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getXMsLeaseId())); + response = this.blobClientInternal + .acquireLeaseWithResponse(options.getDuration(), null, this.leaseId, + requestConditions.getTagsConditions(), requestConditions, leaseRequestOptions(context)) + .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseId())); } else { - response = this.client.getContainers() - .acquireLeaseWithResponseAsync(containerName, null, options.getDuration(), this.leaseId, - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), null, context) - .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getXMsLeaseId())); + response = this.containerClientInternal + .acquireLeaseWithResponse(options.getDuration(), null, this.leaseId, + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + leaseRequestOptions(context)) + .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseId())); } response = response.doOnSuccess(r -> this.leaseId = r.getValue()); @@ -300,17 +315,15 @@ Mono> renewLeaseWithResponse(BlobRenewLeaseOptions options, Con Mono> response; if (this.isBlob) { - response = this.client.getBlobs() - .renewLeaseWithResponseAsync(containerName, blobName, this.leaseId, null, - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, context) - .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getXMsLeaseId())); + response = this.blobClientInternal + .renewLeaseWithResponse(this.leaseId, null, requestConditions.getTagsConditions(), requestConditions, + leaseRequestOptions(context)) + .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseId())); } else { - response = this.client.getContainers() - .renewLeaseWithResponseAsync(containerName, this.leaseId, null, requestConditions.getIfModifiedSince(), - requestConditions.getIfUnmodifiedSince(), null, context) - .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getXMsLeaseId())); + response = this.containerClientInternal + .renewLeaseWithResponse(this.leaseId, null, requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), leaseRequestOptions(context)) + .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseId())); } response = response.doOnSuccess(r -> this.leaseId = r.getValue()); @@ -399,15 +412,15 @@ Mono> releaseLeaseWithResponse(BlobReleaseLeaseOptions options, C context = context == null ? Context.NONE : context; if (this.isBlob) { - return this.client.getBlobs() - .releaseLeaseNoCustomHeadersWithResponseAsync(containerName, blobName, this.leaseId, null, - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, context); + return this.blobClientInternal + .releaseLeaseWithResponse(this.leaseId, null, requestConditions.getTagsConditions(), requestConditions, + leaseRequestOptions(context)) + .map(rb -> (Response) rb); } else { - return this.client.getContainers() - .releaseLeaseNoCustomHeadersWithResponseAsync(containerName, this.leaseId, null, - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), null, context); + return this.containerClientInternal + .releaseLeaseWithResponse(this.leaseId, null, requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), leaseRequestOptions(context)) + .map(rb -> (Response) rb); } } @@ -511,17 +524,15 @@ Mono> breakLeaseWithResponse(BlobBreakLeaseOptions options, Co = options.getBreakPeriod() == null ? null : Math.toIntExact(options.getBreakPeriod().getSeconds()); if (this.isBlob) { - return this.client.getBlobs() - .breakLeaseWithResponseAsync(containerName, blobName, null, breakPeriod, - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, context) - .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getXMsLeaseTime())); + return this.blobClientInternal + .breakLeaseWithResponse(null, breakPeriod, requestConditions.getTagsConditions(), requestConditions, + leaseRequestOptions(context)) + .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseTime())); } else { - return this.client.getContainers() - .breakLeaseWithResponseAsync(containerName, null, breakPeriod, requestConditions.getIfModifiedSince(), - requestConditions.getIfUnmodifiedSince(), null, context) - .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getXMsLeaseTime())); + return this.containerClientInternal + .breakLeaseWithResponse(null, requestConditions.getIfModifiedSince(), + requestConditions.getIfUnmodifiedSince(), breakPeriod, leaseRequestOptions(context)) + .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseTime())); } } @@ -611,17 +622,16 @@ Mono> changeLeaseWithResponse(BlobChangeLeaseOptions options, C Mono> response; if (this.isBlob) { - response = this.client.getBlobs() - .changeLeaseWithResponseAsync(containerName, blobName, this.leaseId, options.getProposedId(), null, - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, context) - .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getXMsLeaseId())); + response = this.blobClientInternal + .changeLeaseWithResponse(this.leaseId, options.getProposedId(), null, + requestConditions.getTagsConditions(), requestConditions, leaseRequestOptions(context)) + .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseId())); } else { - response = this.client.getContainers() - .changeLeaseWithResponseAsync(containerName, this.leaseId, options.getProposedId(), null, - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), null, context) - .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getXMsLeaseId())); + response = this.containerClientInternal + .changeLeaseWithResponse(this.leaseId, options.getProposedId(), null, + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + leaseRequestOptions(context)) + .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getLeaseId())); } response = response.doOnSuccess(r -> this.leaseId = r.getValue()); 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 4a0e76c17c8a3..8b2ead476f547 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 @@ -8,14 +8,18 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.HttpPipeline; import com.azure.core.http.RequestConditions; +import com.azure.core.http.rest.RequestOptions; 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.storage.blob.BlobServiceVersion; 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.BlobClientInternal; +import com.azure.storage.blob.implementation.BlobContainerClientInternal; +import com.azure.storage.blob.implementation.util.RequestOptionsHelper; import com.azure.storage.blob.implementation.models.BlobsAcquireLeaseHeaders; import com.azure.storage.blob.implementation.models.BlobsBreakLeaseHeaders; import com.azure.storage.blob.implementation.models.BlobsChangeLeaseHeaders; @@ -24,6 +28,7 @@ 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.BuilderHelper; import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.BlobLeaseRequestConditions; import com.azure.storage.blob.models.BlobStorageException; @@ -76,16 +81,27 @@ public final class BlobLeaseClient { private final String blobName; private final boolean isBlob; private final AzureBlobStorageImpl client; + private final BlobClientInternal blobClientInternal; + private final BlobContainerClientInternal containerClientInternal; private final String accountName; private volatile String leaseId; + // A lease client addresses either a container or a blob, so the request has to be scoped to whichever this + // client was built for. + private RequestOptions leaseRequestOptions(Context context) { + return this.isBlob + ? RequestOptionsHelper.blobRequestOptions(context, this.client.getUrl(), containerName, blobName) + : RequestOptionsHelper.containerRequestOptions(context, this.client.getUrl(), containerName); + } + BlobLeaseClient(HttpPipeline pipeline, String url, String containerName, String blobName, String leaseId, - boolean isBlob, String accountName, String serviceVersion) { + boolean isBlob, String accountName, BlobServiceVersion serviceVersion) { this.isBlob = isBlob; this.leaseId = leaseId; - this.client - = new AzureBlobStorageImplBuilder().pipeline(pipeline).url(url).version(serviceVersion).buildClient(); + this.client = BuilderHelper.createAzureBlobStorage(pipeline, url, serviceVersion); + this.blobClientInternal = new BlobClientInternal(this.client.getBlobs()); + this.containerClientInternal = new BlobContainerClientInternal(this.client.getContainers()); this.accountName = accountName; this.containerName = containerName; this.blobName = blobName; @@ -202,24 +218,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 + = () -> this.blobClientInternal.acquireLeaseWithResponse(options.getDuration(), null, this.leaseId, + requestConditions.getTagsConditions(), requestConditions, leaseRequestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); - this.leaseId = response.getDeserializedHeaders().getXMsLeaseId(); - return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseId()); + this.leaseId = response.getDeserializedHeaders().getLeaseId(); + return new SimpleResponse<>(response, response.getDeserializedHeaders().getLeaseId()); } else { - Callable> operation = () -> this.client.getContainers() - .acquireLeaseWithResponse(containerName, null, options.getDuration(), this.leaseId, - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), null, - finalContext); + Callable> operation + = () -> this.containerClientInternal.acquireLeaseWithResponse(options.getDuration(), null, this.leaseId, + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + leaseRequestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); - this.leaseId = response.getDeserializedHeaders().getXMsLeaseId(); - return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseId()); + this.leaseId = response.getDeserializedHeaders().getLeaseId(); + return new SimpleResponse<>(response, response.getDeserializedHeaders().getLeaseId()); } } @@ -303,21 +317,20 @@ public Response renewLeaseWithResponse(BlobRenewLeaseOptions options, Du : 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 + = () -> this.blobClientInternal.renewLeaseWithResponse(this.leaseId, null, + requestConditions.getTagsConditions(), requestConditions, leaseRequestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); - return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseId()); + return new SimpleResponse<>(response, response.getDeserializedHeaders().getLeaseId()); } else { - Callable> operation = () -> this.client.getContainers() - .renewLeaseWithResponse(containerName, this.leaseId, null, requestConditions.getIfModifiedSince(), - requestConditions.getIfUnmodifiedSince(), null, finalContext); + Callable> operation + = () -> this.containerClientInternal.renewLeaseWithResponse(this.leaseId, null, + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + leaseRequestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); - return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseId()); + return new SimpleResponse<>(response, response.getDeserializedHeaders().getLeaseId()); } } @@ -401,16 +414,12 @@ public Response releaseLeaseWithResponse(BlobReleaseLeaseOptions options, Context finalContext = context == null ? Context.NONE : context; Callable> operation; if (this.isBlob) { - operation = () -> this.client.getBlobs() - .releaseLeaseNoCustomHeadersWithResponse(containerName, blobName, this.leaseId, null, - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, finalContext); + operation = () -> this.blobClientInternal.releaseLeaseWithResponse(this.leaseId, null, + requestConditions.getTagsConditions(), requestConditions, leaseRequestOptions(finalContext)); } else { - operation = () -> this.client.getContainers() - .releaseLeaseNoCustomHeadersWithResponse(containerName, this.leaseId, null, - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), null, - finalContext); + operation = () -> this.containerClientInternal.releaseLeaseWithResponse(this.leaseId, null, + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + leaseRequestOptions(finalContext)); } return sendRequest(operation, timeout, BlobStorageException.class); } @@ -515,21 +524,20 @@ 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 + = () -> this.blobClientInternal.breakLeaseWithResponse(null, breakPeriod, + requestConditions.getTagsConditions(), requestConditions, leaseRequestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); - return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseTime()); + return new SimpleResponse<>(response, response.getDeserializedHeaders().getLeaseTime()); } else { - Callable> operation = () -> this.client.getContainers() - .breakLeaseWithResponse(containerName, null, breakPeriod, requestConditions.getIfModifiedSince(), - requestConditions.getIfUnmodifiedSince(), null, finalContext); + Callable> operation + = () -> this.containerClientInternal.breakLeaseWithResponse(null, + requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), breakPeriod, + leaseRequestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); - return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseTime()); + return new SimpleResponse<>(response, response.getDeserializedHeaders().getLeaseTime()); } } @@ -616,24 +624,22 @@ public Response changeLeaseWithResponse(BlobChangeLeaseOptions options, 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); + Callable> operation + = () -> this.blobClientInternal.changeLeaseWithResponse(this.leaseId, options.getProposedId(), null, + requestConditions.getTagsConditions(), requestConditions, leaseRequestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); - this.leaseId = response.getDeserializedHeaders().getXMsLeaseId(); - return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseId()); + this.leaseId = response.getDeserializedHeaders().getLeaseId(); + return new SimpleResponse<>(response, response.getDeserializedHeaders().getLeaseId()); } else { - Callable> operation = () -> this.client.getContainers() - .changeLeaseWithResponse(containerName, this.leaseId, options.getProposedId(), null, - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), null, - finalContext); + Callable> operation + = () -> this.containerClientInternal.changeLeaseWithResponse(this.leaseId, options.getProposedId(), + null, requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), + leaseRequestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); - this.leaseId = response.getDeserializedHeaders().getXMsLeaseId(); - return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsLeaseId()); + this.leaseId = response.getDeserializedHeaders().getLeaseId(); + return new SimpleResponse<>(response, response.getDeserializedHeaders().getLeaseId()); } } 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 6b24aac311bec..780543e219966 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 @@ -93,8 +93,7 @@ public BlobLeaseClientBuilder() { */ public BlobLeaseClient buildClient() { BlobServiceVersion version = (serviceVersion == null) ? BlobServiceVersion.getLatest() : serviceVersion; - return new BlobLeaseClient(pipeline, url, containerName, blobName, getLeaseId(), isBlob, accountName, - version.getVersion()); + return new BlobLeaseClient(pipeline, url, containerName, blobName, getLeaseId(), isBlob, accountName, version); } /** @@ -105,7 +104,7 @@ 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()); + version); } /** 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 60abeff87774a..cb5daa43e9e28 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 @@ -15,9 +15,12 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobAsyncClient; import com.azure.storage.blob.BlobServiceVersion; +import com.azure.core.http.rest.RequestOptions; +import com.azure.storage.blob.implementation.BlockBlobAsyncClientInternal; +import com.azure.storage.blob.implementation.util.RequestOptionsHelper; import com.azure.storage.blob.implementation.accesshelpers.BlockBlobItemConstructorProxy; import com.azure.storage.blob.implementation.models.BlockBlobsCommitBlockListHeaders; -import com.azure.storage.blob.implementation.models.BlockBlobsPutBlobFromUrlHeaders; +import com.azure.storage.blob.implementation.models.BlockBlobsUploadBlobFromUrlHeaders; import com.azure.storage.blob.implementation.models.BlockBlobsUploadHeaders; import com.azure.storage.blob.implementation.models.EncryptionScope; import com.azure.storage.blob.implementation.util.BlobConstants; @@ -127,6 +130,14 @@ public final class BlockBlobAsyncClient extends BlobAsyncClientBase { EncryptionScope encryptionScope, String versionId) { super(pipeline, url, serviceVersion, accountName, containerName, blobName, snapshot, customerProvidedKey, encryptionScope, versionId); + this.blockBlobClientInternal = new BlockBlobAsyncClientInternal(this.azureBlobStorage.getBlockBlobs()); + } + + private final BlockBlobAsyncClientInternal blockBlobClientInternal; + + private RequestOptions blockBlobRequestOptions(Context context) { + return RequestOptionsHelper.blobRequestOptions(context, this.azureBlobStorage.getUrl(), getContainerName(), + getBlobName()); } /** @@ -442,19 +453,25 @@ Mono> uploadWithResponse(BlockBlobSimpleUploadOptions op Context finalContext = context; - return dataMono.flatMap(data -> this.azureBlobStorage.getBlockBlobs() - .uploadWithResponseAsync(containerName, blobName, options.getLength(), data, null, options.getContentMd5(), - options.getMetadata(), requestConditions.getLeaseId(), options.getTier(), - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, ModelHelper.tagsToString(options.getTags()), + BlobHttpHeaders uploadHeaders = options.getHeaders() == null ? new BlobHttpHeaders() : options.getHeaders(); + CpkInfo cpk = getCustomerProvidedKey(); + RequestOptions requestOptions = blockBlobRequestOptions(finalContext); + + return dataMono.flatMap(data -> this.blockBlobClientInternal + .uploadWithResponse(options.getLength(), data, options.getMetadata(), null, options.getContentMd5(), + uploadHeaders.getContentType(), uploadHeaders.getContentEncoding(), uploadHeaders.getContentLanguage(), + uploadHeaders.getContentMd5(), uploadHeaders.getCacheControl(), requestConditions.getLeaseId(), + uploadHeaders.getContentDisposition(), cpk == null ? null : cpk.getEncryptionKey(), + cpk == null ? null : cpk.getEncryptionKeySha256(), cpk == null ? null : cpk.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), options.getTier(), + requestConditions.getTagsConditions(), ModelHelper.tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), options.isLegalHold(), null, - null, null, options.getHeaders(), getCustomerProvidedKey(), encryptionScope, finalContext) + null, null, requestConditions, requestOptions) .map(rb -> { BlockBlobsUploadHeaders hd = rb.getDeserializedHeaders(); BlockBlobItem item = BlockBlobItemConstructorProxy.create(hd.getETag(), hd.getLastModified(), - hd.getContentMD5(), hd.isXMsRequestServerEncrypted(), hd.getXMsEncryptionKeySha256(), - hd.getXMsEncryptionScope(), hd.getXMsVersionId(), hd.getXMsContentCrc64()); + hd.getContentMd5(), hd.isServerEncrypted(), hd.getEncryptionKeySha256(), hd.getEncryptionScope(), + hd.getVersionId(), hd.getContentCrc64()); return new SimpleResponse<>(rb, item); })); } @@ -597,23 +614,27 @@ Mono> uploadFromUrlWithResponse(BlobUploadFromUrlOptions } // TODO (kasobol-msft) add metadata back (https://github.com/Azure/azure-sdk-for-net/issues/15969) - return this.azureBlobStorage.getBlockBlobs() - .putBlobFromUrlWithResponseAsync(containerName, blobName, 0, options.getSourceUrl(), null, null, null, - destinationRequestConditions.getLeaseId(), options.getTier(), - destinationRequestConditions.getIfModifiedSince(), destinationRequestConditions.getIfUnmodifiedSince(), - destinationRequestConditions.getIfMatch(), destinationRequestConditions.getIfNoneMatch(), - destinationRequestConditions.getTagsConditions(), sourceRequestConditions.getIfModifiedSince(), - sourceRequestConditions.getIfUnmodifiedSince(), sourceRequestConditions.getIfMatch(), - sourceRequestConditions.getIfNoneMatch(), sourceRequestConditions.getTagsConditions(), null, - options.getContentMd5(), ModelHelper.tagsToString(options.getTags()), - options.isCopySourceBlobProperties(), sourceAuth, options.getCopySourceTagsMode(), - options.getSourceShareTokenIntent(), sourceCpkKey, sourceCpkKeySha256, sourceCpkAlgorithm, - options.getHeaders(), getCustomerProvidedKey(), encryptionScope, context) - .map(rb -> { - BlockBlobsPutBlobFromUrlHeaders hd = rb.getDeserializedHeaders(); + BlobHttpHeaders fromUrlHeaders = options.getHeaders() == null ? new BlobHttpHeaders() : options.getHeaders(); + CpkInfo fromUrlCpk = getCustomerProvidedKey(); + + return this.blockBlobClientInternal.uploadBlobFromUrlWithResponse(options.getSourceUrl(), null, null, null, + fromUrlHeaders.getContentType(), fromUrlHeaders.getContentEncoding(), fromUrlHeaders.getContentLanguage(), + fromUrlHeaders.getContentMd5(), fromUrlHeaders.getCacheControl(), destinationRequestConditions.getLeaseId(), + fromUrlHeaders.getContentDisposition(), fromUrlCpk == null ? null : fromUrlCpk.getEncryptionKey(), + fromUrlCpk == null ? null : fromUrlCpk.getEncryptionKeySha256(), + fromUrlCpk == null ? null : fromUrlCpk.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), options.getTier(), + destinationRequestConditions.getTagsConditions(), sourceRequestConditions.getIfModifiedSince(), + sourceRequestConditions.getIfUnmodifiedSince(), sourceRequestConditions.getIfMatch(), + sourceRequestConditions.getIfNoneMatch(), sourceRequestConditions.getTagsConditions(), + options.getContentMd5(), ModelHelper.tagsToString(options.getTags()), options.isCopySourceBlobProperties(), + sourceAuth, ModelHelper.toCopySourceTags(options.getCopySourceTagsMode()), + options.getSourceShareTokenIntent(), sourceCpkKey, sourceCpkKeySha256, sourceCpkAlgorithm, + destinationRequestConditions, blockBlobRequestOptions(context)).map(rb -> { + BlockBlobsUploadBlobFromUrlHeaders hd = rb.getDeserializedHeaders(); BlockBlobItem item = BlockBlobItemConstructorProxy.create(hd.getETag(), hd.getLastModified(), - hd.getContentMD5(), hd.isXMsRequestServerEncrypted(), hd.getXMsEncryptionKeySha256(), - hd.getXMsEncryptionScope(), hd.getXMsVersionId(), hd.getXMsContentCrc64()); + hd.getContentMd5(), hd.isServerEncrypted(), hd.getEncryptionKeySha256(), hd.getEncryptionScope(), + hd.getVersionId(), hd.getContentCrc64()); return new SimpleResponse<>(rb, item); }); } @@ -766,10 +787,17 @@ Mono> stageBlockWithResponseInternal(BlockBlobStageBlockOptions o context = ContentValidationModeResolver.addContentValidationMode(context, options.getContentValidationAlgorithm(), options.getData().getLength(), false); - return this.azureBlobStorage.getBlockBlobs() - .stageBlockNoCustomHeadersWithResponseAsync(containerName, blobName, options.getBase64BlockId(), - options.getData().getLength(), options.getData(), options.getContentMd5(), null, null, - options.getLeaseId(), null, null, null, getCustomerProvidedKey(), encryptionScope, context); + CpkInfo stageCpk = getCustomerProvidedKey(); + + return this.blockBlobClientInternal + .stageBlockWithResponse(options.getBase64BlockId(), options.getData().getLength(), options.getData(), + options.getContentMd5(), null, null, options.getLeaseId(), + stageCpk == null ? null : stageCpk.getEncryptionKey(), + stageCpk == null ? null : stageCpk.getEncryptionKeySha256(), + stageCpk == null ? null : stageCpk.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), null, null, + blockBlobRequestOptions(context)) + .map(rb -> (Response) rb); } @@ -901,14 +929,20 @@ Mono> stageBlockFromUrlWithResponse(BlockBlobStageBlockFromUrlOpt EncryptionAlgorithmType sourceCpkAlgorithm = sourceCustomerProvidedKey != null ? sourceCustomerProvidedKey.getEncryptionAlgorithm() : null; - return this.azureBlobStorage.getBlockBlobs() - .stageBlockFromURLNoCustomHeadersWithResponseAsync(containerName, blobName, options.getBase64BlockId(), 0, - options.getSourceUrl(), sourceRange.toHeaderValue(), options.getSourceContentMd5(), null, null, - options.getLeaseId(), sourceRequestConditions.getIfModifiedSince(), - sourceRequestConditions.getIfUnmodifiedSince(), sourceRequestConditions.getIfMatch(), - sourceRequestConditions.getIfNoneMatch(), null, sourceAuth, options.getSourceShareTokenIntent(), - sourceCpkKey, sourceCpkKeySha256, sourceCpkAlgorithm, getCustomerProvidedKey(), encryptionScope, - context); + CpkInfo stageUrlCpk = getCustomerProvidedKey(); + + return this.blockBlobClientInternal + .stageBlockFromUrlWithResponse(options.getBase64BlockId(), 0, options.getSourceUrl(), + sourceRange.toHeaderValue(), options.getSourceContentMd5(), null, null, + stageUrlCpk == null ? null : stageUrlCpk.getEncryptionKey(), + stageUrlCpk == null ? null : stageUrlCpk.getEncryptionKeySha256(), + stageUrlCpk == null ? null : stageUrlCpk.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), options.getLeaseId(), + sourceRequestConditions.getIfModifiedSince(), sourceRequestConditions.getIfUnmodifiedSince(), + sourceRequestConditions.getIfMatch(), sourceRequestConditions.getIfNoneMatch(), sourceAuth, + options.getSourceShareTokenIntent(), sourceCpkKey, sourceCpkKeySha256, sourceCpkAlgorithm, + blockBlobRequestOptions(context)) + .map(rb -> (Response) rb); } /** @@ -1009,9 +1043,9 @@ public Mono> listBlocksWithResponse(BlockBlobListBlocksOptio Mono> listBlocksWithResponse(BlockBlobListBlocksOptions options, Context context) { StorageImplUtils.assertNotNull("options", options); - return this.azureBlobStorage.getBlockBlobs() - .getBlockListWithResponseAsync(containerName, blobName, options.getType(), getSnapshotId(), null, - options.getLeaseId(), options.getIfTagsMatch(), null, context) + return this.blockBlobClientInternal + .getBlockListWithResponse(options.getType(), getSnapshotId(), null, options.getLeaseId(), + options.getIfTagsMatch(), blockBlobRequestOptions(context)) .map(response -> new SimpleResponse<>(response, response.getValue())); } @@ -1172,20 +1206,27 @@ Mono> commitBlockListWithResponse(BlockBlobCommitBlockLi BlobImmutabilityPolicy immutabilityPolicy = options.getImmutabilityPolicy() == null ? new BlobImmutabilityPolicy() : options.getImmutabilityPolicy(); - return this.azureBlobStorage.getBlockBlobs() - .commitBlockListWithResponseAsync(containerName, blobName, - new BlockLookupList().setLatest(options.getBase64BlockIds()), null, null, null, options.getMetadata(), - requestConditions.getLeaseId(), options.getTier(), requestConditions.getIfModifiedSince(), - requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, - ModelHelper.tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), - immutabilityPolicy.getPolicyMode(), options.isLegalHold(), options.getHeaders(), - getCustomerProvidedKey(), encryptionScope, context) + BlobHttpHeaders commitHeaders = options.getHeaders() == null ? new BlobHttpHeaders() : options.getHeaders(); + CpkInfo commitCpk = getCustomerProvidedKey(); + RequestOptions commitRequestOptions = blockBlobRequestOptions(context); + + return this.blockBlobClientInternal + .commitBlockListWithResponse(new BlockLookupList().setLatest(options.getBase64BlockIds()), null, + commitHeaders.getCacheControl(), commitHeaders.getContentType(), commitHeaders.getContentEncoding(), + commitHeaders.getContentLanguage(), commitHeaders.getContentMd5(), null, null, options.getMetadata(), + requestConditions.getLeaseId(), commitHeaders.getContentDisposition(), + commitCpk == null ? null : commitCpk.getEncryptionKey(), + commitCpk == null ? null : commitCpk.getEncryptionKeySha256(), + commitCpk == null ? null : commitCpk.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), options.getTier(), + requestConditions.getTagsConditions(), ModelHelper.tagsToString(options.getTags()), + immutabilityPolicy.getExpiryTime(), immutabilityPolicy.getPolicyMode(), options.isLegalHold(), + requestConditions, commitRequestOptions) .map(rb -> { BlockBlobsCommitBlockListHeaders hd = rb.getDeserializedHeaders(); BlockBlobItem item = BlockBlobItemConstructorProxy.create(hd.getETag(), hd.getLastModified(), - hd.getContentMD5(), hd.isXMsRequestServerEncrypted(), hd.getXMsEncryptionKeySha256(), - hd.getXMsEncryptionScope(), hd.getXMsVersionId(), hd.getXMsContentCrc64()); + hd.getContentMd5(), hd.isServerEncrypted(), hd.getEncryptionKeySha256(), hd.getEncryptionScope(), + hd.getVersionId(), hd.getContentCrc64()); return new SimpleResponse<>(rb, item); }); } 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 1bc8674331527..b92fb12d16f7a 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 @@ -23,6 +23,9 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.storage.blob.BlobAsyncClient; import com.azure.storage.blob.BlobServiceVersion; +import com.azure.core.http.rest.RequestOptions; +import com.azure.storage.blob.implementation.PageBlobAsyncClientInternal; +import com.azure.storage.blob.implementation.util.RequestOptionsHelper; import com.azure.storage.blob.implementation.accesshelpers.PageBlobItemConstructorProxy; import com.azure.storage.blob.implementation.models.EncryptionScope; import com.azure.storage.blob.implementation.models.PageBlobsClearPagesHeaders; @@ -30,8 +33,8 @@ 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.PageBlobsUploadPagesFromURLHeaders; +import com.azure.storage.blob.implementation.models.PageBlobsSetSequenceNumberHeaders; +import com.azure.storage.blob.implementation.models.PageBlobsUploadPagesFromUrlHeaders; import com.azure.storage.blob.implementation.models.PageBlobsUploadPagesHeaders; import com.azure.storage.blob.implementation.models.PageListHelper; import com.azure.storage.blob.implementation.util.BlobConstants; @@ -131,6 +134,14 @@ public final class PageBlobAsyncClient extends BlobAsyncClientBase { EncryptionScope encryptionScope, String versionId) { super(pipeline, url, serviceVersion, accountName, containerName, blobName, snapshot, customerProvidedKey, encryptionScope, versionId); + this.pageBlobClientInternal = new PageBlobAsyncClientInternal(this.azureBlobStorage.getPageBlobs()); + } + + private final PageBlobAsyncClientInternal pageBlobClientInternal; + + private RequestOptions pageBlobRequestOptions(Context context) { + return RequestOptionsHelper.blobRequestOptions(context, this.azureBlobStorage.getUrl(), getContainerName(), + getBlobName()); } /** @@ -328,19 +339,25 @@ Mono> createWithResponse(PageBlobCreateOptions options, C BlobImmutabilityPolicy immutabilityPolicy = options.getImmutabilityPolicy() == null ? new BlobImmutabilityPolicy() : options.getImmutabilityPolicy(); - return this.azureBlobStorage.getPageBlobs() - .createWithResponseAsync(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, context) + BlobHttpHeaders headers = options.getHeaders() == null ? new BlobHttpHeaders() : options.getHeaders(); + CpkInfo cpk = getCustomerProvidedKey(); + RequestOptions requestOptions = pageBlobRequestOptions(context); + + return this.pageBlobClientInternal + .createWithResponse(options.getSize(), options.getMetadata(), null, null, headers.getContentType(), + headers.getContentEncoding(), headers.getContentLanguage(), headers.getContentMd5(), + headers.getCacheControl(), requestConditions.getLeaseId(), headers.getContentDisposition(), + cpk == null ? null : cpk.getEncryptionKey(), cpk == null ? null : cpk.getEncryptionKeySha256(), + cpk == null ? null : cpk.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), + requestConditions.getTagsConditions(), options.getSequenceNumber(), + ModelHelper.tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), + immutabilityPolicy.getPolicyMode(), options.isLegalHold(), requestConditions, requestOptions) .map(rb -> { PageBlobsCreateHeaders hd = rb.getDeserializedHeaders(); - PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), - hd.isXMsRequestServerEncrypted(), hd.getXMsEncryptionKeySha256(), hd.getXMsEncryptionScope(), null, - hd.getXMsVersionId()); + PageBlobItem item + = new PageBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMd5(), hd.isServerEncrypted(), + hd.getEncryptionKeySha256(), hd.getEncryptionScope(), null, hd.getVersionId()); return new SimpleResponse<>(rb, item); }); } @@ -574,20 +591,22 @@ Mono> uploadPagesWithResponseInternal(PageBlobUploadPages context = ContentValidationModeResolver.addContentValidationMode(context == null ? Context.NONE : context, options.getContentValidationAlgorithm(), length, false); - return this.azureBlobStorage.getPageBlobs() - .uploadPagesWithResponseAsync(containerName, blobName, length, body, options.getContentMd5(), null, null, - pageRangeStr, pageBlobRequestConditions.getLeaseId(), + CpkInfo cpk = getCustomerProvidedKey(); + + return this.pageBlobClientInternal + .uploadPagesWithResponse(length, pageRangeStr, body, options.getContentMd5(), null, null, + pageBlobRequestConditions.getLeaseId(), cpk == null ? null : cpk.getEncryptionKey(), + cpk == null ? null : cpk.getEncryptionKeySha256(), cpk == null ? null : cpk.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), pageBlobRequestConditions.getIfSequenceNumberLessThanOrEqualTo(), pageBlobRequestConditions.getIfSequenceNumberLessThan(), - pageBlobRequestConditions.getIfSequenceNumberEqualTo(), pageBlobRequestConditions.getIfModifiedSince(), - pageBlobRequestConditions.getIfUnmodifiedSince(), pageBlobRequestConditions.getIfMatch(), - pageBlobRequestConditions.getIfNoneMatch(), pageBlobRequestConditions.getTagsConditions(), null, null, - null, getCustomerProvidedKey(), encryptionScope, context) + pageBlobRequestConditions.getIfSequenceNumberEqualTo(), pageBlobRequestConditions.getTagsConditions(), + null, null, pageBlobRequestConditions, pageBlobRequestOptions(context)) .map(rb -> { PageBlobsUploadPagesHeaders hd = rb.getDeserializedHeaders(); PageBlobItem item = PageBlobItemConstructorProxy.create(hd.getETag(), hd.getLastModified(), - hd.getContentMD5(), hd.isXMsRequestServerEncrypted(), hd.getXMsEncryptionKeySha256(), - hd.getXMsEncryptionScope(), hd.getXMsBlobSequenceNumber(), null, hd.getXMsContentCrc64()); + hd.getContentMd5(), hd.isServerEncrypted(), hd.getEncryptionKeySha256(), hd.getEncryptionScope(), + hd.getBlobSequenceNumber(), null, hd.getContentCrc64()); return new SimpleResponse<>(rb, item); }); } @@ -779,23 +798,24 @@ Mono> uploadPagesFromUrlWithResponse(PageBlobUploadPagesF EncryptionAlgorithmType sourceCpkAlgorithm = sourceCustomerProvidedKey != null ? sourceCustomerProvidedKey.getEncryptionAlgorithm() : null; - return this.azureBlobStorage.getPageBlobs() - .uploadPagesFromURLWithResponseAsync(containerName, blobName, options.getSourceUrl(), sourceRangeString, 0, - rangeString, options.getSourceContentMd5(), null, null, destRequestConditions.getLeaseId(), - destRequestConditions.getIfSequenceNumberLessThanOrEqualTo(), + CpkInfo cpk = getCustomerProvidedKey(); + + return this.pageBlobClientInternal + .uploadPagesFromUrlWithResponse(options.getSourceUrl(), sourceRangeString, 0, rangeString, + options.getSourceContentMd5(), null, null, cpk == null ? null : cpk.getEncryptionKey(), + cpk == null ? null : cpk.getEncryptionKeySha256(), cpk == null ? null : cpk.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), + destRequestConditions.getLeaseId(), destRequestConditions.getIfSequenceNumberLessThanOrEqualTo(), destRequestConditions.getIfSequenceNumberLessThan(), destRequestConditions.getIfSequenceNumberEqualTo(), - destRequestConditions.getIfModifiedSince(), destRequestConditions.getIfUnmodifiedSince(), - destRequestConditions.getIfMatch(), destRequestConditions.getIfNoneMatch(), destRequestConditions.getTagsConditions(), sourceRequestConditions.getIfModifiedSince(), sourceRequestConditions.getIfUnmodifiedSince(), sourceRequestConditions.getIfMatch(), - sourceRequestConditions.getIfNoneMatch(), null, sourceAuth, options.getSourceShareTokenIntent(), - sourceCpkKey, sourceCpkKeySha256, sourceCpkAlgorithm, getCustomerProvidedKey(), encryptionScope, - context) + sourceRequestConditions.getIfNoneMatch(), sourceAuth, options.getSourceShareTokenIntent(), sourceCpkKey, + sourceCpkKeySha256, sourceCpkAlgorithm, destRequestConditions, pageBlobRequestOptions(context)) .map(rb -> { - PageBlobsUploadPagesFromURLHeaders hd = rb.getDeserializedHeaders(); + PageBlobsUploadPagesFromUrlHeaders hd = rb.getDeserializedHeaders(); PageBlobItem item = PageBlobItemConstructorProxy.create(hd.getETag(), hd.getLastModified(), - hd.getContentMD5(), hd.isXMsRequestServerEncrypted(), hd.getXMsEncryptionKeySha256(), - hd.getXMsEncryptionScope(), hd.getXMsBlobSequenceNumber(), null, hd.getXMsContentCrc64()); + hd.getContentMd5(), hd.isServerEncrypted(), hd.getEncryptionKeySha256(), hd.getEncryptionScope(), + hd.getBlobSequenceNumber(), null, hd.getContentCrc64()); return new SimpleResponse<>(rb, item); }); } @@ -877,20 +897,22 @@ Mono> clearPagesWithResponse(PageRange pageRange, String pageRangeStr = ModelHelper.pageRangeToString(pageRange); context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getPageBlobs() - .clearPagesWithResponseAsync(containerName, blobName, 0, null, pageRangeStr, - pageBlobRequestConditions.getLeaseId(), + CpkInfo cpk = getCustomerProvidedKey(); + + return this.pageBlobClientInternal + .clearPagesWithResponse(pageRangeStr, null, pageBlobRequestConditions.getLeaseId(), + cpk == null ? null : cpk.getEncryptionKey(), cpk == null ? null : cpk.getEncryptionKeySha256(), + cpk == null ? null : cpk.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), pageBlobRequestConditions.getIfSequenceNumberLessThanOrEqualTo(), pageBlobRequestConditions.getIfSequenceNumberLessThan(), - pageBlobRequestConditions.getIfSequenceNumberEqualTo(), pageBlobRequestConditions.getIfModifiedSince(), - pageBlobRequestConditions.getIfUnmodifiedSince(), pageBlobRequestConditions.getIfMatch(), - pageBlobRequestConditions.getIfNoneMatch(), pageBlobRequestConditions.getTagsConditions(), null, - getCustomerProvidedKey(), encryptionScope, context) + pageBlobRequestConditions.getIfSequenceNumberEqualTo(), pageBlobRequestConditions.getTagsConditions(), + pageBlobRequestConditions, pageBlobRequestOptions(context)) .map(rb -> { PageBlobsClearPagesHeaders hd = rb.getDeserializedHeaders(); - PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), - hd.isXMsRequestServerEncrypted(), hd.getXMsEncryptionKeySha256(), null, - hd.getXMsBlobSequenceNumber()); + PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMd5(), + ModelHelper.isServerEncrypted(rb.getHeaders()), ModelHelper.getEncryptionKeySha256(rb.getHeaders()), + null, hd.getBlobSequenceNumber()); return new SimpleResponse<>(rb, item); }); } @@ -968,11 +990,9 @@ Mono> getPageRangesWithResponse(BlobRange blobRange, BlobRequ requestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getPageBlobs() - .getPageRangesWithResponseAsync(containerName, blobName, getSnapshotId(), null, blobRange.toHeaderValue(), - requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), - requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), null, null, null, context) + return this.pageBlobClientInternal + .getPageRangesWithResponse(getSnapshotId(), null, blobRange.toHeaderValue(), requestConditions.getLeaseId(), + requestConditions.getTagsConditions(), null, null, requestConditions, pageBlobRequestOptions(context)) .map(response -> new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), response.getValue())); } @@ -1075,14 +1095,10 @@ private Mono> getPageRange = options.getRequestConditions() == null ? new BlobRequestConditions() : options.getRequestConditions(); context = context == null ? Context.NONE : context; - return StorageImplUtils.applyOptionalTimeout( - this.azureBlobStorage.getPageBlobs() - .getPageRangesWithResponseAsync(containerName, blobName, getSnapshotId(), null, - options.getRange().toHeaderValue(), requestConditions.getLeaseId(), - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, marker, options.getMaxResultsPerPage(), context), - timeout); + return StorageImplUtils.applyOptionalTimeout(this.pageBlobClientInternal.getPageRangesWithResponse( + getSnapshotId(), null, options.getRange().toHeaderValue(), requestConditions.getLeaseId(), + requestConditions.getTagsConditions(), marker, options.getMaxResultsPerPage(), requestConditions, + pageBlobRequestOptions(context)), timeout); } private static PageRangeItem toPageBlobRange(PageRange range) { @@ -1336,12 +1352,10 @@ Mono> getPageRangesDiffWithResponse(BlobRange blobRange, Stri } context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getPageBlobs() - .getPageRangesDiffWithResponseAsync(containerName, blobName, getSnapshotId(), null, prevSnapshot, - prevSnapshotUrl, blobRange.toHeaderValue(), requestConditions.getLeaseId(), - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, null, null, context) + return this.pageBlobClientInternal + .getPageRangesDiffWithResponse(getSnapshotId(), null, prevSnapshot, prevSnapshotUrl, + blobRange.toHeaderValue(), requestConditions.getLeaseId(), requestConditions.getTagsConditions(), null, + null, requestConditions, pageBlobRequestOptions(context)) .map(response -> new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), response.getValue())); } @@ -1392,13 +1406,10 @@ private Mono> getPageR = options.getRequestConditions() == null ? new BlobRequestConditions() : options.getRequestConditions(); context = context == null ? Context.NONE : context; - return StorageImplUtils.applyOptionalTimeout(this.azureBlobStorage.getPageBlobs() - .getPageRangesDiffWithResponseAsync(containerName, blobName, getSnapshotId(), null, - options.getPreviousSnapshot(), null, options.getRange().toHeaderValue(), requestConditions.getLeaseId(), - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, marker, options.getMaxResultsPerPage(), context), - timeout); + return StorageImplUtils.applyOptionalTimeout(this.pageBlobClientInternal.getPageRangesDiffWithResponse( + getSnapshotId(), null, options.getPreviousSnapshot(), null, options.getRange().toHeaderValue(), + requestConditions.getLeaseId(), requestConditions.getTagsConditions(), marker, + options.getMaxResultsPerPage(), requestConditions, pageBlobRequestOptions(context)), timeout); } /** @@ -1467,15 +1478,17 @@ Mono> resizeWithResponse(long size, BlobRequestConditions requestConditions = requestConditions == null ? new BlobRequestConditions() : requestConditions; context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getPageBlobs() - .resizeWithResponseAsync(containerName, blobName, size, null, requestConditions.getLeaseId(), - requestConditions.getIfModifiedSince(), requestConditions.getIfUnmodifiedSince(), - requestConditions.getIfMatch(), requestConditions.getIfNoneMatch(), - requestConditions.getTagsConditions(), null, getCustomerProvidedKey(), encryptionScope, context) + CpkInfo cpk = getCustomerProvidedKey(); + + return this.pageBlobClientInternal + .resizeWithResponse(size, null, requestConditions.getLeaseId(), cpk == null ? null : cpk.getEncryptionKey(), + cpk == null ? null : cpk.getEncryptionKeySha256(), cpk == null ? null : cpk.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), + requestConditions.getTagsConditions(), requestConditions, pageBlobRequestOptions(context)) .map(rb -> { PageBlobsResizeHeaders hd = rb.getDeserializedHeaders(); PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), null, null, null, null, - hd.getXMsBlobSequenceNumber()); + hd.getBlobSequenceNumber()); return new SimpleResponse<>(rb, item); }); } @@ -1553,16 +1566,12 @@ Mono> updateSequenceNumberWithResponse(SequenceNumberActi sequenceNumber = action == SequenceNumberActionType.INCREMENT ? null : sequenceNumber; context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getPageBlobs() - .updateSequenceNumberWithResponseAsync(containerName, blobName, action, null, - requestConditions.getLeaseId(), requestConditions.getIfModifiedSince(), - requestConditions.getIfUnmodifiedSince(), requestConditions.getIfMatch(), - requestConditions.getIfNoneMatch(), requestConditions.getTagsConditions(), sequenceNumber, null, - context) + return this.pageBlobClientInternal.setSequenceNumberWithResponse(action, null, requestConditions.getLeaseId(), + requestConditions.getTagsConditions(), sequenceNumber, requestConditions, pageBlobRequestOptions(context)) .map(rb -> { - PageBlobsUpdateSequenceNumberHeaders hd = rb.getDeserializedHeaders(); + PageBlobsSetSequenceNumberHeaders hd = rb.getDeserializedHeaders(); PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), null, null, null, null, - hd.getXMsBlobSequenceNumber()); + hd.getBlobSequenceNumber()); return new SimpleResponse<>(rb, item); }); } @@ -1747,11 +1756,9 @@ Mono> copyIncrementalWithResponse(PageBlobCopyIncrement } context = context == null ? Context.NONE : context; - return this.azureBlobStorage.getPageBlobs() - .copyIncrementalWithResponseAsync(containerName, blobName, builder.toString(), null, - modifiedRequestConditions.getIfModifiedSince(), modifiedRequestConditions.getIfUnmodifiedSince(), - modifiedRequestConditions.getIfMatch(), modifiedRequestConditions.getIfNoneMatch(), - modifiedRequestConditions.getTagsConditions(), null, context) - .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getXMsCopyStatus())); + return this.pageBlobClientInternal + .copyIncrementalWithResponse(builder.toString(), null, modifiedRequestConditions.getTagsConditions(), + modifiedRequestConditions, pageBlobRequestOptions(context)) + .map(rb -> new SimpleResponse<>(rb, rb.getDeserializedHeaders().getCopyStatus())); } } 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 9abdab18bc514..64b31d429074c 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 @@ -14,6 +14,7 @@ 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.RequestOptions; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.ResponseBase; import com.azure.core.http.rest.SimpleResponse; @@ -26,15 +27,17 @@ 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.PageBlobClientInternal; 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.PageBlobsSetSequenceNumberHeaders; import com.azure.storage.blob.implementation.models.PageListHelper; import com.azure.storage.blob.implementation.util.BlobConstants; import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.BlobErrorCode; +import com.azure.storage.blob.implementation.util.RequestOptionsHelper; import com.azure.storage.blob.models.BlobHttpHeaders; import com.azure.storage.blob.models.BlobImmutabilityPolicy; import com.azure.storage.blob.models.BlobRange; @@ -94,6 +97,13 @@ public final class PageBlobClient extends BlobClientBase { private static final ClientLogger LOGGER = new ClientLogger(PageBlobClient.class); private final PageBlobAsyncClient pageBlobAsyncClient; + private final PageBlobClientInternal pageBlobClientInternal; + + private RequestOptions pageBlobRequestOptions(Context context) { + return RequestOptionsHelper.blobRequestOptions(context, this.azureBlobStorage.getUrl(), getContainerName(), + getBlobName()); + } + /** * Indicates the number of bytes in a page. */ @@ -140,6 +150,7 @@ public final class PageBlobClient extends BlobClientBase { super(pageBlobAsyncClient, pipeline, url, serviceVersion, accountName, containerName, blobName, snapshot, customerProvidedKey, encryptionScope, versionId); this.pageBlobAsyncClient = pageBlobAsyncClient; + this.pageBlobClientInternal = new PageBlobClientInternal(this.azureBlobStorage.getPageBlobs()); } /** @@ -379,21 +390,26 @@ public Response createWithResponse(PageBlobCreateOptions options, 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); + BlobHttpHeaders headers = options.getHeaders() == null ? new BlobHttpHeaders() : options.getHeaders(); + CpkInfo cpk = getCustomerProvidedKey(); + RequestOptions createOptions = pageBlobRequestOptions(finalContext); + + Callable> operation + = () -> this.pageBlobClientInternal.createWithResponse(options.getSize(), options.getMetadata(), null, null, + headers.getContentType(), headers.getContentEncoding(), headers.getContentLanguage(), + headers.getContentMd5(), headers.getCacheControl(), requestConditions.getLeaseId(), + headers.getContentDisposition(), cpk == null ? null : cpk.getEncryptionKey(), + cpk == null ? null : cpk.getEncryptionKeySha256(), cpk == null ? null : cpk.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), + requestConditions.getTagsConditions(), options.getSequenceNumber(), + ModelHelper.tagsToString(options.getTags()), immutabilityPolicy.getExpiryTime(), + immutabilityPolicy.getPolicyMode(), options.isLegalHold(), requestConditions, createOptions); 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()); + PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMd5(), + hd.isServerEncrypted(), hd.getEncryptionKeySha256(), hd.getEncryptionScope(), null, hd.getVersionId()); return new SimpleResponse<>(response, item); } @@ -817,21 +833,24 @@ 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(), + CpkInfo clearCpk = getCustomerProvidedKey(); + Callable> operation + = () -> this.pageBlobClientInternal.clearPagesWithResponse(pageRangeStr, null, + finalPageBlobRequestConditions.getLeaseId(), clearCpk == null ? null : clearCpk.getEncryptionKey(), + clearCpk == null ? null : clearCpk.getEncryptionKeySha256(), + clearCpk == null ? null : clearCpk.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), finalPageBlobRequestConditions.getIfSequenceNumberLessThanOrEqualTo(), finalPageBlobRequestConditions.getIfSequenceNumberLessThan(), finalPageBlobRequestConditions.getIfSequenceNumberEqualTo(), - finalPageBlobRequestConditions.getIfModifiedSince(), - finalPageBlobRequestConditions.getIfUnmodifiedSince(), finalPageBlobRequestConditions.getIfMatch(), - finalPageBlobRequestConditions.getIfNoneMatch(), finalPageBlobRequestConditions.getTagsConditions(), - null, getCustomerProvidedKey(), encryptionScope, finalContext); + finalPageBlobRequestConditions.getTagsConditions(), finalPageBlobRequestConditions, + pageBlobRequestOptions(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()); + PageBlobItem item = new PageBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMd5(), + ModelHelper.isServerEncrypted(response.getHeaders()), + ModelHelper.getEncryptionKeySha256(response.getHeaders()), null, hd.getBlobSequenceNumber()); return new SimpleResponse<>(response, item); } @@ -902,12 +921,10 @@ public Response getPageRangesWithResponse(BlobRange blobRange, BlobReq 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); + = () -> this.pageBlobClientInternal.getPageRangesWithResponse(getSnapshotId(), null, + finalBlobRange.toHeaderValue(), finalRequestConditions.getLeaseId(), + finalRequestConditions.getTagsConditions(), null, null, finalRequestConditions, + pageBlobRequestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), @@ -986,12 +1003,10 @@ public PagedIterable listPageRanges(ListPageRangesOptions options // 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, finalPageSize, finalContext); + = () -> this.pageBlobClientInternal.getPageRangesWithResponse(getSnapshotId(), null, + options.getRange().toHeaderValue(), requestConditions.getLeaseId(), + requestConditions.getTagsConditions(), continuationToken, finalPageSize, requestConditions, + pageBlobRequestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); @@ -1103,12 +1118,10 @@ 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); + = () -> this.pageBlobClientInternal.getPageRangesDiffWithResponse(getSnapshotId(), null, prevSnapshot, null, + finalBlobRange.toHeaderValue(), finalRequestConditions.getLeaseId(), + finalRequestConditions.getTagsConditions(), null, null, finalRequestConditions, + pageBlobRequestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), @@ -1194,13 +1207,10 @@ public PagedIterable listPageRangesDiff(ListPageRangesDiffOptions 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); + = () -> this.pageBlobClientInternal.getPageRangesDiffWithResponse(getSnapshotId(), null, + options.getPreviousSnapshot(), null, options.getRange().toHeaderValue(), + requestConditions.getLeaseId(), requestConditions.getTagsConditions(), continuationToken, + finalPageSize, requestConditions, pageBlobRequestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); @@ -1299,12 +1309,10 @@ 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); + = () -> this.pageBlobClientInternal.getPageRangesDiffWithResponse(getSnapshotId(), null, null, + prevSnapshotUrl, finalBlobRange.toHeaderValue(), finalRequestConditions.getLeaseId(), + finalRequestConditions.getTagsConditions(), null, null, finalRequestConditions, + pageBlobRequestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); return new SimpleResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), @@ -1370,18 +1378,21 @@ public Response resizeWithResponse(long size, BlobRequestCondition = 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); + CpkInfo resizeCpk = getCustomerProvidedKey(); + Callable> operation + = () -> this.pageBlobClientInternal.resizeWithResponse(size, null, finalRequestConditions.getLeaseId(), + resizeCpk == null ? null : resizeCpk.getEncryptionKey(), + resizeCpk == null ? null : resizeCpk.getEncryptionKeySha256(), + resizeCpk == null ? null : resizeCpk.getEncryptionAlgorithm(), + encryptionScope == null ? null : encryptionScope.getEncryptionScope(), + finalRequestConditions.getTagsConditions(), finalRequestConditions, + pageBlobRequestOptions(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()); + PageBlobItem item + = new PageBlobItem(hd.getETag(), hd.getLastModified(), null, null, null, null, hd.getBlobSequenceNumber()); return new SimpleResponse<>(response, item); } @@ -1449,19 +1460,16 @@ public Response updateSequenceNumberWithResponse(SequenceNumberAct 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); + Callable> operation + = () -> this.pageBlobClientInternal.setSequenceNumberWithResponse(action, null, + finalRequestConditions.getLeaseId(), finalRequestConditions.getTagsConditions(), finalSequenceNumber, + finalRequestConditions, pageBlobRequestOptions(finalContext)); - ResponseBase response + 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()); + PageBlobsSetSequenceNumberHeaders hd = response.getDeserializedHeaders(); + PageBlobItem item + = new PageBlobItem(hd.getETag(), hd.getLastModified(), null, null, null, null, hd.getBlobSequenceNumber()); return new SimpleResponse<>(response, item); } @@ -1630,13 +1638,11 @@ public Response copyIncrementalWithResponse(PageBlobCopyIncremen 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); + = () -> this.pageBlobClientInternal.copyIncrementalWithResponse(builder.toString(), null, + modifiedRequestConditions.getTagsConditions(), modifiedRequestConditions, + pageBlobRequestOptions(finalContext)); ResponseBase response = sendRequest(operation, timeout, BlobStorageException.class); - return new SimpleResponse<>(response, response.getDeserializedHeaders().getXMsCopyStatus()); + return new SimpleResponse<>(response, response.getDeserializedHeaders().getCopyStatus()); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/ReliableDownload.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/ReliableDownload.java index 884b49b22af28..de94deb496deb 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/ReliableDownload.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/ReliableDownload.java @@ -59,8 +59,8 @@ final class ReliableDownload { from the response for better book-keeping towards the end. */ if (this.info.getCount() == null) { - long blobLength = ModelHelper.getBlobLength(ModelHelper.populateBlobDownloadHeaders(deserializedHeaders, - ModelHelper.getErrorCode(rawResponse.getHeaders()))); + long blobLength = ModelHelper + .getBlobLength(ModelHelper.populateBlobDownloadHeaders(deserializedHeaders, rawResponse.getHeaders())); info.setCount(blobLength - info.getOffset()); } } @@ -78,8 +78,7 @@ HttpHeaders getHeaders() { } BlobDownloadHeaders getDeserializedHeaders() { - return ModelHelper.populateBlobDownloadHeaders(deserializedHeaders, - ModelHelper.getErrorCode(rawResponse.getHeaders())); + return ModelHelper.populateBlobDownloadHeaders(deserializedHeaders, rawResponse.getHeaders()); } Flux getValue() { 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 4d17513229ac2..a060d43bdf3a8 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 @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.storage.blob { + requires transitive com.azure.core; requires transitive com.azure.storage.common; - requires com.azure.storage.internal.avro; exports com.azure.storage.blob; @@ -11,21 +12,16 @@ exports com.azure.storage.blob.options; exports com.azure.storage.blob.sas; exports com.azure.storage.blob.specialized; - - // Blob batch needs to interact with the generated layer but shouldn't replicate it. exports com.azure.storage.blob.implementation - to com.azure.storage.blob.cryptography, com.azure.storage.blob.batch, com.azure.storage.file.datalake; // FIXME this should not be a long-term solution - + to com.azure.storage.blob.cryptography, com.azure.storage.blob.batch, com.azure.storage.file.datalake; exports com.azure.storage.blob.implementation.accesshelpers to com.azure.storage.file.datalake; - exports com.azure.storage.blob.implementation.models to com.azure.storage.blob.batch, com.azure.storage.blob.cryptography; - exports com.azure.storage.blob.implementation.util to com.azure.storage.blob.cryptography, com.azure.storage.file.datalake, com.azure.storage.blob.changefeed, com.azure.core, com.azure.storage.blob.batch, com.azure.storage.blob.nio; 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; + opens com.azure.storage.blob.implementation to com.azure.core; } diff --git a/sdk/storage/azure-storage-blob/src/main/resources/META-INF/azure-storage-blob_metadata.json b/sdk/storage/azure-storage-blob/src/main/resources/META-INF/azure-storage-blob_metadata.json new file mode 100644 index 0000000000000..a16076568b70f --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/main/resources/META-INF/azure-storage-blob_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersions":{"Storage.Blob":"2027-03-07"},"crossLanguagePackageId":"Storage.Blob","crossLanguageVersion":"6ff0211f06c6","crossLanguageDefinitions":{"com.azure.storage.blob.AppendBlobAsyncClient":"Storage.Blob.AppendBlob","com.azure.storage.blob.AppendBlobAsyncClient.appendBlock":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrl":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrlWithResponse":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrlWithResponseInternal":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockWithResponse":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockWithResponseInternal":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobAsyncClient.create":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobAsyncClient.createWithResponse":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobAsyncClient.createWithResponseInternal":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobAsyncClient.seal":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobAsyncClient.sealWithResponse":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobAsyncClient.sealWithResponseInternal":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobClient":"Storage.Blob.AppendBlob","com.azure.storage.blob.AppendBlobClient.appendBlock":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobClient.appendBlockFromUrl":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobClient.appendBlockFromUrlWithResponse":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobClient.appendBlockFromUrlWithResponseInternal":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobClient.appendBlockWithResponse":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobClient.appendBlockWithResponseInternal":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobClient.create":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobClient.createWithResponse":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobClient.createWithResponseInternal":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobClient.seal":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobClient.sealWithResponse":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobClient.sealWithResponseInternal":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AzureBlobStorageBuilder":"Storage.Blob","com.azure.storage.blob.BlobAsyncClient":"Storage.Blob.Blob","com.azure.storage.blob.BlobAsyncClient.abortCopyFromUrl":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.abortCopyFromUrlWithResponse":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.abortCopyFromUrlWithResponseInternal":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.acquireLease":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobAsyncClient.acquireLeaseWithResponse":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobAsyncClient.acquireLeaseWithResponseInternal":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobAsyncClient.breakLease":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobAsyncClient.breakLeaseWithResponse":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobAsyncClient.breakLeaseWithResponseInternal":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobAsyncClient.changeLease":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobAsyncClient.changeLeaseWithResponse":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobAsyncClient.changeLeaseWithResponseInternal":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobAsyncClient.copyFromUrl":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobAsyncClient.copyFromUrlWithResponse":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobAsyncClient.copyFromUrlWithResponseInternal":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobAsyncClient.createSnapshot":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobAsyncClient.createSnapshotWithResponse":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobAsyncClient.createSnapshotWithResponseInternal":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobAsyncClient.delete":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobAsyncClient.deleteImmutabilityPolicy":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.deleteImmutabilityPolicyWithResponse":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.deleteImmutabilityPolicyWithResponseInternal":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.deleteWithResponse":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobAsyncClient.deleteWithResponseInternal":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobAsyncClient.download":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobAsyncClient.downloadWithResponse":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobAsyncClient.downloadWithResponseInternal":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobAsyncClient.getAccountInfo":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobAsyncClient.getAccountInfoWithResponse":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobAsyncClient.getAccountInfoWithResponseInternal":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobAsyncClient.getLayout":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobAsyncClient.getLayoutWithResponse":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobAsyncClient.getLayoutWithResponseInternal":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobAsyncClient.getProperties":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobAsyncClient.getPropertiesWithResponse":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobAsyncClient.getPropertiesWithResponseInternal":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobAsyncClient.getTags":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobAsyncClient.getTagsWithResponse":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobAsyncClient.getTagsWithResponseInternal":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobAsyncClient.query":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobAsyncClient.queryWithResponse":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobAsyncClient.queryWithResponseInternal":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobAsyncClient.releaseLease":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobAsyncClient.releaseLeaseWithResponse":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobAsyncClient.releaseLeaseWithResponseInternal":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobAsyncClient.renewLease":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobAsyncClient.renewLeaseWithResponse":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobAsyncClient.renewLeaseWithResponseInternal":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobAsyncClient.setExpiry":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobAsyncClient.setExpiryWithResponse":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobAsyncClient.setExpiryWithResponseInternal":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobAsyncClient.setHttpHeaders":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobAsyncClient.setHttpHeadersWithResponse":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobAsyncClient.setHttpHeadersWithResponseInternal":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobAsyncClient.setImmutabilityPolicy":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.setImmutabilityPolicyWithResponse":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.setImmutabilityPolicyWithResponseInternal":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.setLegalHold":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobAsyncClient.setLegalHoldWithResponse":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobAsyncClient.setLegalHoldWithResponseInternal":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobAsyncClient.setMetadata":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobAsyncClient.setMetadataWithResponse":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobAsyncClient.setMetadataWithResponseInternal":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobAsyncClient.setTags":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobAsyncClient.setTagsWithResponse":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobAsyncClient.setTagsWithResponseInternal":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobAsyncClient.setTier":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobAsyncClient.setTierWithResponse":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobAsyncClient.setTierWithResponseInternal":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobAsyncClient.startCopyFromUrl":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.startCopyFromUrlWithResponse":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.startCopyFromUrlWithResponseInternal":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.undelete":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobAsyncClient.undeleteWithResponse":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobAsyncClient.undeleteWithResponseInternal":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobClient":"Storage.Blob.Blob","com.azure.storage.blob.BlobClient.abortCopyFromUrl":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobClient.abortCopyFromUrlWithResponse":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobClient.abortCopyFromUrlWithResponseInternal":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobClient.acquireLease":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobClient.acquireLeaseWithResponse":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobClient.acquireLeaseWithResponseInternal":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobClient.breakLease":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobClient.breakLeaseWithResponse":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobClient.breakLeaseWithResponseInternal":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobClient.changeLease":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobClient.changeLeaseWithResponse":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobClient.changeLeaseWithResponseInternal":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobClient.copyFromUrl":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobClient.copyFromUrlWithResponse":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobClient.copyFromUrlWithResponseInternal":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobClient.createSnapshot":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobClient.createSnapshotWithResponse":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobClient.createSnapshotWithResponseInternal":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobClient.delete":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobClient.deleteImmutabilityPolicy":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobClient.deleteImmutabilityPolicyWithResponse":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobClient.deleteImmutabilityPolicyWithResponseInternal":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobClient.deleteWithResponse":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobClient.deleteWithResponseInternal":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobClient.download":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobClient.downloadWithResponse":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobClient.downloadWithResponseInternal":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobClient.getAccountInfo":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobClient.getAccountInfoWithResponse":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobClient.getAccountInfoWithResponseInternal":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobClient.getLayout":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobClient.getLayoutWithResponse":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobClient.getLayoutWithResponseInternal":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobClient.getProperties":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobClient.getPropertiesWithResponse":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobClient.getPropertiesWithResponseInternal":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobClient.getTags":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobClient.getTagsWithResponse":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobClient.getTagsWithResponseInternal":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobClient.query":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobClient.queryWithResponse":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobClient.queryWithResponseInternal":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobClient.releaseLease":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobClient.releaseLeaseWithResponse":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobClient.releaseLeaseWithResponseInternal":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobClient.renewLease":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobClient.renewLeaseWithResponse":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobClient.renewLeaseWithResponseInternal":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobClient.setExpiry":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobClient.setExpiryWithResponse":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobClient.setExpiryWithResponseInternal":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobClient.setHttpHeaders":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobClient.setHttpHeadersWithResponse":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobClient.setHttpHeadersWithResponseInternal":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobClient.setImmutabilityPolicy":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobClient.setImmutabilityPolicyWithResponse":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobClient.setImmutabilityPolicyWithResponseInternal":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobClient.setLegalHold":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobClient.setLegalHoldWithResponse":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobClient.setLegalHoldWithResponseInternal":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobClient.setMetadata":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobClient.setMetadataWithResponse":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobClient.setMetadataWithResponseInternal":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobClient.setTags":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobClient.setTagsWithResponse":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobClient.setTagsWithResponseInternal":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobClient.setTier":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobClient.setTierWithResponse":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobClient.setTierWithResponseInternal":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobClient.startCopyFromUrl":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobClient.startCopyFromUrlWithResponse":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobClient.startCopyFromUrlWithResponseInternal":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobClient.undelete":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobClient.undeleteWithResponse":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobClient.undeleteWithResponseInternal":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlockBlobAsyncClient":"Storage.Blob.BlockBlob","com.azure.storage.blob.BlockBlobAsyncClient.commitBlockList":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobAsyncClient.commitBlockListWithResponse":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobAsyncClient.commitBlockListWithResponseInternal":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobAsyncClient.getBlockList":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobAsyncClient.getBlockListWithResponse":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobAsyncClient.getBlockListWithResponseInternal":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobAsyncClient.stageBlock":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromUrl":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromUrlWithResponse":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromUrlWithResponseInternal":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockWithResponse":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockWithResponseInternal":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobAsyncClient.upload":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobAsyncClient.uploadBlobFromUrl":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.uploadBlobFromUrlWithResponse":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.uploadBlobFromUrlWithResponseInternal":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.uploadWithResponse":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobAsyncClient.uploadWithResponseInternal":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobClient":"Storage.Blob.BlockBlob","com.azure.storage.blob.BlockBlobClient.commitBlockList":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobClient.commitBlockListWithResponse":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobClient.commitBlockListWithResponseInternal":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobClient.getBlockList":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobClient.getBlockListWithResponse":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobClient.getBlockListWithResponseInternal":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobClient.stageBlock":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobClient.stageBlockFromUrl":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobClient.stageBlockFromUrlWithResponse":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobClient.stageBlockFromUrlWithResponseInternal":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobClient.stageBlockWithResponse":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobClient.stageBlockWithResponseInternal":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobClient.upload":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobClient.uploadBlobFromUrl":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobClient.uploadBlobFromUrlWithResponse":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobClient.uploadBlobFromUrlWithResponseInternal":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobClient.uploadWithResponse":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobClient.uploadWithResponseInternal":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.ContainerAsyncClient":"Storage.Blob.Container","com.azure.storage.blob.ContainerAsyncClient.acquireLease":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerAsyncClient.acquireLeaseWithResponse":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerAsyncClient.acquireLeaseWithResponseInternal":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerAsyncClient.breakLease":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerAsyncClient.breakLeaseWithResponse":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerAsyncClient.breakLeaseWithResponseInternal":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerAsyncClient.changeLease":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerAsyncClient.changeLeaseWithResponse":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerAsyncClient.changeLeaseWithResponseInternal":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerAsyncClient.create":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerAsyncClient.createSession":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerAsyncClient.createSessionWithResponse":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerAsyncClient.createSessionWithResponseInternal":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerAsyncClient.createWithResponse":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerAsyncClient.createWithResponseInternal":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerAsyncClient.delete":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerAsyncClient.deleteWithResponse":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerAsyncClient.deleteWithResponseInternal":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerAsyncClient.filterBlobs":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerAsyncClient.filterBlobsWithResponse":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerAsyncClient.filterBlobsWithResponseInternal":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerAsyncClient.getAccessPolicy":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.getAccessPolicyWithResponse":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.getAccessPolicyWithResponseInternal":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.getAccountInfo":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerAsyncClient.getAccountInfoWithResponse":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerAsyncClient.getAccountInfoWithResponseInternal":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerAsyncClient.getProperties":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerAsyncClient.getPropertiesWithResponse":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerAsyncClient.getPropertiesWithResponseInternal":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerAsyncClient.listBlobFlatSegment":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerAsyncClient.listBlobFlatSegmentWithResponse":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerAsyncClient.listBlobFlatSegmentWithResponseInternal":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerAsyncClient.listBlobHierarchySegment":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerAsyncClient.listBlobHierarchySegmentWithResponse":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerAsyncClient.listBlobHierarchySegmentWithResponseInternal":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerAsyncClient.releaseLease":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerAsyncClient.releaseLeaseWithResponse":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerAsyncClient.releaseLeaseWithResponseInternal":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerAsyncClient.rename":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerAsyncClient.renameWithResponse":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerAsyncClient.renameWithResponseInternal":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerAsyncClient.renewLease":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerAsyncClient.renewLeaseWithResponse":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerAsyncClient.renewLeaseWithResponseInternal":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerAsyncClient.restore":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerAsyncClient.restoreWithResponse":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerAsyncClient.restoreWithResponseInternal":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerAsyncClient.setAccessPolicy":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.setAccessPolicyWithResponse":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.setAccessPolicyWithResponseInternal":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.setMetadata":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerAsyncClient.setMetadataWithResponse":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerAsyncClient.setMetadataWithResponseInternal":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerClient":"Storage.Blob.Container","com.azure.storage.blob.ContainerClient.acquireLease":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerClient.acquireLeaseWithResponse":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerClient.acquireLeaseWithResponseInternal":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerClient.breakLease":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerClient.breakLeaseWithResponse":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerClient.breakLeaseWithResponseInternal":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerClient.changeLease":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerClient.changeLeaseWithResponse":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerClient.changeLeaseWithResponseInternal":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerClient.create":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerClient.createSession":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerClient.createSessionWithResponse":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerClient.createSessionWithResponseInternal":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerClient.createWithResponse":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerClient.createWithResponseInternal":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerClient.delete":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerClient.deleteWithResponse":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerClient.deleteWithResponseInternal":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerClient.filterBlobs":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerClient.filterBlobsWithResponse":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerClient.filterBlobsWithResponseInternal":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerClient.getAccessPolicy":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerClient.getAccessPolicyWithResponse":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerClient.getAccessPolicyWithResponseInternal":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerClient.getAccountInfo":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerClient.getAccountInfoWithResponse":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerClient.getAccountInfoWithResponseInternal":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerClient.getProperties":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerClient.getPropertiesWithResponse":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerClient.getPropertiesWithResponseInternal":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerClient.listBlobFlatSegment":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerClient.listBlobFlatSegmentWithResponse":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerClient.listBlobFlatSegmentWithResponseInternal":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerClient.listBlobHierarchySegment":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerClient.listBlobHierarchySegmentWithResponse":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerClient.listBlobHierarchySegmentWithResponseInternal":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerClient.releaseLease":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerClient.releaseLeaseWithResponse":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerClient.releaseLeaseWithResponseInternal":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerClient.rename":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerClient.renameWithResponse":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerClient.renameWithResponseInternal":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerClient.renewLease":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerClient.renewLeaseWithResponse":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerClient.renewLeaseWithResponseInternal":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerClient.restore":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerClient.restoreWithResponse":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerClient.restoreWithResponseInternal":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerClient.setAccessPolicy":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerClient.setAccessPolicyWithResponse":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerClient.setAccessPolicyWithResponseInternal":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerClient.setMetadata":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerClient.setMetadataWithResponse":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerClient.setMetadataWithResponseInternal":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.PageBlobAsyncClient":"Storage.Blob.PageBlob","com.azure.storage.blob.PageBlobAsyncClient.clearPages":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobAsyncClient.clearPagesWithResponse":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobAsyncClient.clearPagesWithResponseInternal":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobAsyncClient.copyIncremental":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobAsyncClient.copyIncrementalWithResponse":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobAsyncClient.copyIncrementalWithResponseInternal":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobAsyncClient.create":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobAsyncClient.createWithResponse":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobAsyncClient.createWithResponseInternal":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobAsyncClient.getPageRanges":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiff":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiffWithResponse":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiffWithResponseInternal":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesWithResponse":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesWithResponseInternal":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobAsyncClient.resize":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobAsyncClient.resizeWithResponse":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobAsyncClient.resizeWithResponseInternal":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobAsyncClient.setSequenceNumber":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobAsyncClient.setSequenceNumberWithResponse":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobAsyncClient.setSequenceNumberWithResponseInternal":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobAsyncClient.uploadPages":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromUrl":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromUrlWithResponse":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromUrlWithResponseInternal":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesWithResponse":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesWithResponseInternal":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobClient":"Storage.Blob.PageBlob","com.azure.storage.blob.PageBlobClient.clearPages":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobClient.clearPagesWithResponse":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobClient.clearPagesWithResponseInternal":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobClient.copyIncremental":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobClient.copyIncrementalWithResponse":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobClient.copyIncrementalWithResponseInternal":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobClient.create":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobClient.createWithResponse":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobClient.createWithResponseInternal":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobClient.getPageRanges":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobClient.getPageRangesDiff":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobClient.getPageRangesDiffWithResponse":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobClient.getPageRangesDiffWithResponseInternal":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobClient.getPageRangesWithResponse":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobClient.getPageRangesWithResponseInternal":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobClient.resize":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobClient.resizeWithResponse":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobClient.resizeWithResponseInternal":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobClient.setSequenceNumber":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobClient.setSequenceNumberWithResponse":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobClient.setSequenceNumberWithResponseInternal":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobClient.uploadPages":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobClient.uploadPagesFromUrl":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobClient.uploadPagesFromUrlWithResponse":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobClient.uploadPagesFromUrlWithResponseInternal":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobClient.uploadPagesWithResponse":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobClient.uploadPagesWithResponseInternal":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.ServiceAsyncClient":"Storage.Blob.Service","com.azure.storage.blob.ServiceAsyncClient.filterBlobs":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceAsyncClient.filterBlobsWithResponse":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceAsyncClient.filterBlobsWithResponseInternal":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceAsyncClient.getAccountInfo":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceAsyncClient.getAccountInfoWithResponse":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceAsyncClient.getAccountInfoWithResponseInternal":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceAsyncClient.getProperties":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceAsyncClient.getPropertiesWithResponse":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceAsyncClient.getPropertiesWithResponseInternal":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceAsyncClient.getStatistics":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceAsyncClient.getStatisticsWithResponse":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceAsyncClient.getStatisticsWithResponseInternal":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceAsyncClient.getUserDelegationKey":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceAsyncClient.getUserDelegationKeyWithResponse":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceAsyncClient.getUserDelegationKeyWithResponseInternal":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceAsyncClient.listContainersSegment":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceAsyncClient.listContainersSegmentWithResponse":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceAsyncClient.listContainersSegmentWithResponseInternal":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceAsyncClient.setProperties":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceAsyncClient.setPropertiesWithResponse":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceAsyncClient.setPropertiesWithResponseInternal":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceClient":"Storage.Blob.Service","com.azure.storage.blob.ServiceClient.filterBlobs":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceClient.filterBlobsWithResponse":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceClient.filterBlobsWithResponseInternal":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceClient.getAccountInfo":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceClient.getAccountInfoWithResponse":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceClient.getAccountInfoWithResponseInternal":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceClient.getProperties":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceClient.getPropertiesWithResponse":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceClient.getPropertiesWithResponseInternal":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceClient.getStatistics":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceClient.getStatisticsWithResponse":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceClient.getStatisticsWithResponseInternal":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceClient.getUserDelegationKey":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceClient.getUserDelegationKeyWithResponse":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceClient.getUserDelegationKeyWithResponseInternal":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceClient.listContainersSegment":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceClient.listContainersSegmentWithResponse":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceClient.listContainersSegmentWithResponseInternal":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceClient.setProperties":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceClient.setPropertiesWithResponse":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceClient.setPropertiesWithResponseInternal":"Storage.Blob.Service.setProperties","com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockHeaders":null,"com.azure.storage.blob.implementation.models.AppendBlobsCreateHeaders":null,"com.azure.storage.blob.implementation.models.AppendBlobsSealHeaders":null,"com.azure.storage.blob.implementation.models.ArrowFieldInternal":"Storage.Blob.ArrowField","com.azure.storage.blob.implementation.models.ArrowTextConfigurationInternal":"Storage.Blob.ArrowConfiguration","com.azure.storage.blob.implementation.models.AuthenticationType":"Storage.Blob.AuthenticationType","com.azure.storage.blob.implementation.models.BlobContainersSegment":"Storage.Blob.ListContainersResponse","com.azure.storage.blob.implementation.models.BlobCopySourceTags":"Storage.Blob.BlobCopySourceTags","com.azure.storage.blob.implementation.models.BlobDeleteType":"Storage.Blob.BlobDeleteType","com.azure.storage.blob.implementation.models.BlobExpiryOptions":"Storage.Blob.BlobExpiryOptions","com.azure.storage.blob.implementation.models.BlobHierarchyListSegment":"Customizations.BlobHierarchyListSegmentJava","com.azure.storage.blob.implementation.models.BlobItemInternal":"Storage.Blob.BlobItem","com.azure.storage.blob.implementation.models.BlobItemPropertiesInternal":"Storage.Blob.BlobProperties","com.azure.storage.blob.implementation.models.BlobLayoutEndpoints":"Storage.Blob.BlobLayoutEndpoints","com.azure.storage.blob.implementation.models.BlobLayoutEndpointsEndpointItem":"Storage.Blob.BlobLayoutEndpoint","com.azure.storage.blob.implementation.models.BlobLayoutInternal":"Storage.Blob.BlobLayout","com.azure.storage.blob.implementation.models.BlobLayoutRanges":"Storage.Blob.BlobLayoutRanges","com.azure.storage.blob.implementation.models.BlobLayoutRangesRangeItem":"Storage.Blob.BlobLayoutRange","com.azure.storage.blob.implementation.models.BlobName":"Storage.Blob.BlobName","com.azure.storage.blob.implementation.models.BlobPrefixInternal":"Storage.Blob.BlobPrefix","com.azure.storage.blob.implementation.models.BlobSignedIdentifiers":"Storage.Blob.SignedIdentifiers","com.azure.storage.blob.implementation.models.BlobStorageError":"Customizations.BlobStorageError","com.azure.storage.blob.implementation.models.BlobTag":"Storage.Blob.BlobTag","com.azure.storage.blob.implementation.models.BlobTags":"Storage.Blob.BlobTags","com.azure.storage.blob.implementation.models.BlobsAbortCopyFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlobsAcquireLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsBreakLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsChangeLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsCopyFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlobsCreateSnapshotHeaders":null,"com.azure.storage.blob.implementation.models.BlobsDeleteHeaders":null,"com.azure.storage.blob.implementation.models.BlobsDeleteImmutabilityPolicyHeaders":null,"com.azure.storage.blob.implementation.models.BlobsDownloadHeaders":null,"com.azure.storage.blob.implementation.models.BlobsGetAccountInfoHeaders":null,"com.azure.storage.blob.implementation.models.BlobsGetLayoutHeaders":null,"com.azure.storage.blob.implementation.models.BlobsGetPropertiesHeaders":null,"com.azure.storage.blob.implementation.models.BlobsGetTagsHeaders":null,"com.azure.storage.blob.implementation.models.BlobsQueryHeaders":null,"com.azure.storage.blob.implementation.models.BlobsReleaseLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsRenewLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetExpiryHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetHttpHeadersHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetImmutabilityPolicyHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetLegalHoldHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetMetadataHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetTagsHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetTierHeaders":null,"com.azure.storage.blob.implementation.models.BlobsStartCopyFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlobsUndeleteHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsCommitBlockListHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsGetBlockListHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsStageBlockFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsStageBlockHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsUploadBlobFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsUploadHeaders":null,"com.azure.storage.blob.implementation.models.ContainersAcquireLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersBreakLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersChangeLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersCreateHeaders":null,"com.azure.storage.blob.implementation.models.ContainersCreateSessionHeaders":null,"com.azure.storage.blob.implementation.models.ContainersDeleteHeaders":null,"com.azure.storage.blob.implementation.models.ContainersFilterBlobsHeaders":null,"com.azure.storage.blob.implementation.models.ContainersGetAccessPolicyHeaders":null,"com.azure.storage.blob.implementation.models.ContainersGetAccountInfoHeaders":null,"com.azure.storage.blob.implementation.models.ContainersGetPropertiesHeaders":null,"com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentHeaders":null,"com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentHeaders":null,"com.azure.storage.blob.implementation.models.ContainersReleaseLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersRenameHeaders":null,"com.azure.storage.blob.implementation.models.ContainersRenewLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersRestoreHeaders":null,"com.azure.storage.blob.implementation.models.ContainersSetAccessPolicyHeaders":null,"com.azure.storage.blob.implementation.models.ContainersSetMetadataHeaders":null,"com.azure.storage.blob.implementation.models.CreateSessionConfiguration":"Storage.Blob.CreateSessionConfiguration","com.azure.storage.blob.implementation.models.CreateSessionResponse":"Storage.Blob.CreateSessionResponse","com.azure.storage.blob.implementation.models.DelimitedTextConfiguration":"Storage.Blob.DelimitedTextConfiguration","com.azure.storage.blob.implementation.models.DownloadHint":"Storage.Blob.DownloadHint","com.azure.storage.blob.implementation.models.FilterBlobItem":"Storage.Blob.FilterBlobItem","com.azure.storage.blob.implementation.models.FilterBlobSegment":"Storage.Blob.FilteredBlobResponse","com.azure.storage.blob.implementation.models.FilterBlobsIncludeItem":"Storage.Blob.FilterBlobsIncludeItem","com.azure.storage.blob.implementation.models.JsonTextConfigurationInternal":"Storage.Blob.JsonTextConfiguration","com.azure.storage.blob.implementation.models.ListBlobsFlatSegmentResponse":"Storage.Blob.ListBlobsResponse","com.azure.storage.blob.implementation.models.ListBlobsHierarchySegmentResponse":"Storage.Blob.ListBlobsHierarchicalResponse","com.azure.storage.blob.implementation.models.PageBlobsClearPagesHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsCopyIncrementalHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsCreateHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesDiffHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsResizeHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsSetSequenceNumberHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsUploadPagesFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsUploadPagesHeaders":null,"com.azure.storage.blob.implementation.models.ParquetTextConfiguration":"Customizations.StorageCppParquetConfiguration","com.azure.storage.blob.implementation.models.PremiumPageBlobAccessTier":"Storage.Blob.PremiumPageBlobAccessTier","com.azure.storage.blob.implementation.models.QueryFormat":"Storage.Blob.QueryFormat","com.azure.storage.blob.implementation.models.QueryFormatType":"Storage.Blob.QueryType","com.azure.storage.blob.implementation.models.QueryRequest":"Storage.Blob.QueryRequest","com.azure.storage.blob.implementation.models.QueryRequestType":"Storage.Blob.QueryRequestType","com.azure.storage.blob.implementation.models.QuerySerialization":"Storage.Blob.QuerySerialization","com.azure.storage.blob.implementation.models.ServicesFilterBlobsHeaders":null,"com.azure.storage.blob.implementation.models.ServicesGetAccountInfoHeaders":null,"com.azure.storage.blob.implementation.models.ServicesGetPropertiesHeaders":null,"com.azure.storage.blob.implementation.models.ServicesGetStatisticsHeaders":null,"com.azure.storage.blob.implementation.models.ServicesGetUserDelegationKeyHeaders":null,"com.azure.storage.blob.implementation.models.ServicesListContainersSegmentHeaders":null,"com.azure.storage.blob.implementation.models.ServicesSetPropertiesHeaders":null,"com.azure.storage.blob.implementation.models.SessionCredentials":"Storage.Blob.SessionCredentials","com.azure.storage.blob.models.AccessTier":"Storage.Blob.AccessTier","com.azure.storage.blob.models.AccountKind":"Storage.Blob.AccountKind","com.azure.storage.blob.models.ArchiveStatus":"Storage.Blob.ArchiveStatus","com.azure.storage.blob.models.BlobAccessPolicy":"Storage.Blob.AccessPolicy","com.azure.storage.blob.models.BlobAnalyticsLogging":"Storage.Blob.Logging","com.azure.storage.blob.models.BlobContainerItem":"Storage.Blob.ContainerItem","com.azure.storage.blob.models.BlobContainerItemProperties":"Storage.Blob.ContainerProperties","com.azure.storage.blob.models.BlobCorsRule":"Storage.Blob.CorsRule","com.azure.storage.blob.models.BlobErrorCode":"Storage.Blob.StorageErrorCode","com.azure.storage.blob.models.BlobImmutabilityPolicyMode":"Storage.Blob.ImmutabilityPolicyMode","com.azure.storage.blob.models.BlobMetrics":"Storage.Blob.Metrics","com.azure.storage.blob.models.BlobRetentionPolicy":"Storage.Blob.RetentionPolicy","com.azure.storage.blob.models.BlobServiceProperties":"Storage.Blob.BlobServiceProperties","com.azure.storage.blob.models.BlobServiceStatistics":"Storage.Blob.StorageServiceStats","com.azure.storage.blob.models.BlobSignedIdentifier":"Storage.Blob.SignedIdentifier","com.azure.storage.blob.models.BlobType":"Storage.Blob.BlobType","com.azure.storage.blob.models.Block":"Storage.Blob.Block","com.azure.storage.blob.models.BlockList":"Storage.Blob.BlockList","com.azure.storage.blob.models.BlockListType":"Storage.Blob.BlockListType","com.azure.storage.blob.models.BlockLookupList":"Storage.Blob.BlockLookupList","com.azure.storage.blob.models.ClearRange":"Storage.Blob.ClearRange","com.azure.storage.blob.models.CopyStatusType":"Storage.Blob.CopyStatus","com.azure.storage.blob.models.DeleteSnapshotsOptionType":"Storage.Blob.DeleteSnapshotsOptionType","com.azure.storage.blob.models.EncryptionAlgorithmType":"Storage.Blob.EncryptionAlgorithmType","com.azure.storage.blob.models.FileShareTokenIntent":"Storage.Blob.FileShareTokenIntent","com.azure.storage.blob.models.GeoReplication":"Storage.Blob.GeoReplication","com.azure.storage.blob.models.GeoReplicationStatus":"Storage.Blob.GeoReplicationStatusType","com.azure.storage.blob.models.KeyInfo":"Storage.Blob.KeyInfo","com.azure.storage.blob.models.LeaseDurationType":"Storage.Blob.LeaseDuration","com.azure.storage.blob.models.LeaseStateType":"Storage.Blob.LeaseState","com.azure.storage.blob.models.LeaseStatusType":"Storage.Blob.LeaseStatus","com.azure.storage.blob.models.ListBlobContainersIncludeType":"Storage.Blob.ListContainersIncludeType","com.azure.storage.blob.models.ListBlobsIncludeItem":"Storage.Blob.ListBlobsIncludeItem","com.azure.storage.blob.models.PageList":"Storage.Blob.PageList","com.azure.storage.blob.models.PageRange":"Storage.Blob.PageRange","com.azure.storage.blob.models.PublicAccessType":"Storage.Blob.PublicAccessType","com.azure.storage.blob.models.RehydratePriority":"Storage.Blob.RehydratePriority","com.azure.storage.blob.models.SequenceNumberActionType":"Storage.Blob.SequenceNumberActionType","com.azure.storage.blob.models.SkuName":"Storage.Blob.SkuName","com.azure.storage.blob.models.StaticWebsite":"Storage.Blob.StaticWebsite","com.azure.storage.blob.models.UserDelegationKey":"Storage.Blob.UserDelegationKey"},"generatedFiles":["src/main/java/com/azure/storage/blob/AppendBlobAsyncClient.java","src/main/java/com/azure/storage/blob/AppendBlobClient.java","src/main/java/com/azure/storage/blob/AzureBlobStorageBuilder.java","src/main/java/com/azure/storage/blob/BlobAsyncClient.java","src/main/java/com/azure/storage/blob/BlobClient.java","src/main/java/com/azure/storage/blob/BlobServiceVersion.java","src/main/java/com/azure/storage/blob/BlockBlobAsyncClient.java","src/main/java/com/azure/storage/blob/BlockBlobClient.java","src/main/java/com/azure/storage/blob/ContainerAsyncClient.java","src/main/java/com/azure/storage/blob/ContainerClient.java","src/main/java/com/azure/storage/blob/PageBlobAsyncClient.java","src/main/java/com/azure/storage/blob/PageBlobClient.java","src/main/java/com/azure/storage/blob/ServiceAsyncClient.java","src/main/java/com/azure/storage/blob/ServiceClient.java","src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java","src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java","src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java","src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java","src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java","src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java","src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java","src/main/java/com/azure/storage/blob/implementation/XmlSerializer.java","src/main/java/com/azure/storage/blob/implementation/XmlSerializerProviders.java","src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsCreateHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsSealHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ArrowFieldInternal.java","src/main/java/com/azure/storage/blob/implementation/models/ArrowTextConfigurationInternal.java","src/main/java/com/azure/storage/blob/implementation/models/AuthenticationType.java","src/main/java/com/azure/storage/blob/implementation/models/BlobContainersSegment.java","src/main/java/com/azure/storage/blob/implementation/models/BlobCopySourceTags.java","src/main/java/com/azure/storage/blob/implementation/models/BlobDeleteType.java","src/main/java/com/azure/storage/blob/implementation/models/BlobExpiryOptions.java","src/main/java/com/azure/storage/blob/implementation/models/BlobHierarchyListSegment.java","src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java","src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutEndpoints.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutEndpointsEndpointItem.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutInternal.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutRanges.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutRangesRangeItem.java","src/main/java/com/azure/storage/blob/implementation/models/BlobName.java","src/main/java/com/azure/storage/blob/implementation/models/BlobPrefixInternal.java","src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifiers.java","src/main/java/com/azure/storage/blob/implementation/models/BlobStorageError.java","src/main/java/com/azure/storage/blob/implementation/models/BlobStorageErrorException.java","src/main/java/com/azure/storage/blob/implementation/models/BlobTag.java","src/main/java/com/azure/storage/blob/implementation/models/BlobTags.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsAbortCopyFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsAcquireLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsBreakLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsChangeLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsCopyFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsCreateSnapshotHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteImmutabilityPolicyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsDownloadHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccountInfoHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsGetLayoutHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsGetTagsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsQueryHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsReleaseLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsRenewLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetExpiryHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetHttpHeadersHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetLegalHoldHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetMetadataHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTagsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTierHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsStartCopyFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsUndeleteHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsCommitBlockListHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsGetBlockListHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadBlobFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersAcquireLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersBreakLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersChangeLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateSessionHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersDeleteHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersFilterBlobsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccessPolicyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccountInfoHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersGetPropertiesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersReleaseLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersRenameHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersRenewLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersRestoreHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersSetAccessPolicyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersSetMetadataHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/CreateSessionConfiguration.java","src/main/java/com/azure/storage/blob/implementation/models/CreateSessionResponse.java","src/main/java/com/azure/storage/blob/implementation/models/DelimitedTextConfiguration.java","src/main/java/com/azure/storage/blob/implementation/models/DownloadHint.java","src/main/java/com/azure/storage/blob/implementation/models/FilterBlobItem.java","src/main/java/com/azure/storage/blob/implementation/models/FilterBlobSegment.java","src/main/java/com/azure/storage/blob/implementation/models/FilterBlobsIncludeItem.java","src/main/java/com/azure/storage/blob/implementation/models/JsonTextConfigurationInternal.java","src/main/java/com/azure/storage/blob/implementation/models/ListBlobsFlatSegmentResponse.java","src/main/java/com/azure/storage/blob/implementation/models/ListBlobsHierarchySegmentResponse.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsClearPagesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCopyIncrementalHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCreateHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsResizeHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsSetSequenceNumberHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ParquetTextConfiguration.java","src/main/java/com/azure/storage/blob/implementation/models/PremiumPageBlobAccessTier.java","src/main/java/com/azure/storage/blob/implementation/models/QueryFormat.java","src/main/java/com/azure/storage/blob/implementation/models/QueryFormatType.java","src/main/java/com/azure/storage/blob/implementation/models/QueryRequest.java","src/main/java/com/azure/storage/blob/implementation/models/QueryRequestType.java","src/main/java/com/azure/storage/blob/implementation/models/QuerySerialization.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesFilterBlobsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesGetAccountInfoHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesGetPropertiesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesGetStatisticsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesGetUserDelegationKeyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesListContainersSegmentHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesSetPropertiesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/SessionCredentials.java","src/main/java/com/azure/storage/blob/implementation/models/package-info.java","src/main/java/com/azure/storage/blob/implementation/package-info.java","src/main/java/com/azure/storage/blob/models/AccessTier.java","src/main/java/com/azure/storage/blob/models/AccountKind.java","src/main/java/com/azure/storage/blob/models/ArchiveStatus.java","src/main/java/com/azure/storage/blob/models/BlobAccessPolicy.java","src/main/java/com/azure/storage/blob/models/BlobAnalyticsLogging.java","src/main/java/com/azure/storage/blob/models/BlobContainerItem.java","src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java","src/main/java/com/azure/storage/blob/models/BlobCorsRule.java","src/main/java/com/azure/storage/blob/models/BlobErrorCode.java","src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicyMode.java","src/main/java/com/azure/storage/blob/models/BlobMetrics.java","src/main/java/com/azure/storage/blob/models/BlobRetentionPolicy.java","src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java","src/main/java/com/azure/storage/blob/models/BlobServiceStatistics.java","src/main/java/com/azure/storage/blob/models/BlobSignedIdentifier.java","src/main/java/com/azure/storage/blob/models/BlobType.java","src/main/java/com/azure/storage/blob/models/Block.java","src/main/java/com/azure/storage/blob/models/BlockList.java","src/main/java/com/azure/storage/blob/models/BlockListType.java","src/main/java/com/azure/storage/blob/models/BlockLookupList.java","src/main/java/com/azure/storage/blob/models/ClearRange.java","src/main/java/com/azure/storage/blob/models/CopyStatusType.java","src/main/java/com/azure/storage/blob/models/DeleteSnapshotsOptionType.java","src/main/java/com/azure/storage/blob/models/EncryptionAlgorithmType.java","src/main/java/com/azure/storage/blob/models/FileShareTokenIntent.java","src/main/java/com/azure/storage/blob/models/GeoReplication.java","src/main/java/com/azure/storage/blob/models/GeoReplicationStatus.java","src/main/java/com/azure/storage/blob/models/KeyInfo.java","src/main/java/com/azure/storage/blob/models/LeaseDurationType.java","src/main/java/com/azure/storage/blob/models/LeaseStateType.java","src/main/java/com/azure/storage/blob/models/LeaseStatusType.java","src/main/java/com/azure/storage/blob/models/ListBlobContainersIncludeType.java","src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java","src/main/java/com/azure/storage/blob/models/PageList.java","src/main/java/com/azure/storage/blob/models/PageRange.java","src/main/java/com/azure/storage/blob/models/PublicAccessType.java","src/main/java/com/azure/storage/blob/models/RehydratePriority.java","src/main/java/com/azure/storage/blob/models/SequenceNumberActionType.java","src/main/java/com/azure/storage/blob/models/SkuName.java","src/main/java/com/azure/storage/blob/models/StaticWebsite.java","src/main/java/com/azure/storage/blob/models/UserDelegationKey.java","src/main/java/com/azure/storage/blob/models/package-info.java","src/main/java/com/azure/storage/blob/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java index b522d206a9f8a..178e189375b64 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java @@ -3286,7 +3286,7 @@ public void downloadBlobToFileInChunksOverSessionAuth() throws IOException { && path != null && path.endsWith("/" + blobName) && (query == null || !query.contains("comp="))) { - String range = req.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); + String range = req.getHeaders().getValue(HttpHeaderName.RANGE); if (range == null) { range = req.getHeaders().getValue(HttpHeaderName.fromString("Range")); } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java index ca170ca544acd..ab083f7fd71cb 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java @@ -3053,7 +3053,7 @@ public void downloadBlobToFileInChunksOverSessionAuth() throws IOException { && path != null && path.endsWith("/" + blobName) && (query == null || !query.contains("comp="))) { - String range = req.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); + String range = req.getHeaders().getValue(HttpHeaderName.RANGE); if (range == null) { range = req.getHeaders().getValue(HttpHeaderName.fromString("Range")); } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobContentValidationAsyncUploadTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobContentValidationAsyncUploadTests.java index 106ef65de0ed0..ba867bfc6c0ef 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobContentValidationAsyncUploadTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobContentValidationAsyncUploadTests.java @@ -85,7 +85,6 @@ public class BlobContentValidationAsyncUploadTests extends BlobTestBase { private static final HttpHeaderName APPEND_POS = HttpHeaderName.fromString("x-ms-blob-condition-appendpos"); private static final HttpHeaderName MAX_SIZE = HttpHeaderName.fromString("x-ms-blob-condition-maxsize"); private static final HttpHeaderName SEQ_EQ = HttpHeaderName.fromString("x-ms-if-sequence-number-eq"); - private static final HttpHeaderName X_MS_RANGE = HttpHeaderName.fromString("x-ms-range"); private static final int TEN_MB = 10 * Constants.MB; // Generic ">= 4 MiB so the single-shot upload path uses a structured message" payload for the replayable @@ -1432,7 +1431,7 @@ public void uploadPagesAtNonZeroOffsetIsValidatedAndForwardsRange() { assertTrue(allUploadsUseCrc64Header(recorded)); assertCrc64HeaderMatches(upload.getHeaders(), data); assertEquals("bytes=" + start + "-" + (start + UNDER_4MB_PAGE_ALIGNED - 1), - upload.getHeaders().getValue(X_MS_RANGE), + upload.getHeaders().getValue(HttpHeaderName.RANGE), "A non-zero page offset must be forwarded alongside content validation"); } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobContentValidationUploadTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobContentValidationUploadTests.java index c0f9099c8e025..3a1b3d365e3b1 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobContentValidationUploadTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobContentValidationUploadTests.java @@ -85,7 +85,6 @@ public class BlobContentValidationUploadTests extends BlobTestBase { private static final HttpHeaderName CV_APPEND_POS = HttpHeaderName.fromString("x-ms-blob-condition-appendpos"); private static final HttpHeaderName CV_MAX_SIZE = HttpHeaderName.fromString("x-ms-blob-condition-maxsize"); private static final HttpHeaderName CV_SEQ_EQ = HttpHeaderName.fromString("x-ms-if-sequence-number-eq"); - private static final HttpHeaderName CV_RANGE = HttpHeaderName.fromString("x-ms-range"); private static final int TEN_MB = 10 * Constants.MB; // Generic ">= 4 MiB so the single-shot upload path uses a structured message" payload for the replayable @@ -1537,7 +1536,7 @@ public void uploadPagesAtNonZeroOffsetIsValidatedAndForwardsRange() { assertTrue(allUploadsUseCrc64Header(recorded)); assertCrc64HeaderMatches(upload.getHeaders(), data); assertEquals("bytes=" + start + "-" + (start + UNDER_4MB_PAGE_ALIGNED - 1), - upload.getHeaders().getValue(CV_RANGE), + upload.getHeaders().getValue(HttpHeaderName.RANGE), "A non-zero page offset must be forwarded alongside content validation"); } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobErrorDeserializationTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobErrorDeserializationTests.java new file mode 100644 index 0000000000000..7e6b46a499378 --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobErrorDeserializationTests.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.storage.blob; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.core.test.utils.MockTokenCredential; +import com.azure.json.JsonProviders; +import com.azure.json.JsonReader; +import com.azure.storage.blob.implementation.models.BlobStorageError; +import com.azure.storage.blob.models.BlobErrorCode; +import com.azure.storage.blob.models.BlobStorageException; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Tests cases where the service returns a response that would result in a {@link BlobStorageException} being thrown + * with a response body that needs to be deserialized. + */ +public class BlobErrorDeserializationTests { + private static final String JSON_ERROR + = "{\"code\":\"ContainerNotFound\",\"message\":\"The specified container does not exist.\"," + + "\"headerName\":\"x-ms-version\"}"; + + @Test + public void xmlErrorResponseBody() { + String errorResponse = "ContainerAlreadyExists" + + "The specified container already exists."; + BlobContainerClientBuilder builder = builder(409, "application/xml", errorResponse); + + BlobStorageException exception = assertThrows(BlobStorageException.class, () -> builder.buildClient().create()); + assertTrue(exception.getMessage().contains("The specified container already exists.")); + BlobStorageError error = assertInstanceOf(BlobStorageError.class, exception.getValue()); + assertEquals(BlobErrorCode.CONTAINER_ALREADY_EXISTS, error.getCode()); + } + + @ParameterizedTest + @ValueSource(booleans = { false, true }) + public void blobStorageErrorFromJson(boolean wrapped) throws IOException { + String json = wrapped ? "{\"error\":" + JSON_ERROR + "}" : JSON_ERROR; + try (JsonReader reader = JsonProviders.createReader(json)) { + BlobStorageError error = BlobStorageError.fromJson(reader); + + assertEquals(BlobErrorCode.CONTAINER_NOT_FOUND, error.getCode()); + assertEquals("The specified container does not exist.", error.getMessage()); + assertEquals("x-ms-version", error.getHeaderName()); + } + } + + // A wrapped JSON body is only populated by BlobStorageError.fromJson; azure-core's reflective fallback would leave + // every field null (and fails outright on the module path). + @Test + public void jsonErrorResponseBody() { + BlobContainerClientBuilder builder = builder(404, "application/json", "{\"error\":" + JSON_ERROR + "}"); + + assertJsonError(assertThrows(BlobStorageException.class, () -> builder.buildClient().getProperties())); + StepVerifier.create(builder.buildAsyncClient().getProperties()) + .verifyErrorSatisfies(e -> assertJsonError(assertInstanceOf(BlobStorageException.class, e))); + } + + private static BlobContainerClientBuilder builder(int statusCode, String contentType, String body) { + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(request -> Mono.just( + new MockHttpResponse(request, statusCode, new HttpHeaders().set(HttpHeaderName.CONTENT_TYPE, contentType), + body.getBytes(StandardCharsets.UTF_8)))) + .build(); + return new BlobContainerClientBuilder().endpoint("https://account.blob.core.windows.net/") + .containerName("container") + .credential(new MockTokenCredential()) + .pipeline(httpPipeline); + } + + private static void assertJsonError(BlobStorageException exception) { + BlobStorageError error = assertInstanceOf(BlobStorageError.class, exception.getValue()); + assertEquals(BlobErrorCode.CONTAINER_NOT_FOUND, error.getCode()); + assertEquals("x-ms-version", error.getHeaderName()); + } +} diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java index c1e4f37428862..6ad82959bfe3c 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java @@ -241,13 +241,17 @@ public void beforeTest() { // Ignore changes to the order of query parameters and wholly ignore the 'sv' (service version) query parameter // in SAS tokens. + // The 'Accept' header is excluded from matching because the TypeSpec-generated protocol layer omits it (sending + // the default '*/*') on operations without a response body, whereas the AutoRest recordings captured + // 'application/xml'. This mirrors the .NET migration, which added Accept to its LegacyExcludedHeaders. interceptorManager.addMatchers(Collections.singletonList(new CustomMatcher().setComparingBodies(false) .setHeadersKeyOnlyMatch(Arrays.asList("x-ms-lease-id", "x-ms-proposed-lease-id", "If-Modified-Since", "If-Unmodified-Since", "x-ms-expiry-time", "x-ms-source-if-modified-since", "x-ms-source-if-unmodified-since", "x-ms-source-lease-id", "x-ms-encryption-key-sha256", "x-ms-blob-if-modified-since", "x-ms-blob-if-unmodified-since")) .setQueryOrderingIgnored(true) - .setIgnoredQueryParameters(Collections.singletonList("sv")))); + .setIgnoredQueryParameters(Collections.singletonList("sv")) + .setExcludedHeaders(Collections.singletonList("Accept")))); primaryBlobServiceClient = getServiceClient(ENVIRONMENT.getPrimaryAccount()); primaryBlobServiceAsyncClient = getServiceAsyncClient(ENVIRONMENT.getPrimaryAccount()); @@ -557,12 +561,12 @@ protected HttpPipelinePolicy createLayoutResponseLoggingPolicy() { } String clientRequestId = request.getHeaders().getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - String range = request.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); + String range = request.getHeaders().getValue(HttpHeaderName.RANGE); return next.process() .doOnNext(response -> LOGGER.atInfo() .addKeyValue("test", testName) .addKeyValue("statusCode", response.getStatusCode()) - .addKeyValue("x-ms-range", range) + .addKeyValue("Range", range) .addKeyValue("hasMarker", query.contains("marker=")) .addKeyValue("x-ms-client-request-id", clientRequestId) .addKeyValue("x-ms-request-id", response.getHeaderValue(X_MS_REQUEST_ID)) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index 2f601a82be13f..0613548db8a93 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -3,6 +3,7 @@ package com.azure.storage.blob; +import com.azure.storage.blob.implementation.util.RequestOptionsHelper; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpMethod; @@ -80,12 +81,8 @@ import reactor.core.publisher.Mono; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; -import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; -import com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentApacheArrowHeaders; import com.azure.storage.blob.implementation.util.ArrowBlobListDeserializer; -import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.ListBlobsIncludeItem; -import com.azure.core.http.rest.ResponseBase; import java.io.ByteArrayInputStream; import java.io.InputStream; @@ -2432,22 +2429,21 @@ public void listBlobsArrowDeserializer() throws Exception { .getBlockBlobClient() .uploadWithResponse(DATA.getDefaultInputStream(), 7, null, metadata, null, null, null, null, null); - AzureBlobStorageImpl impl = new AzureBlobStorageImplBuilder().pipeline(cc.getHttpPipeline()) - .url(cc.getAccountUrl()) - .version(BlobServiceVersion.getLatest().getVersion()) - .buildClient(); + AzureBlobStorageImpl impl + = new AzureBlobStorageImpl(cc.getHttpPipeline(), cc.getAccountUrl(), BlobServiceVersion.getLatest()); // Call the Arrow endpoint ArrayList include = new ArrayList<>(); include.add(ListBlobsIncludeItem.METADATA); - ResponseBase response = impl.getContainers() - .listBlobFlatSegmentApacheArrowWithResponse(containerName, null, null, null, include, null, null, null, - null, com.azure.core.util.Context.NONE); + Response response = impl.getContainers() + .listBlobFlatSegmentApacheArrowWithResponse(RequestOptionsHelper + .addListBlobsQueryParams(RequestOptionsHelper.containerRequestOptions(com.azure.core.util.Context.NONE, + impl.getUrl(), containerName), null, null, null, include, null, null)); ArrowBlobListDeserializer.ArrowListBlobsResult result; - try (InputStream body = response.getValue()) { - String contentType = response.getDeserializedHeaders().getContentType(); + try (InputStream body = response.getValue().toStream()) { + String contentType = response.getHeaders().getValue(HttpHeaderName.CONTENT_TYPE); assertTrue( StorageImplUtils.hasMatchingHeaderValue(contentType, Constants.ContentTypeConstants.APPLICATION_VND_APACHE_ARROW_STREAM), @@ -2464,11 +2460,10 @@ public void listBlobsArrowDeserializer() throws Exception { // Verify we got exactly one blob assertEquals(1, result.getBlobItems().size()); - com.azure.storage.blob.implementation.models.BlobItemInternal item = result.getBlobItems().get(0); + BlobItem item = result.getBlobItems().get(0); // Name - assertNotNull(item.getName()); - assertEquals(blobName, item.getName().getContent()); + assertEquals(blobName, item.getName()); // Properties assertNotNull(item.getProperties()); @@ -2488,11 +2483,6 @@ public void listBlobsArrowDeserializer() throws Exception { // Metadata assertNotNull(item.getMetadata()); assertEquals("testvalue", item.getMetadata().get("testkey")); - - // Verify ModelHelper can convert to public BlobItem - BlobItem publicItem = ModelHelper.populateBlobItem(item); - assertEquals(blobName, publicItem.getName()); - assertEquals(7L, (long) publicItem.getProperties().getContentLength()); } @Test @@ -2643,7 +2633,7 @@ public void downloadBlobToFileInChunksOverSessionAuth() throws IOException { && path != null && path.endsWith("/" + blobName) && (query == null || !query.contains("comp="))) { - String range = req.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); + String range = req.getHeaders().getValue(HttpHeaderName.RANGE); if (range == null) { range = req.getHeaders().getValue(HttpHeaderName.fromString("Range")); } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java index 018ff75c6ca4c..a01d6528e39ef 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java @@ -3,6 +3,7 @@ package com.azure.storage.blob; +import com.azure.storage.blob.implementation.util.RequestOptionsHelper; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpMethod; @@ -18,14 +19,10 @@ import com.azure.core.test.utils.MockTokenCredential; import com.azure.core.util.BinaryData; import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.storage.blob.implementation.AzureBlobStorageImpl; -import com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder; -import com.azure.storage.blob.implementation.models.BlobItemInternal; import com.azure.storage.blob.implementation.util.ArrowBlobListDeserializer; -import com.azure.storage.blob.implementation.util.ModelHelper; import com.azure.storage.blob.models.*; import com.azure.storage.blob.SessionContext.SessionMode; import com.azure.storage.blob.options.BlobContainerCreateOptions; @@ -2424,10 +2421,8 @@ public void listBlobsArrowDeserializer() { BlockBlobAsyncClient bc = ccAsync.getBlobAsyncClient(blobName).getBlockBlobAsyncClient(); - AzureBlobStorageImpl impl = new AzureBlobStorageImplBuilder().pipeline(ccAsync.getHttpPipeline()) - .url(ccAsync.getAccountUrl()) - .version(BlobServiceVersion.getLatest().getVersion()) - .buildClient(); + AzureBlobStorageImpl impl = new AzureBlobStorageImpl(ccAsync.getHttpPipeline(), ccAsync.getAccountUrl(), + BlobServiceVersion.getLatest()); List include = new ArrayList<>(); include.add(ListBlobsIncludeItem.METADATA); @@ -2435,10 +2430,12 @@ public void listBlobsArrowDeserializer() { Mono testMono = bc.uploadWithResponse(DATA.getDefaultFlux(), 7, null, metadata, null, null, null) .then(impl.getContainers() - .listBlobFlatSegmentApacheArrowWithResponseAsync(containerName, null, null, null, include, null, - null, null, null)) - .flatMap(response -> FluxUtil.collectBytesInByteBufferStream(response.getValue()).map(bytes -> { - String contentType = response.getDeserializedHeaders().getContentType(); + .listBlobFlatSegmentApacheArrowWithResponseAsync(RequestOptionsHelper.addListBlobsQueryParams( + RequestOptionsHelper.containerRequestOptions(com.azure.core.util.Context.NONE, impl.getUrl(), + containerName), + null, null, null, include, null, null))) + .flatMap(response -> Mono.fromCallable(() -> response.getValue().toBytes()).map(bytes -> { + String contentType = response.getHeaders().getValue(HttpHeaderName.CONTENT_TYPE); assertTrue( StorageImplUtils.hasMatchingHeaderValue(contentType, Constants.ContentTypeConstants.APPLICATION_VND_APACHE_ARROW_STREAM), @@ -2457,11 +2454,10 @@ public void listBlobsArrowDeserializer() { // Verify we got exactly one blob assertEquals(1, result.getBlobItems().size()); - BlobItemInternal item = result.getBlobItems().get(0); + BlobItem item = result.getBlobItems().get(0); // Name - assertNotNull(item.getName()); - assertEquals(blobName, item.getName().getContent()); + assertEquals(blobName, item.getName()); // Properties assertNotNull(item.getProperties()); @@ -2481,11 +2477,6 @@ public void listBlobsArrowDeserializer() { // Metadata assertNotNull(item.getMetadata()); assertEquals("testvalue", item.getMetadata().get("testkey")); - - // Verify ModelHelper can convert to public BlobItem - BlobItem publicItem = ModelHelper.populateBlobItem(item); - assertEquals(blobName, publicItem.getName()); - assertEquals(7L, (long) publicItem.getProperties().getContentLength()); }).verifyComplete(); } @@ -2669,7 +2660,7 @@ public void downloadBlobToFileInChunksOverSessionAuth() throws IOException { && path != null && path.endsWith("/" + blobName) && (query == null || !query.contains("comp="))) { - String range = req.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); + String range = req.getHeaders().getValue(HttpHeaderName.RANGE); if (range == null) { range = req.getHeaders().getValue(HttpHeaderName.fromString("Range")); } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/models/BlobHierarchyListSegmentTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/models/BlobHierarchyListSegmentTests.java new file mode 100644 index 0000000000000..58d025282ff3f --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/models/BlobHierarchyListSegmentTests.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.implementation.models; + +import com.azure.xml.XmlReader; +import org.junit.jupiter.api.Test; + +import javax.xml.stream.XMLStreamException; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Hierarchical listing pages may hold only prefixes, only blobs, or neither; both lists must deserialize to non-null + * lists in every case. + */ +public class BlobHierarchyListSegmentTests { + @Test + public void prefixesOnly() throws XMLStreamException { + BlobHierarchyListSegment segment + = parse("dir1/dir2/" + + ""); + + assertTrue(segment.getBlobItems().isEmpty()); + assertEquals(2, segment.getBlobPrefixes().size()); + assertEquals("dir1/", segment.getBlobPrefixes().get(0).getName().getContent()); + } + + @Test + public void blobsAndPrefixes() throws XMLStreamException { + BlobHierarchyListSegment segment = parse("filefalse" + + "dir/"); + + assertEquals(1, segment.getBlobItems().size()); + assertEquals(1, segment.getBlobPrefixes().size()); + } + + @Test + public void empty() throws XMLStreamException { + BlobHierarchyListSegment segment = parse(""); + + assertTrue(segment.getBlobItems().isEmpty()); + assertTrue(segment.getBlobPrefixes().isEmpty()); + } + + private static BlobHierarchyListSegment parse(String xml) throws XMLStreamException { + try (XmlReader reader = XmlReader.fromString(xml)) { + return BlobHierarchyListSegment.fromXml(reader, "Blobs"); + } + } +} diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowGoldenDecodeTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowGoldenDecodeTests.java index ae5cedda007d2..ed3e25550584d 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowGoldenDecodeTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/BlobListArrowGoldenDecodeTests.java @@ -3,7 +3,7 @@ package com.azure.storage.blob.implementation.util; -import com.azure.storage.blob.implementation.models.BlobItemInternal; +import com.azure.storage.blob.models.BlobItem; import com.azure.storage.blob.implementation.models.BlobListArrowParseException; import org.junit.jupiter.api.Test; @@ -44,13 +44,13 @@ public void decodesRepresentativePayload() throws IOException { assertEquals(Integer.valueOf(2), result.getNumberOfRecords()); // Two rows: one blob, one prefix. - List items = result.getBlobItems(); + List items = result.getBlobItems(); assertEquals(2, items.size()); - BlobItemInternal blob = items.get(0); + BlobItem blob = items.get(0); assertNotNull(blob.getName()); - assertEquals("blob1", blob.getName().getContent()); - assertNull(blob.isPrefix()); + assertEquals("blob1", blob.getName()); + assertFalse(blob.isPrefix()); assertEquals(Boolean.FALSE, blob.isDeleted()); assertNotNull(blob.getProperties()); assertEquals(7L, (long) blob.getProperties().getContentLength()); @@ -63,9 +63,9 @@ public void decodesRepresentativePayload() throws IOException { assertEquals("v1", metadata.get("k1")); assertEquals("v2", metadata.get("k2")); - BlobItemInternal prefix = items.get(1); + BlobItem prefix = items.get(1); assertNotNull(prefix.getName()); - assertEquals("dir/", prefix.getName().getContent()); + assertEquals("dir/", prefix.getName()); assertTrue(prefix.isPrefix()); // The prefix row had no metadata entries; the reader must not surface an (empty) map for it. assertNull(prefix.getMetadata()); @@ -79,12 +79,12 @@ public void allColumnsFixtureDecodesWithoutRejection() throws IOException { ArrowBlobListDeserializer.ArrowListBlobsResult result = ArrowBlobListDeserializer.deserialize(openFixture("allcolumns.arrow.base64")); - List items = result.getBlobItems(); + List items = result.getBlobItems(); assertEquals(1, items.size()); - BlobItemInternal blob = items.get(0); + BlobItem blob = items.get(0); // Spot-check one field from each Arrow type category to prove full-schema decode. - assertEquals("blob1", blob.getName().getContent()); + assertEquals("blob1", blob.getName()); assertEquals(Boolean.FALSE, blob.isDeleted()); assertEquals(7L, (long) blob.getProperties().getContentLength()); assertEquals(1000L, blob.getProperties().getCreationTime().toEpochSecond()); diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/ModelHelperTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/ModelHelperTests.java index 108e6ffb2c867..71fb4b29e1e81 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/ModelHelperTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/implementation/util/ModelHelperTests.java @@ -7,18 +7,15 @@ import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.test.http.MockHttpResponse; import com.azure.core.util.logging.ClientLogger; -import com.azure.storage.blob.implementation.models.BlobLayoutEndpoints; -import com.azure.storage.blob.implementation.models.BlobLayoutEndpointsEndpointItem; +import com.azure.xml.XmlReader; import com.azure.storage.blob.implementation.models.BlobLayoutInternal; -import com.azure.storage.blob.implementation.models.BlobLayoutRanges; -import com.azure.storage.blob.implementation.models.BlobLayoutRangesRangeItem; import com.azure.storage.common.LayoutAwareRouting; import com.azure.storage.common.policy.DataLocalityPolicy; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; +import javax.xml.stream.XMLStreamException; import java.net.URI; -import java.util.Arrays; import java.util.List; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -69,16 +66,17 @@ public void layoutRoutingEnabledDoesNotWarnWhenPipelineSupportsDataLocality() { } @Test - public void transformBlobLayoutRangesConvertsEndpointValuesToUris() { - BlobLayoutInternal layout = new BlobLayoutInternal() - .setRanges(new BlobLayoutRanges() - .setRange(Arrays.asList(new BlobLayoutRangesRangeItem().setStart(0).setEnd(99).setEndpointIndex(0), - new BlobLayoutRangesRangeItem().setStart(100).setEnd(199).setEndpointIndex(1), - new BlobLayoutRangesRangeItem().setStart(200).setEnd(299).setEndpointIndex(2)))) - .setEndpoints(new BlobLayoutEndpoints() - .setEndpoint(Arrays.asList(new BlobLayoutEndpointsEndpointItem().setIndex(0).setValue("host-a:443"), - new BlobLayoutEndpointsEndpointItem().setIndex(1).setValue("https://host-b:443"), - new BlobLayoutEndpointsEndpointItem().setIndex(2).setValue("invalid endpoint")))); + public void transformBlobLayoutRangesConvertsEndpointValuesToUris() throws XMLStreamException { + // The layout models are response-only, so build one the way the service sends it. + String xml = "" + "" + + "" + + "" + + "" + "" + + ""; + BlobLayoutInternal layout; + try (XmlReader reader = XmlReader.fromString(xml)) { + layout = BlobLayoutInternal.fromXml(reader); + } List ranges = ModelHelper.transformBlobLayoutRanges(layout); diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseTests.java index 08fc7f3c166d1..ceb43b0523581 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseTests.java @@ -313,6 +313,16 @@ private static BlobAsyncClient client(HttpClient httpClient) { .buildAsyncClient(); } + @Test + public void getLayoutEmptyBlobNoContentReturnsNoRanges() { + // An empty blob answers Get Blob Layout with 204 and no body. + HttpClient httpClient = request -> Mono.just(new MockHttpResponse(request, 204, + new HttpHeaders().set(HttpHeaderName.ETAG, FIRST_PAGE_ETAG), new byte[0])); + BlobAsyncClientBase client = client(httpClient); + + StepVerifier.create(client.getLayout(null).count()).expectNext(0L).verifyComplete(); + } + @Test public void getLayoutContinuationUsesFirstPageETag() { LayoutPagesHttpClient httpClient = new LayoutPagesHttpClient(true); @@ -448,7 +458,7 @@ public void subsequentPagesReuseInitialETagAndRange() { @Test public void getLayoutWithoutRangeSendsNoRangeHeaderOnAnyPage() { - // Contract: when the caller sets no range, continuation pages must also omit x-ms-range. + // Contract: when the caller sets no range, continuation pages must also omit the Range header. LayoutPagesHttpClient httpClient = new LayoutPagesHttpClient(true); BlobAsyncClientBase client = client(httpClient); @@ -459,8 +469,8 @@ public void getLayoutWithoutRangeSendsNoRangeHeaderOnAnyPage() { assertEquals(2, httpClient.captured.size()); CapturedRequest first = httpClient.captured.get(0); CapturedRequest second = httpClient.captured.get(1); - assertNull(first.range, "Initial page must not send x-ms-range when no range was set"); - assertNull(second.range, "Continuation page must not send x-ms-range when no range was set"); + assertNull(first.range, "Initial page must not send the Range header when no range was set"); + assertNull(second.range, "Continuation page must not send the Range header when no range was set"); assertNull(first.ifMatch); assertEquals(FIRST_PAGE_ETAG, second.ifMatch); } @@ -479,7 +489,7 @@ private static final class CapturedRequest { this.ifNoneMatch = request.getHeaders().getValue(HttpHeaderName.IF_NONE_MATCH); this.ifUnmodifiedSince = request.getHeaders().getValue(HttpHeaderName.IF_UNMODIFIED_SINCE); this.leaseId = request.getHeaders().getValue(HttpHeaderName.fromString("x-ms-lease-id")); - this.range = request.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); + this.range = request.getHeaders().getValue(HttpHeaderName.RANGE); } } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobClientBaseTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobClientBaseTests.java index a104fe691c18d..fcda4f5ea8685 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobClientBaseTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobClientBaseTests.java @@ -852,7 +852,7 @@ public void openSeekableByteChannelReadPropagatesFatalLayoutFetchErrors() throws @DoNotRecord @Test public void getLayoutWithoutRangeSendsNoRangeHeaderOnAnyPage() { - // Contract: when the caller sets no range, continuation pages must also omit x-ms-range. + // Contract: when the caller sets no range, continuation pages must also omit the Range header. LayoutPagesHttpClient httpClient = new LayoutPagesHttpClient(true); BlobClientBase client = client(httpClient); @@ -861,8 +861,8 @@ public void getLayoutWithoutRangeSendsNoRangeHeaderOnAnyPage() { assertEquals(2, httpClient.captured.size()); CapturedRequest first = httpClient.captured.get(0); CapturedRequest second = httpClient.captured.get(1); - assertNull(first.range, "Initial page must not send x-ms-range when no range was set"); - assertNull(second.range, "Continuation page must not send x-ms-range when no range was set"); + assertNull(first.range, "Initial page must not send the Range header when no range was set"); + assertNull(second.range, "Continuation page must not send the Range header when no range was set"); assertNull(first.ifMatch); assertEquals(FIRST_PAGE_ETAG, second.ifMatch); } @@ -954,7 +954,7 @@ private static final class CapturedRequest { this.ifNoneMatch = request.getHeaders().getValue(HttpHeaderName.IF_NONE_MATCH); this.ifUnmodifiedSince = request.getHeaders().getValue(HttpHeaderName.IF_UNMODIFIED_SINCE); this.leaseId = request.getHeaders().getValue(HttpHeaderName.fromString("x-ms-lease-id")); - this.range = request.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); + this.range = request.getHeaders().getValue(HttpHeaderName.RANGE); } } @@ -983,7 +983,7 @@ private SeekableRequestRecord(HttpRequest request) { this.url = request.getUrl().toString(); this.requestHost = request.getUrl().getHost(); this.hostHeader = request.getHeaders().getValue(HttpHeaderName.HOST); - this.rangeHeader = request.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); + this.rangeHeader = request.getHeaders().getValue(HttpHeaderName.RANGE); } } @@ -1120,7 +1120,7 @@ private HttpResponse createLayoutResponse(HttpRequest request) { } private HttpResponse createDataResponse(HttpRequest request) { - String range = request.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); + String range = request.getHeaders().getValue(HttpHeaderName.RANGE); long start = 0L; long end = contentBytes.length - 1L; if (range != null) { diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobDataLocalityDownloadApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobDataLocalityDownloadApiTests.java index 7fae5f7dded2c..0227d5a6a37ad 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobDataLocalityDownloadApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobDataLocalityDownloadApiTests.java @@ -1055,7 +1055,7 @@ public Mono send(HttpRequest request) { dataRequestRecords.add(record); - String rangeHeader = request.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); + String rangeHeader = request.getHeaders().getValue(HttpHeaderName.RANGE); int start = 0; int end = contentBytes.length - 1; if (rangeHeader != null) { diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobApiTests.java index 0d7de17f26a05..a793361e2355d 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlockBlobApiTests.java @@ -18,7 +18,7 @@ import com.azure.storage.blob.BlobServiceVersion; import com.azure.storage.blob.BlobTestBase; import com.azure.storage.blob.BlobUrlParts; -import com.azure.storage.blob.implementation.models.BlockBlobsPutBlobFromUrlHeaders; +import com.azure.storage.blob.implementation.models.BlockBlobsUploadBlobFromUrlHeaders; import com.azure.storage.blob.models.FileShareTokenIntent; import com.azure.storage.blob.models.AccessTier; import com.azure.storage.blob.models.BlobAudience; @@ -1711,11 +1711,10 @@ public void uploadFromUrlAccessTierCold() { @Test public void blockBlobItemNullHeaders() { HttpHeaders headers = new HttpHeaders(); - BlockBlobsPutBlobFromUrlHeaders hd = new BlockBlobsPutBlobFromUrlHeaders(headers); + BlockBlobsUploadBlobFromUrlHeaders hd = new BlockBlobsUploadBlobFromUrlHeaders(headers); - BlockBlobItem blockBlobItem = new BlockBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMD5(), - hd.isXMsRequestServerEncrypted(), hd.getXMsEncryptionKeySha256(), hd.getXMsEncryptionScope(), - hd.getXMsVersionId()); + BlockBlobItem blockBlobItem = new BlockBlobItem(hd.getETag(), hd.getLastModified(), hd.getContentMd5(), + hd.isServerEncrypted(), hd.getEncryptionKeySha256(), hd.getEncryptionScope(), hd.getVersionId()); assertNull(blockBlobItem.getETag()); assertNull(blockBlobItem.getLastModified()); diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseMockFlux.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseMockFlux.java index 6d4443433f2d1..de3da4f6c7d30 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseMockFlux.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseMockFlux.java @@ -164,7 +164,7 @@ public HttpPipelinePolicy asPolicy() { if (tryNumber > 1) { retryIfMatch = context.getHttpRequest().getHeaders().getValue(HttpHeaderName.IF_MATCH); } - HttpHeader rangeHeader = context.getHttpRequest().getHeaders().get("x-ms-range"); + HttpHeader rangeHeader = context.getHttpRequest().getHeaders().get(HttpHeaderName.RANGE); long offset = 0L; Long count = null; if (rangeHeader != null) { diff --git a/sdk/storage/azure-storage-blob/swagger/README.md b/sdk/storage/azure-storage-blob/swagger/README.md deleted file mode 100644 index f9c6497b384d4..0000000000000 --- a/sdk/storage/azure-storage-blob/swagger/README.md +++ /dev/null @@ -1,721 +0,0 @@ -# Azure Blob Storage for Java - -> see https://aka.ms/autorest - -### Setup - -> see https://github.com/Azure/autorest.java - -### Generation -> see https://github.com/Azure/autorest.java/releases for the latest version of autorest -```ps -cd -autorest -``` - -### Code generation settings -``` yaml -use: '@autorest/java@4.1.63' -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/refs/heads/main/specification/storage/data-plane/BlobStorage/stable/2027-03-07/blob.json -java: true -output-folder: ../ -namespace: com.azure.storage.blob -generate-client-as-impl: true -license-header: MICROSOFT_MIT_SMALL -enable-sync-stack: true -optional-constant-as-enum: true -default-http-exception-type: com.azure.storage.blob.implementation.models.BlobStorageExceptionInternal -models-subpackage: implementation.models -custom-types: BlobAccessPolicy,AccessTier,AccountKind,ArchiveStatus,BlobHttpHeaders,BlobContainerItem,BlobContainerItemProperties,BlobContainerEncryptionScope,BlobServiceProperties,BlobType,Block,BlockList,BlockListType,BlockLookupList,ClearRange,CopyStatusType,BlobCorsRule,CpkInfo,CustomerProvidedKeyInfo,DeleteSnapshotsOptionType,EncryptionAlgorithmType,FilterBlobsItem,GeoReplication,GeoReplicationStatusType,KeyInfo,LeaseDurationType,LeaseStateType,LeaseStatusType,ListBlobContainersIncludeType,ListBlobsIncludeItem,BlobAnalyticsLogging,BlobMetrics,PageList,PageRange,PathRenameMode,PublicAccessType,RehydratePriority,BlobRetentionPolicy,SequenceNumberActionType,BlobSignedIdentifier,SkuName,StaticWebsite,BlobErrorCode,BlobServiceStatistics,SyncCopyStatusType,UserDelegationKey,BlobQueryHeaders,GeoReplicationStatus,BlobImmutabilityPolicyMode,BlobCopySourceTagsMode,FileShareTokenIntent -custom-types-subpackage: models -customization-class: src/main/java/BlobStorageCustomization.java -use-input-stream-for-binary: true -disable-client-builder: true -``` - -### /{containerName}/{blob} -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"]["/{containerName}/{blob}"] - transform: > - $.get.description = "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."; - $.delete.description = "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."; - $.get.responses["200"].headers["Content-MD5"]["x-ms-client-name"] = "contentMd5"; - $.get.responses["206"].headers["Content-MD5"]["x-ms-client-name"] = "contentMd5"; -``` - -### /{containerName}/{blob}?comp=appendblock -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"]["/{containerName}/{blob}?comp=appendblock"] - transform: > - $.put.consumes = ["application/octet-stream"]; -``` - -### /{containerName}/{blob}?comp=copy -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"]["/{containerName}/{blob}?comp=copy"] - transform: > - $.put.responses["202"].headers["x-ms-version-id"] = { - "x-ms-client-name": "VersionId", - "type": "string", - "description": "UTC date/time value generated by the service that identifies the version of the blob. This header is returned for requests made against version 2018-11-09 and above." - }; - -``` - -### /{containerName}/{blob}?comp=copy&sync -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"]["/{containerName}/{blob}?comp=copy&sync"] - transform: > - $.put.responses["202"].headers["x-ms-version-id"] = { - "x-ms-client-name": "VersionId", - "type": "string", - "description": "UTC date/time value generated by the service that identifies the version of the blob. This header is returned for requests made against version 2018-11-09 and above." - }; -``` - -### /{containerName}/{blob}?comp=pagelist -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"]["/{containerName}/{blob}?comp=pagelist"] - transform: > - $.get.description = "The Get Page Ranges operation returns the list of valid page ranges for a page blob, version or snapshot of a page blob"; -``` - -### /{containerName}/{blob}?comp=pagelist&diff -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"]["/{containerName}/{blob}?comp=pagelist&diff"] - transform: > - $.get.description = "[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."; -``` - -### BlobItemInternal -``` yaml -directive: -- from: swagger-document - where: $.definitions.BlobItemInternal - transform: > - if (!$.required.includes("VersionId")) { - $.required.push("VersionId"); - $.properties.Metadata.type = "object"; - $.properties.Metadata.additionalProperties = { "type": "string" }; - delete $.properties.Metadata.$ref; - $.properties.VersionId = { "type": "string" }; - } - $.properties.IsPrefix = { "type": "boolean" }; -``` - -### BlobItemPropertiesInternal and ContainerItemProperties -``` yaml -directive: -- from: swagger-document - where: $.definitions - transform: > - if (!$.BlobContainerItemProperties) { - $.BlobContainerItemProperties = $.ContainerProperties; - delete $.ContainerProperties; - // - const etag = $.BlobContainerItemProperties.properties.Etag; - if (etag && !etag["x-ms-client-name"]) { - etag["x-ms-client-name"] = "eTag"; - $.BlobContainerItemProperties.properties.Etag = etag; - } - $.BlobContainerItemProperties.properties.DenyEncryptionScopeOverride["x-ms-client-name"] = "EncryptionScopeOverridePrevented"; - } - if (!$.BlobContainerItem) { - $.BlobContainerItem = $.ContainerItem; - const path = $.BlobContainerItem.properties.Properties.$ref.replace(/[#].*$/, "#/definitions/BlobContainerItemProperties"); - $.BlobContainerItem.properties.Properties.$ref = path; - delete $.ContainerItem; - } - if (!$.BlobItemPropertiesInternal) { - $.BlobItemPropertiesInternal = $.BlobPropertiesInternal; - delete $.BlobPropertiesInternal; - $.BlobItemPropertiesInternal.properties.CustomerProvidedKeySha256 = { "type": "string" } - $.BlobItemPropertiesInternal.properties["Content-MD5"]["x-ms-client-name"] = "contentMd5"; - const etag = $.BlobItemPropertiesInternal.properties.Etag; - if (etag && !etag["x-ms-client-name"]) { - etag["x-ms-client-name"] = "eTag"; - $.BlobItemPropertiesInternal.properties.Etag = etag; - } - } - if ($.BlobItemInternal) { - const path = $.BlobItemInternal.properties.Properties.$ref.replace(/[#].*$/, "#/definitions/BlobItemPropertiesInternal"); - $.BlobItemInternal.properties.Properties.$ref = path; - } -``` - -### BlobMetadata -Deleting out Encryption until https://github.com/Azure/azure-sdk-for-java/issues/5000 is determined. -``` yaml -directive: -- from: swagger-document - where: $.definitions.BlobMetadata - transform: > - delete $.properties -``` - -### ListBlobsFlatSegmentResponse -``` yaml -directive: -- from: swagger-document - where: $.definitions.ListBlobsFlatSegmentResponse - transform: > - if (!$.required.includes("Prefix")) { - $.required.push("Prefix"); - $.required.push("Marker"); - $.required.push("MaxResults"); - $.required.push("Delimiter"); - $.required.push("NextMarker"); - } -``` - -### ListBlobsHierarchySegmentResponse -``` yaml -directive: -- from: swagger-document - where: $.definitions.ListBlobsHierarchySegmentResponse - transform: > - if (!$.required.includes("Prefix")) { - $.required.push("Prefix"); - $.required.push("Marker"); - $.required.push("MaxResults"); - $.required.push("Delimiter"); - $.required.push("NextMarker"); - } -``` - -### KeyInfo -``` yaml -directive: -- from: swagger-document - where: $.parameters.KeyInfo - transform: > - if ($["x-ms-parameter-location"]) { - delete $["x-ms-parameter-location"]; - } -``` - -### Extra parameters -``` yaml -directive: -- from: swagger-document - where: $.parameters - transform: > - if (!$.CacheControl) { - $.CacheControl = { - "name": "Cache-Control", - "x-ms-client-name": "cacheControl", - "in": "header", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Cache control for given resource" - }; - } -``` - -### Add EncryptionKeySha256 to PageBlobUploadPagesFromURLHeaders -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"]["/{containerName}/{blob}?comp=page&update&fromUrl"].put.responses["201"].headers - transform: > - if (!$["x-ms-encryption-key-sha256"]) { - $["x-ms-encryption-key-sha256"] = { - "x-ms-client-name": "EncryptionKeySha256", - "type": "string", - "description": "The SHA-256 hash of the encryption key used to encrypt the pages. This header is only returned when the pages were encrypted with a customer-provided key." - }; - } -``` - -### Add IsServerEncrypted to AppendBlobAppendBlockFromUrlHeaders -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"]["/{containerName}/{blob}?comp=appendblock&fromUrl"].put.responses["201"].headers - transform: > - if (!$["x-ms-request-server-encrypted"]) { - $["x-ms-request-server-encrypted"] = { - "x-ms-client-name": "IsServerEncrypted", - "type": "boolean", - "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." - }; - } -``` - -### Add EncryptionKeySha256 and IsServerEncrypted to PageBlobClearPagesHeaders -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"]["/{containerName}/{blob}?comp=page&clear"].put.responses["201"].headers - transform: > - if (!$["x-ms-request-server-encrypted"]) { - $["x-ms-request-server-encrypted"] = { - "x-ms-client-name": "IsServerEncrypted", - "type": "boolean", - "description": "The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise." - }; - } - if (!$["x-ms-encryption-key-sha256"]) { - $["x-ms-encryption-key-sha256"] = { - "x-ms-client-name": "EncryptionKeySha256", - "type": "string", - "description": "The SHA-256 hash of the encryption key used to encrypt the pages. This header is only returned when the pages were encrypted with a customer-provided key." - }; - } -``` - -### Batch returns a 202 -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"]["/?comp=batch"].post.responses - transform: > - const response = $["200"]; - if (response) { - delete $["200"]; - $["202"] = response; - } -``` - -### Rename ListContainersIncludeType to ListBlobContainersIncludeType -``` yaml -directive: -- from: swagger-document - where: $.parameters.ListContainersInclude - transform: > - $["x-ms-client-name"] = "ListBlobContainersIncludeType"; - $["items"]["x-ms-enum"].name = "ListBlobContainersIncludeType"; -``` - -### /?comp=list -``` yaml -directive: -- from: swagger-document - where: $.definitions - transform: > - if (!$.BlobContainersSegment) { - $.BlobContainersSegment = $.ListContainersSegmentResponse; - delete $.ListContainersSegmentResponse; - $.BlobContainersSegment["x-az-public"] = false; - $.BlobContainersSegment.required.push("NextMarker"); - $.BlobContainersSegment.properties.BlobContainerItems = $.BlobContainersSegment.properties.ContainerItems; - delete $.BlobContainersSegment.properties.ContainerItems; - const path = $.BlobContainersSegment.properties.BlobContainerItems.items.$ref.replace(/[#].*$/, "#/definitions/BlobContainerItem"); - $.BlobContainersSegment.properties.BlobContainerItems.items.$ref = path; - } -- from: swagger-document - where: $["x-ms-paths"]["/?comp=list"] - transform: > - const def = $.get.responses["200"].schema; - if (def && def["$ref"] && !def["$ref"].endsWith("BlobContainersSegment")) { - const path = def["$ref"].replace(/[#].*$/, "#/definitions/BlobContainersSegment"); - $.get.responses["200"].schema = { "$ref": path }; - } - $.get.operationId = "Service_ListBlobContainersSegment"; -``` - -### GeoReplication -``` yaml -directive: -- from: swagger-document - where: $.definitions.GeoReplication.properties.Status - transform: > - $["x-ms-enum"].name = "GeoReplicationStatus"; -``` - -### BlobErrorCode -``` yaml -directive: -- from: swagger-document - where: $.definitions.ErrorCode - transform: > - $["x-ms-enum"].name = "BlobErrorCode"; -``` - -### Typo Fixed in ErrorCode Removed Enum Value -``` yaml -directive: -- from: swagger-document - where: $.definitions.ErrorCode - transform: > - $.enum.push("SnaphotOperationRateExceeded"); - $.enum.push("IncrementalCopyOfEralierVersionSnapshotNotAllowed"); - $.enum.push("IncrementalCopyOfEarlierVersionSnapshotNotAllowed"); -``` - -### BlobServiceProperties, BlobAnalyticsLogging, BlobMetrics, BlobCorsRule, and BlobRetentionPolicy -``` yaml -directive: -- rename-model: - from: Logging - to: BlobAnalyticsLogging -- rename-model: - from: Metrics - to: BlobMetrics -- rename-model: - from: CorsRule - to: BlobCorsRule -- rename-model: - from: RetentionPolicy - to: BlobRetentionPolicy -- rename-model: - from: StorageServiceProperties - to: BlobServiceProperties - -- from: swagger-document - where: $.definitions - transform: > - $.BlobMetrics.properties.IncludeAPIs["x-ms-client-name"] = "IncludeApis"; - delete $.BlobRetentionPolicy.properties.AllowPermanentDelete; - $.BlobServiceProperties.xml = {"name": "StorageServiceProperties"}; - $.BlobCorsRule.xml = {"name": "CorsRule"}; - -- from: swagger-document - where: $.parameters - transform: > - $.StorageServiceProperties.name = "BlobServiceProperties"; -``` - -### BlobServiceStatistics and BlobPrefixInternal -``` yaml -directive: -- rename-model: - from: StorageServiceStats - to: BlobServiceStatistics -- rename-model: - from: BlobPrefix - to: BlobPrefixInternal - -- from: swagger-document - where: $.definitions - transform: > - $.BlobServiceStatistics.xml = { "name": "StorageServiceStats" }; - $.BlobPrefixInternal.xml = { "name": "BlobPrefix" }; -``` - -### BlobAccessPolicy and BlobSignedIdentifier -``` yaml -directive: -- rename-model: - from: SignedIdentifier - to: BlobSignedIdentifier -- rename-model: - from: AccessPolicy - to: BlobAccessPolicy -- from: swagger-document - where: $.definitions - transform: > - $.BlobAccessPolicy.properties.Start["x-ms-client-name"] = "StartsOn"; - $.BlobAccessPolicy.properties.Expiry["x-ms-client-name"] = "ExpiresOn"; - $.BlobAccessPolicy.properties.Permission["x-ms-client-name"] = "Permissions"; -``` - -### Rename BlobHttpHeaders to BlobHttpHeader -``` yaml -directive: -- from: swagger-document - where: $.parameters - transform: > - $.BlobCacheControl["x-ms-parameter-grouping"].name = "blob-http-headers"; - $.BlobCacheControl["x-ms-client-name"] = "cacheControl"; - $.BlobContentDisposition["x-ms-parameter-grouping"].name = "blob-http-headers"; - $.BlobContentDisposition["x-ms-client-name"] = "contentDisposition"; - $.BlobContentEncoding["x-ms-parameter-grouping"].name = "blob-http-headers"; - $.BlobContentEncoding["x-ms-client-name"] = "contentEncoding"; - $.BlobContentLanguage["x-ms-parameter-grouping"].name = "blob-http-headers"; - $.BlobContentLanguage["x-ms-client-name"] = "contentLanguage"; - $.BlobContentMD5["x-ms-parameter-grouping"].name = "blob-http-headers"; - $.BlobContentMD5["x-ms-client-name"] = "contentMd5"; - $.BlobContentMD5.description = "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."; - $.BlobContentType["x-ms-parameter-grouping"].name = "blob-http-headers"; - $.BlobContentType["x-ms-client-name"] = "contentType"; -``` - -### Rename UserDelegationKey SignedOid and SignedTid -``` yaml -directive: -- from: swagger-document - where: $.definitions.UserDelegationKey - transform: > - $.properties.SignedOid["x-ms-client-name"] = "signedObjectId"; - $.properties.SignedTid["x-ms-client-name"] = "signedTenantId"; - $.properties.SignedDelegatedUserTid["x-ms-client-name"] = "signedDelegatedUserTenantId"; -``` - -### Rename KeyInfo DelegatedUserTid -``` yaml -directive: -- from: swagger-document - where: $.definitions.KeyInfo - transform: > - $.properties.DelegatedUserTid["x-ms-client-name"] = "delegatedUserTenantId"; -``` - -### Remove AccessConditions parameter groupings -``` yaml -directive: -- from: swagger-document - where: $.parameters - transform: > - delete $.SourceIfMatch["x-ms-parameter-grouping"]; - delete $.SourceIfModifiedSince["x-ms-parameter-grouping"]; - delete $.SourceIfNoneMatch["x-ms-parameter-grouping"]; - delete $.SourceIfUnmodifiedSince["x-ms-parameter-grouping"]; - delete $.SourceIfTags["x-ms-parameter-grouping"]; -- from: swagger-document - where: $.parameters - transform: > - delete $.IfMatch["x-ms-parameter-grouping"]; - delete $.IfModifiedSince["x-ms-parameter-grouping"]; - delete $.IfNoneMatch["x-ms-parameter-grouping"]; - delete $.IfUnmodifiedSince["x-ms-parameter-grouping"]; - delete $.IfTags["x-ms-parameter-grouping"]; -- from: swagger-document - where: $.parameters - transform: > - delete $.IfBlobMatch["x-ms-parameter-grouping"]; - delete $.IfBlobModifiedSince["x-ms-parameter-grouping"]; - delete $.IfBlobNoneMatch["x-ms-parameter-grouping"]; - delete $.IfBlobUnmodifiedSince["x-ms-parameter-grouping"]; -- from: swagger-document - where: $.parameters - transform: > - delete $.BlobConditionAppendPos["x-ms-parameter-grouping"]; - delete $.BlobConditionMaxSize["x-ms-parameter-grouping"]; -- from: swagger-document - where: $.parameters - transform: > - delete $.IfSequenceNumberEqualTo["x-ms-parameter-grouping"]; - delete $.IfSequenceNumberLessThan["x-ms-parameter-grouping"]; - delete $.IfSequenceNumberLessThanOrEqualTo["x-ms-parameter-grouping"]; -- from: swagger-document - where: $.parameters - transform: > - delete $.LeaseIdOptional["x-ms-parameter-grouping"]; -``` - -### Rename container-cpk-scope-info to blob-container-encryption-scope -``` yaml -directive: -- from: swagger-document - where: $.parameters - transform: > - $.DenyEncryptionScopeOverride["x-ms-client-name"] = "EncryptionScopeOverridePrevented"; - $.DefaultEncryptionScope["x-ms-parameter-grouping"]["name"] = "blob-container-encryption-scope"; - $.DenyEncryptionScopeOverride["x-ms-parameter-grouping"]["name"] = "blob-container-encryption-scope"; -``` - -### Rename cpk-scope-info to encryption-scope -``` yaml -directive: -- from: swagger-document - where: $.parameters - transform: > - $.EncryptionScope["x-ms-parameter-grouping"]["name"] = "encryption-scope"; -``` - -### Block size int to long transition -``` yaml -directive: -- from: swagger-document - where: $.definitions.Block - transform: > - $.properties.Size["x-ms-client-name"] = "sizeLong"; - $.properties.Size["format"] = "int64"; - $.properties.SizeInt = { "type" : "integer" }; - $.required.push("SizeInt"); -``` - -### /{containerName}/{blob}?comp=query -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"]["/{containerName}/{blob}?comp=query"] - transform: > - $.post.responses["200"].headers["Content-MD5"]["x-ms-client-name"] = "contentMd5"; - $.post.responses["206"].headers["Content-MD5"]["x-ms-client-name"] = "contentMd5"; - $.post.responses["200"].headers["x-ms-blob-content-md5"]["x-ms-client-name"] = "blobContentMd5"; - $.post.responses["206"].headers["x-ms-blob-content-md5"]["x-ms-client-name"] = "blobContentMd5"; - $.post.responses["200"].headers["x-ms-server-encrypted"]["x-ms-client-name"] = "serverEncrypted"; - $.post.responses["206"].headers["x-ms-server-encrypted"]["x-ms-client-name"] = "serverEncrypted"; -``` - -### Hide TagValue in FilterBlobItem -``` yaml -directive: -- from: swagger-document - where: $.definitions - transform: > - delete $.FilterBlobItem.properties.TagValue; -``` - -### Service_ListContainersSegment x-ms-pageable itemName -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"]["/?comp=list"].get - transform: > - $["x-ms-pageable"].itemName = "BlobContainerItems"; -``` - - -### Delete Container_ListBlobFlatSegment x-ms-pageable as autorest can't recognize the itemName for this -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"]["/{containerName}?restype=container&comp=list&flat"].get - transform: > - delete $["x-ms-pageable"]; -``` - -### Delete Container_ListBlobHierarchySegment x-ms-pageable as autorest can't recognize the itemName for this -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"]["/{containerName}?restype=container&comp=list&hierarchy"].get - transform: > - delete $["x-ms-pageable"]; -``` - -### BlobDeleteType expandable string enum -``` yaml -directive: -- from: swagger-document - where: $.parameters.BlobDeleteType - transform: > - $["x-ms-enum"].modelAsString = true; -``` - -### Delete PageBlob_GetPageRanges x-ms-pageable as autorest can't recognize the itemName for this -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"]["/{containerName}/{blob}?comp=pagelist"].get - transform: > - delete $["x-ms-pageable"]; -``` - -### Delete PageList_GetPageRangesDiff x-ms-pageable as autorest can't recognize the itemName for this -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"]["/{containerName}/{blob}?comp=pagelist&diff"].get - transform: > - delete $["x-ms-pageable"]; -``` - -### Delete the Apache Arrow list x-ms-pageable extensions as autorest can't recognize the itemName for their binary responses -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"]["/{containerName}?restype=container&comp=list&flat&arrow"].get - transform: > - delete $["x-ms-pageable"]; -- from: swagger-document - where: $["x-ms-paths"]["/{containerName}?restype=container&comp=list&hierarchy&arrow"].get - transform: > - delete $["x-ms-pageable"]; -``` - -### BlobCopySourceTags expandable string enum and rename -``` yaml -directive: -- from: swagger-document - where: $.parameters.CopySourceTags - transform: > - $["x-ms-enum"].modelAsString = true; - $["x-ms-enum"].name = "BlobCopySourceTagsMode"; -``` - -### Fix putBlobFromUrl Apostrophe -``` yaml -directive: -- from: swagger-document - where: $["x-ms-paths"]["/{containerName}/{blob}?BlockBlob&fromUrl"].put - transform: > - $.description = "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."; -``` - -### Remove source CPK parameter grouping -``` yaml -directive: -- from: swagger-document - where: $.parameters - transform: > - delete $.SourceEncryptionKey["x-ms-parameter-grouping"]; - delete $.SourceEncryptionKeySha256["x-ms-parameter-grouping"]; - delete $.SourceEncryptionAlgorithm["x-ms-parameter-grouping"]; -``` - -### Rename ListBlobsIncludeItem Enums to be underscore cased -```yaml -directive: - - from: swagger-document - where: $.parameters.ListBlobsInclude - transform: > - $.items["x-ms-enum"].values = [ - { - "value": "copy", - "name": "copy", - "description": "" - }, - { - "value": "deleted", - "name": "deleted", - "description": "" - }, - { - "value": "metadata", - "name": "metadata", - "description": "" - }, - { - "value": "snapshots", - "name": "snapshots", - "description": "" - }, - { - "value": "uncommittedblobs", - "name": "uncommittedblobs", - "description": "" - }, - { - "value": "versions", - "name": "versions", - "description": "" - }, - { - "value": "tags", - "name": "tags", - "description": "" - }, - { - "value": "immutabilitypolicy", - "name": "immutability_policy", - "description": "" - }, - { - "value": "legalhold", - "name": "legal_hold", - "description": "" - }, - { - "value": "deletedwithversions", - "name": "deleted_with_versions", - "description": "" - } - ]; -``` diff --git a/sdk/storage/azure-storage-blob/swagger/Update-Codegeneration.ps1 b/sdk/storage/azure-storage-blob/swagger/Update-Codegeneration.ps1 deleted file mode 100644 index e9146f384a427..0000000000000 --- a/sdk/storage/azure-storage-blob/swagger/Update-Codegeneration.ps1 +++ /dev/null @@ -1 +0,0 @@ -& (Join-Path $PSScriptRoot ".." ".." ".." ".." eng scripts Invoke-Codegeneration.ps1) $PSScriptRoot diff --git a/sdk/storage/azure-storage-blob/swagger/package.json b/sdk/storage/azure-storage-blob/swagger/package.json deleted file mode 100644 index 0967ef424bce6..0000000000000 --- a/sdk/storage/azure-storage-blob/swagger/package.json +++ /dev/null @@ -1 +0,0 @@ -{} 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 deleted file mode 100644 index b8b2c1f96395d..0000000000000 --- a/sdk/storage/azure-storage-blob/swagger/src/main/java/BlobStorageCustomization.java +++ /dev/null @@ -1,320 +0,0 @@ -// 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.LibraryCustomization; -import com.azure.autorest.customization.PackageCustomization; -import com.github.javaparser.ParseProblemException; -import com.github.javaparser.StaticJavaParser; -import com.github.javaparser.ast.Modifier; -import com.github.javaparser.ast.NodeList; -import com.github.javaparser.ast.body.MethodDeclaration; -import com.github.javaparser.ast.body.Parameter; -import com.github.javaparser.ast.stmt.BlockStmt; -import com.github.javaparser.ast.stmt.CatchClause; -import com.github.javaparser.ast.stmt.Statement; -import com.github.javaparser.ast.stmt.TryStmt; -import com.github.javaparser.ast.type.ClassOrInterfaceType; -import com.github.javaparser.ast.type.Type; -import com.github.javaparser.javadoc.Javadoc; -import com.github.javaparser.javadoc.JavadocBlockTag; -import com.github.javaparser.javadoc.description.JavadocDescription; -import org.slf4j.Logger; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.function.Function; - -/** - * Customization class for Blob Storage. - */ -public class BlobStorageCustomization extends Customization { - @Override - public void customize(LibraryCustomization customization, Logger logger) { - // Implementation models customizations - PackageCustomization implementationModels = customization.getPackage("com.azure.storage.blob.implementation.models"); - - renameInternalBlobLayout(customization); - - // Models customizations - PackageCustomization models = customization.getPackage("com.azure.storage.blob.models"); - - models.getClass("PageList").customizeAst(ast -> { - ast.addImport("com.azure.storage.blob.implementation.models.PageListHelper"); - - ast.getClassByName("PageList").ifPresent(clazz -> { - clazz.getMethodsByName("getNextMarker").forEach(method -> method.setModifiers(Modifier.Keyword.PRIVATE)); - clazz.getMethodsByName("setNextMarker").forEach(method -> method.setModifiers(Modifier.Keyword.PRIVATE)); - - // Add Accessor to PageList - clazz.setMembers(clazz.getMembers() - .addFirst(StaticJavaParser.parseBodyDeclaration("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);" - + " }" - + "}); }"))); - }); - }); - - models.getClass("BlobContainerEncryptionScope").customizeAst(ast -> ast.getClassByName("BlobContainerEncryptionScope") - .ifPresent(clazz -> clazz.getMethodsByName("isEncryptionScopeOverridePrevented").forEach(method -> { - method.setType("boolean"); - // Wrap the existing return expression (ex, if "return foo;", "foo" is the expression) with - // "Boolean.TRUE.equals". - modifyReturnExpression(method, exprString -> "Boolean.TRUE.equals(" + exprString + ")"); - }))); - - models.getClass("BlobContainerItemProperties").customizeAst(ast -> ast.getClassByName("BlobContainerItemProperties") - .ifPresent(clazz -> { - clazz.getMethodsByName("isEncryptionScopeOverridePrevented").forEach(method -> { - method.setType("boolean"); - // Wrap the existing return expression (ex, if "return foo;", "foo" is the expression) with - // "Boolean.TRUE.equals". - modifyReturnExpression(method, exprString -> "Boolean.TRUE.equals(" + exprString + ")"); - }); - - clazz.getMethodsByName("setIsImmutableStorageWithVersioningEnabled") - .forEach(method -> method.setName("setImmutableStorageWithVersioningEnabled")); - - clazz.getMethodsByName("setEncryptionScopeOverridePrevented") - .forEach(method -> method.getParameter(0).setType("boolean")); - })); - - // Block - Generator - models.getClass("Block").customizeAst(ast -> ast.getClassByName("Block").ifPresent(clazz -> { - clazz.getMethodsByName("getSizeInt").forEach(method -> method.setName("getSize") - .addMarkerAnnotation("Deprecated") - .setType("int") - .setBody(StaticJavaParser.parseBlock("{ return (int) this.sizeLong; }")) - .getJavadoc().ifPresent(javadoc -> method.setJavadocComment(javadoc - .addBlockTag("deprecated", "Use {@link #getSizeLong()}")))); - - clazz.getMethodsByName("setSizeInt").forEach(method -> { - method.setName("setSize") - .addMarkerAnnotation("Deprecated") - .getJavadoc().ifPresent(javadoc -> method.setJavadocComment(javadoc - .addBlockTag("deprecated", "Use {@link #setSizeLong(long)}"))); - - // Update the return from "this" to "this.setSizeLong(sizeInt)" - modifyReturnExpression(method, exprString -> exprString + ".setSizeLong(sizeInt)"); - }); - })); - - // BlobErrorCode - // Fix typo - String blobErrorCodeFile = "src/main/java/com/azure/storage/blob/models/BlobErrorCode.java"; - String blobErrorCodeFileContent = customization.getRawEditor().getFileContent(blobErrorCodeFile); - blobErrorCodeFileContent = blobErrorCodeFileContent.replace("SnaphotOperationRateExceeded", "SnapshotOperationRateExceeded"); - customization.getRawEditor().replaceFile(blobErrorCodeFile, blobErrorCodeFileContent); - // deprecate - models.getClass("BlobErrorCode").customizeAst(ast -> ast.getClassByName("BlobErrorCode").ifPresent(clazz -> { - clazz.getFieldByName("SNAPHOT_OPERATION_RATE_EXCEEDED").ifPresent(field -> field.addMarkerAnnotation("Deprecated") - .getJavadoc().ifPresent(javadoc -> field.setJavadocComment(javadoc - .addBlockTag("deprecated", "Please use {@link BlobErrorCode#SNAPSHOT_OPERATION_RATE_EXCEEDED}")))); - - clazz.getFieldByName("INCREMENTAL_COPY_OF_ERALIER_VERSION_SNAPSHOT_NOT_ALLOWED").ifPresent(field -> - field.addMarkerAnnotation("Deprecated").getJavadoc().ifPresent(javadoc -> field.setJavadocComment( - javadoc.addBlockTag("deprecated", - "Please use {@link BlobErrorCode#INCREMENTAL_COPY_OF_EARLIER_SNAPSHOT_NOT_ALLOWED}")))); - - clazz.getFieldByName("INCREMENTAL_COPY_OF_EARLIER_VERSION_SNAPSHOT_NOT_ALLOWED").ifPresent(field -> - field.addMarkerAnnotation("Deprecated").getJavadoc().ifPresent(javadoc -> field.setJavadocComment( - javadoc.addBlockTag("deprecated", - "Please use {@link BlobErrorCode#INCREMENTAL_COPY_OF_EARLIER_SNAPSHOT_NOT_ALLOWED}")))); - })); - - //QueryFormat - customizeQueryFormat(implementationModels.getClass("QueryFormat")); - - updateImplToMapInternalException(customization.getPackage("com.azure.storage.blob.implementation")); - - implementationModels.getClass("QueryRequest").customizeAst(ast -> ast.getClassByName("QueryRequest").ifPresent(clazz -> { - clazz.getFieldByName("queryType").ifPresent(field -> field.removeModifier(Modifier.Keyword.FINAL)); - clazz.addMethod("setQueryType", Modifier.Keyword.PUBLIC) - .setType("QueryRequest") - .addParameter("String", "queryType") - .setBody(StaticJavaParser.parseBlock("{ this.queryType = queryType; return this; }")) - .setJavadocComment(new Javadoc(JavadocDescription.parseText("Set the queryType property: Required. The type of the provided query expression.")) - .addBlockTag("param", "queryType", "the queryType value to set.") - .addBlockTag("return", "the QueryRequest object itself.")); - })); - - implementationModels.getClass("BlobSignedIdentifierWrapper").customizeAst(ast -> ast.getClassByName("BlobSignedIdentifierWrapper") - .ifPresent(clazz -> { - Javadoc baseJavadoc = new Javadoc(JavadocDescription.parseText("Reads an instance of BlobSignedIdentifierWrapper from the XmlReader.")) - .addBlockTag("param", "xmlReader", "The XmlReader being read.") - .addBlockTag("return", "An instance of BlobSignedIdentifierWrapper if the XmlReader was pointing " - + "to an instance of it, or null if it was pointing to XML null.") - .addBlockTag("throws", "XMLStreamException", "If an error occurs while reading the BlobSignedIdentifierWrapper."); - - clazz.getMethodsBySignature("fromXml", "XmlReader") - .forEach(method -> method.setJavadocComment(baseJavadoc)); - - clazz.getMethodsBySignature("fromXml", "XmlReader", "String").forEach(method -> { - baseJavadoc.getBlockTags().add(1, JavadocBlockTag.createParamBlockTag("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.")); - method.setJavadocComment(baseJavadoc); - }); - })); - } - - private static void renameInternalBlobLayout(LibraryCustomization customization) { - String oldName = "BlobLayout"; - String newName = "BlobLayoutInternal"; - for (Map.Entry entry - : new ArrayList<>(customization.getRawEditor().getContents().entrySet())) { - String fileName = entry.getKey(); - if (!fileName.endsWith(".java") || !fileName.contains("com/azure/storage/blob/implementation/")) { - continue; - } - - String content = entry.getValue(); - if (!content.contains(oldName)) { - continue; - } - - content = content.replaceAll("\\b" + oldName + "\\b", newName) - .replace("\"" + newName + "\"", "\"" + oldName + "\""); - if (fileName.endsWith("implementation/models/BlobLayout.java")) { - String newFileName = fileName.substring(0, fileName.length() - "BlobLayout.java".length()) - + newName + ".java"; - customization.getRawEditor().removeFile(fileName); - customization.getRawEditor().addFile(newFileName, content); - } else { - customization.getRawEditor().replaceFile(fileName, content); - } - } - } - - private static void modifyReturnExpression(MethodDeclaration method, Function modifier) { - method.getBody().flatMap(body -> body.getStatements().stream().filter(Statement::isReturnStmt) - .map(Statement::asReturnStmt).findFirst()) - .ifPresent(statement -> { - String replace = modifier.apply(statement.getExpression().get().toString()); - statement.setExpression(StaticJavaParser.parseExpression(replace)); - }); - } - - 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); - } - - /** - * Customizes the implementation classes that will perform calls to the service. The following logic is used: - *

- * - Check for the return of the method not equaling to PagedFlux, PagedIterable, PollerFlux, or SyncPoller. Those - * types wrap other APIs and those APIs being update is the correct change. - * - For asynchronous methods, add a call to - * {@code .onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)} to handle - * mapping BlobStorageExceptionInternal to BlobStorageException. - * - For synchronous methods, wrap the return statement in a try-catch block that catches - * BlobStorageExceptionInternal and rethrows {@code ModelHelper.mapToBlobStorageException(e)}. Or, for void methods - * wrap the last statement. - * - * @param implPackage The implementation package. - */ - private static void updateImplToMapInternalException(PackageCustomization implPackage) { - List implsToUpdate = Arrays.asList("AppendBlobsImpl", "BlobsImpl", "BlockBlobsImpl", "ContainersImpl", - "PageBlobsImpl", "ServicesImpl"); - for (String implToUpdate : implsToUpdate) { - implPackage.getClass(implToUpdate).customizeAst(ast -> { - ast.addImport("com.azure.storage.blob.implementation.util.ModelHelper"); - ast.addImport("com.azure.storage.blob.models.BlobStorageException"); - ast.addImport("com.azure.storage.blob.implementation.models.BlobStorageExceptionInternal"); - ast.getClassByName(implToUpdate).ifPresent(clazz -> { - clazz.getFields(); - - clazz.getMethods().forEach(methodDeclaration -> { - Type returnType = methodDeclaration.getType(); - // The way code generation works we only need to update the methods that have a class return type. - // As non-class return types, such as "void", call into the Response methods. - if (!returnType.isClassOrInterfaceType()) { - return; - } - - ClassOrInterfaceType returnTypeClass = returnType.asClassOrInterfaceType(); - String returnTypeName = returnTypeClass.getNameAsString(); - if (returnTypeName.equals("PagedFlux") || returnTypeName.equals("PagedIterable") - || returnTypeName.equals("PollerFlux") || returnTypeName.equals("SyncPoller")) { - return; - } - - if (returnTypeName.equals("Mono") || returnTypeName.equals("Flux")) { - addErrorMappingToAsyncMethod(methodDeclaration); - } else { - addErrorMappingToSyncMethod(methodDeclaration); - } - }); - }); - }); - } - } - - private static void addErrorMappingToAsyncMethod(MethodDeclaration method) { - BlockStmt body = method.getBody().get(); - - // Bit of hack to insert the 'onErrorMap' in the right location. - // Unfortunately, 'onErrorMap' returns which for some calls breaks typing, such as Void -> Object or - // PagedResponse -> PagedResponseBase. So, 'onErrorMap' needs to be inserted after the first method call. - // To do this, we track the first found '(' and the associated closing ')' to insert 'onErrorMap' after the ')'. - // So, 'service.methodCall(parameters).map()' becomes 'service.methodCall(parameters).onErrorMap().map()'. - String originalReturnStatement = body.getStatement(body.getStatements().size() - 1).asReturnStmt() - .getExpression().get().toString(); - int insertionPoint = findAsyncOnErrorMapInsertionPoint(originalReturnStatement); - String newReturnStatement = "return " + originalReturnStatement.substring(0, insertionPoint) - + ".onErrorMap(BlobStorageExceptionInternal.class, ModelHelper::mapToBlobStorageException)" - + originalReturnStatement.substring(insertionPoint) + ";"; - try { - Statement newReturn = StaticJavaParser.parseStatement(newReturnStatement); - body.getStatements().set(body.getStatements().size() - 1, newReturn); - } catch (ParseProblemException ex) { - throw new RuntimeException("Failed to parse: " + newReturnStatement, ex); - } - } - - private static int findAsyncOnErrorMapInsertionPoint(String returnStatement) { - int openParenthesis = 0; - int closeParenthesis = 0; - for (int i = 0; i < returnStatement.length(); i++) { - char c = returnStatement.charAt(i); - if (c == '(') { - openParenthesis++; - } else if (c == ')') { - closeParenthesis++; - if (openParenthesis == closeParenthesis) { - return i + 1; - } - } - } - return -1; - } - - private static void addErrorMappingToSyncMethod(MethodDeclaration method) { - // Turn the entire method into a BlockStmt that will be used as the try block. - BlockStmt tryBlock = method.getBody().get(); - BlockStmt catchBlock = new BlockStmt(new NodeList<>(StaticJavaParser.parseStatement( - "throw ModelHelper.mapToBlobStorageException(internalException);"))); - Parameter catchParameter = new Parameter().setType("BlobStorageExceptionInternal") - .setName("internalException"); - CatchClause catchClause = new CatchClause(catchParameter, catchBlock); - TryStmt tryCatchMap = new TryStmt(tryBlock, new NodeList<>(catchClause), null); - - // Replace the last statement with the try-catch block. - method.setBody(new BlockStmt(new NodeList<>(tryCatchMap))); - } -} diff --git a/sdk/storage/azure-storage-blob/tsp-location.yaml b/sdk/storage/azure-storage-blob/tsp-location.yaml new file mode 100644 index 0000000000000..f58ce3f20153b --- /dev/null +++ b/sdk/storage/azure-storage-blob/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/storage/data-plane/BlobStorage +commit: 042215770c9fa3d3ab1ea8053c96d0ca631f90f4 +repo: ibrandes/azure-rest-api-specs +additionalDirectories: [] diff --git a/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/policy/MockRetryRangeResponsePolicy.java b/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/policy/MockRetryRangeResponsePolicy.java index dacf97f4cda34..9a7d44c929032 100644 --- a/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/policy/MockRetryRangeResponsePolicy.java +++ b/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/policy/MockRetryRangeResponsePolicy.java @@ -4,6 +4,7 @@ package com.azure.storage.common.test.shared.policy; import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipelineCallContext; import com.azure.core.http.HttpPipelineNextPolicy; import com.azure.core.http.HttpResponse; @@ -14,6 +15,11 @@ import java.io.IOException; import java.util.Objects; +/** + * Fails the download response stream and asserts the retried request asked for the expected range. File share sends + * the standard {@code Range} header while blob sends {@code x-ms-range}; both are accepted, and {@code x-ms-range} wins + * when both are present, matching the service's precedence. + */ public class MockRetryRangeResponsePolicy implements HttpPipelinePolicy { private static final HttpHeaderName X_MS_RANGE = HttpHeaderName.fromString("x-ms-range"); @@ -26,7 +32,13 @@ public MockRetryRangeResponsePolicy(String rangeMatch) { @Override public Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { return next.process().flatMap(response -> { - if (!Objects.equals(response.getRequest().getHeaders().getValue(X_MS_RANGE), rangeMatch)) { + HttpHeaders requestHeaders = response.getRequest().getHeaders(); + String range = requestHeaders.getValue(X_MS_RANGE); + if (range == null) { + range = requestHeaders.getValue(HttpHeaderName.RANGE); + } + + if (!Objects.equals(range, rangeMatch)) { return Mono.error(new IllegalArgumentException("The range header was not set correctly on retry.")); } else { // ETag can be a dummy value. It's not validated, but DownloadResponse requires one diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DataLakeDataLocalityOptionsTests.java b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DataLakeDataLocalityOptionsTests.java index 5edfa627e027c..79ecec7e1ed4d 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DataLakeDataLocalityOptionsTests.java +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DataLakeDataLocalityOptionsTests.java @@ -411,7 +411,7 @@ public Mono send(HttpRequest request) { } dataRequestCount++; - String rangeHeader = request.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); + String rangeHeader = request.getHeaders().getValue(HttpHeaderName.RANGE); int start = 0; int end = DOWNLOAD_BODY.length - 1; if (rangeHeader != null) { diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DataLakeTestBase.java b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DataLakeTestBase.java index 8001d2f785eb7..d9c34dfb3727b 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DataLakeTestBase.java +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DataLakeTestBase.java @@ -169,7 +169,8 @@ public void beforeTest() { "x-ms-source-if-unmodified-since", "x-ms-source-lease-id", "x-ms-encryption-key-sha256", "x-ms-blob-if-modified-since", "x-ms-blob-if-unmodified-since")) .setQueryOrderingIgnored(true) - .setIgnoredQueryParameters(Arrays.asList("sv")))); + .setIgnoredQueryParameters(Arrays.asList("sv")) + .setExcludedHeaders(Collections.singletonList("Accept")))); primaryDataLakeServiceClient = getServiceClient(ENVIRONMENT.getDataLakeAccount()); primaryDataLakeServiceAsyncClient = getServiceAsyncClient(ENVIRONMENT.getDataLakeAccount()); From f8d2f774deae73233cf1047ca0e838ea06a59445 Mon Sep 17 00:00:00 2001 From: Isabelle Date: Thu, 19 Nov 2026 14:35:04 -0800 Subject: [PATCH 02/11] Pin azure-storage-blob tsp-location to the BlobStorage Java spec commit Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- sdk/storage/azure-storage-blob/tsp-location.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blob/tsp-location.yaml b/sdk/storage/azure-storage-blob/tsp-location.yaml index f58ce3f20153b..bf6f3b048f538 100644 --- a/sdk/storage/azure-storage-blob/tsp-location.yaml +++ b/sdk/storage/azure-storage-blob/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/storage/data-plane/BlobStorage -commit: 042215770c9fa3d3ab1ea8053c96d0ca631f90f4 +commit: 8aecf95830ba747a9af2aeef3ed5d26af8a7b3d8 repo: ibrandes/azure-rest-api-specs additionalDirectories: [] From 907b5331d242cd773c57a8203d8db08b4a17cf07 Mon Sep 17 00:00:00 2001 From: Isabelle Date: Thu, 19 Nov 2026 15:46:42 -0800 Subject: [PATCH 03/11] Regenerate azure-storage-blob native-image reflect-config Regenerated with eng/scripts/generate_reflect_config.py. Removes entries for classes that no longer exist and adds the TypeSpec-generated types that are accessed reflectively: models the generated XmlSerializer reads through fromXml (BlobLayoutInternal, BlobSignedIdentifiers, CreateSessionResponse) and the BlobStorageErrorException/BlobStorageError error mapping. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../azure-storage-blob/reflect-config.json | 570 +++++++++++++++--- 1 file changed, 480 insertions(+), 90 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/resources/META-INF/native-image/com.azure/azure-storage-blob/reflect-config.json b/sdk/storage/azure-storage-blob/src/main/resources/META-INF/native-image/com.azure/azure-storage-blob/reflect-config.json index 58e67b3640e21..c8d928c9c5b22 100644 --- a/sdk/storage/azure-storage-blob/src/main/resources/META-INF/native-image/com.azure/azure-storage-blob/reflect-config.json +++ b/sdk/storage/azure-storage-blob/src/main/resources/META-INF/native-image/com.azure/azure-storage-blob/reflect-config.json @@ -83,6 +83,24 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "name": "com.azure.storage.blob.SessionContext", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.AppendBlobAsyncClientInternal", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.AppendBlobClientInternal", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "name": "com.azure.storage.blob.implementation.AppendBlobsImpl", "allDeclaredConstructors": true, @@ -96,7 +114,37 @@ "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder", + "name": "com.azure.storage.blob.implementation.BlobAsyncClientInternal", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.BlobClientInternal", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.BlobContainerAsyncClientInternal", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.BlobContainerClientInternal", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.BlobServiceAsyncClientInternal", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.BlobServiceClientInternal", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true @@ -107,6 +155,18 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "name": "com.azure.storage.blob.implementation.BlockBlobAsyncClientInternal", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.BlockBlobClientInternal", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "name": "com.azure.storage.blob.implementation.BlockBlobsImpl", "allDeclaredConstructors": true, @@ -119,6 +179,18 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "name": "com.azure.storage.blob.implementation.PageBlobAsyncClientInternal", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.PageBlobClientInternal", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "name": "com.azure.storage.blob.implementation.PageBlobsImpl", "allDeclaredConstructors": true, @@ -132,7 +204,19 @@ "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.SignedIdentifiersWrapper", + "name": "com.azure.storage.blob.implementation.XmlSerializer", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.XmlSerializerProviders", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.accesshelpers.AppendBlobItemConstructorProxy", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true @@ -149,6 +233,24 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "name": "com.azure.storage.blob.implementation.accesshelpers.BlobItemConstructorProxy", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.accesshelpers.BlobItemPropertiesConstructorProxy", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.accesshelpers.BlobLayoutPagingAccessHelper", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "name": "com.azure.storage.blob.implementation.accesshelpers.BlobPropertiesConstructorProxy", "allDeclaredConstructors": true, @@ -161,6 +263,24 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "name": "com.azure.storage.blob.implementation.accesshelpers.BlockBlobItemConstructorProxy", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.accesshelpers.PageBlobItemConstructorProxy", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.accesshelpers.SessionContextAccessor", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "name": "com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockFromUrlHeaders", "allDeclaredConstructors": true, @@ -186,13 +306,19 @@ "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.ArrowConfiguration", + "name": "com.azure.storage.blob.implementation.models.ArrowFieldInternal", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.ArrowField", + "name": "com.azure.storage.blob.implementation.models.ArrowTextConfigurationInternal", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.models.AuthenticationType", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true @@ -222,25 +348,55 @@ "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.BlobFlatListSegment", + "name": "com.azure.storage.blob.implementation.models.BlobHierarchyListSegment", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.BlobHierarchyListSegment", + "name": "com.azure.storage.blob.implementation.models.BlobItemInternal", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.BlobItemInternal", + "name": "com.azure.storage.blob.implementation.models.BlobItemPropertiesInternal", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.BlobItemPropertiesInternal", + "name": "com.azure.storage.blob.implementation.models.BlobLayoutEndpoints", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.models.BlobLayoutEndpointsEndpointItem", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.models.BlobLayoutInternal", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.models.BlobLayoutRanges", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.models.BlobLayoutRangesRangeItem", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.models.BlobListArrowParseException", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true @@ -282,7 +438,7 @@ "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.BlobsAbortCopyFromURLHeaders", + "name": "com.azure.storage.blob.implementation.models.BlobsAbortCopyFromUrlHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true @@ -306,7 +462,7 @@ "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.BlobsCopyFromURLHeaders", + "name": "com.azure.storage.blob.implementation.models.BlobsCopyFromUrlHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true @@ -336,13 +492,13 @@ "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.BlobsGetAccessControlHeaders", + "name": "com.azure.storage.blob.implementation.models.BlobsGetAccountInfoHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.BlobsGetAccountInfoHeaders", + "name": "com.azure.storage.blob.implementation.models.BlobsGetLayoutHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true @@ -360,19 +516,19 @@ "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.BlobsQueryHeaders", + "name": "com.azure.storage.blob.implementation.models.BlobSignedIdentifiers", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.BlobsReleaseLeaseHeaders", + "name": "com.azure.storage.blob.implementation.models.BlobsQueryHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.BlobsRenameHeaders", + "name": "com.azure.storage.blob.implementation.models.BlobsReleaseLeaseHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true @@ -383,12 +539,6 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, - { - "name": "com.azure.storage.blob.implementation.models.BlobsSetAccessControlHeaders", - "allDeclaredConstructors": true, - "allDeclaredFields": true, - "allDeclaredMethods": true - }, { "name": "com.azure.storage.blob.implementation.models.BlobsSetExpiryHeaders", "allDeclaredConstructors": true, @@ -432,7 +582,19 @@ "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.BlobsStartCopyFromURLHeaders", + "name": "com.azure.storage.blob.implementation.models.BlobsStartCopyFromUrlHeaders", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.models.BlobStorageError", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.models.BlobStorageErrorException", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true @@ -468,19 +630,19 @@ "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.BlockBlobsPutBlobFromUrlHeaders", + "name": "com.azure.storage.blob.implementation.models.BlockBlobsStageBlockFromUrlHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.BlockBlobsStageBlockFromURLHeaders", + "name": "com.azure.storage.blob.implementation.models.BlockBlobsStageBlockHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.BlockBlobsStageBlockHeaders", + "name": "com.azure.storage.blob.implementation.models.BlockBlobsUploadBlobFromUrlHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true @@ -515,6 +677,12 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "name": "com.azure.storage.blob.implementation.models.ContainersCreateSessionHeaders", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "name": "com.azure.storage.blob.implementation.models.ContainersDeleteHeaders", "allDeclaredConstructors": true, @@ -594,349 +762,367 @@ "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.ContainersSubmitBatchHeaders", + "name": "com.azure.storage.blob.implementation.models.CreateSessionConfiguration", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.DataLakeStorageError", + "name": "com.azure.storage.blob.implementation.models.CreateSessionResponse", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.DataLakeStorageErrorDetails", + "name": "com.azure.storage.blob.implementation.models.DelimitedTextConfiguration", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.DataLakeStorageErrorException", + "name": "com.azure.storage.blob.implementation.models.DownloadHint", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.DelimitedTextConfiguration", + "name": "com.azure.storage.blob.implementation.models.EncryptionScope", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.DirectoriesCreateHeaders", + "name": "com.azure.storage.blob.implementation.models.FilterBlobItem", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.DirectoriesDeleteHeaders", + "name": "com.azure.storage.blob.implementation.models.FilterBlobSegment", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.DirectoriesGetAccessControlHeaders", + "name": "com.azure.storage.blob.implementation.models.FilterBlobsIncludeItem", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.DirectoriesRenameHeaders", + "name": "com.azure.storage.blob.implementation.models.InternalBlobLegalHoldResult", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.DirectoriesSetAccessControlHeaders", + "name": "com.azure.storage.blob.implementation.models.JsonTextConfigurationInternal", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.DirectoryHttpHeaders", + "name": "com.azure.storage.blob.implementation.models.ListBlobsFlatSegmentResponse", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.EncryptionScope", + "name": "com.azure.storage.blob.implementation.models.ListBlobsHierarchySegmentResponse", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.FilterBlobItem", + "name": "com.azure.storage.blob.implementation.models.PageBlobsClearPagesHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.FilterBlobSegment", + "name": "com.azure.storage.blob.implementation.models.PageBlobsCopyIncrementalHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.FilterBlobsIncludeItem", + "name": "com.azure.storage.blob.implementation.models.PageBlobsCreateHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.InternalBlobLegalHoldResult", + "name": "com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesDiffHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.JsonTextConfiguration", + "name": "com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.ListBlobsFlatSegmentResponse", + "name": "com.azure.storage.blob.implementation.models.PageBlobsResizeHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.ListBlobsHierarchySegmentResponse", + "name": "com.azure.storage.blob.implementation.models.PageBlobsSetSequenceNumberHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.PageBlobsClearPagesHeaders", + "name": "com.azure.storage.blob.implementation.models.PageBlobsUploadPagesFromUrlHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.PageBlobsCopyIncrementalHeaders", + "name": "com.azure.storage.blob.implementation.models.PageBlobsUploadPagesHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.PageBlobsCreateHeaders", + "name": "com.azure.storage.blob.implementation.models.PageListHelper", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesDiffHeaders", + "name": "com.azure.storage.blob.implementation.models.ParquetTextConfiguration", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesDiffNextHeaders", + "name": "com.azure.storage.blob.implementation.models.PremiumPageBlobAccessTier", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesHeaders", + "name": "com.azure.storage.blob.implementation.models.QueryFormat", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesNextHeaders", + "name": "com.azure.storage.blob.implementation.models.QueryFormatType", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.PageBlobsResizeHeaders", + "name": "com.azure.storage.blob.implementation.models.QueryRequest", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.PageBlobsUpdateSequenceNumberHeaders", + "name": "com.azure.storage.blob.implementation.models.QueryRequestType", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.PageBlobsUploadPagesFromURLHeaders", + "name": "com.azure.storage.blob.implementation.models.QuerySerialization", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.PageBlobsUploadPagesHeaders", + "name": "com.azure.storage.blob.implementation.models.ServicesFilterBlobsHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.PageListCollection", + "name": "com.azure.storage.blob.implementation.models.ServicesGetAccountInfoHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.PageListHelper", + "name": "com.azure.storage.blob.implementation.models.ServicesGetPropertiesHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.PageListSegment", + "name": "com.azure.storage.blob.implementation.models.ServicesGetStatisticsHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.PremiumPageBlobAccessTier", + "name": "com.azure.storage.blob.implementation.models.ServicesGetUserDelegationKeyHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.QueryFormat", + "name": "com.azure.storage.blob.implementation.models.ServicesListContainersSegmentHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.QueryFormatType", + "name": "com.azure.storage.blob.implementation.models.ServicesSetPropertiesHeaders", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.QueryRequest", + "name": "com.azure.storage.blob.implementation.models.SessionCredentials", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.QuerySerialization", + "name": "com.azure.storage.blob.implementation.util.ArrowBlobListDeserializer", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.ServicesFilterBlobsHeaders", + "name": "com.azure.storage.blob.implementation.util.BlobConstants", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.ServicesGetAccountInfoHeaders", + "name": "com.azure.storage.blob.implementation.util.BlobGetLayoutOptions", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.ServicesGetPropertiesHeaders", + "name": "com.azure.storage.blob.implementation.util.BlobHeadersAndQueryParameters", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.ServicesGetStatisticsHeaders", + "name": "com.azure.storage.blob.implementation.util.BlobLayoutCacheValue", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.ServicesGetUserDelegationKeyHeaders", + "name": "com.azure.storage.blob.implementation.util.BlobLayoutRange", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.ServicesListBlobContainersSegmentHeaders", + "name": "com.azure.storage.blob.implementation.util.BlobLayoutRangeResolver", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.ServicesListBlobContainersSegmentNextHeaders", + "name": "com.azure.storage.blob.implementation.util.BlobListArrowStreamReader", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.ServicesSetPropertiesHeaders", + "name": "com.azure.storage.blob.implementation.util.BlobQueryReader", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.ServicesSubmitBatchHeaders", + "name": "com.azure.storage.blob.implementation.util.BlobRequestConditionProperty", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.StorageError", + "name": "com.azure.storage.blob.implementation.util.BlobSasImplUtil", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.models.StorageErrorException", + "name": "com.azure.storage.blob.implementation.util.BlobUserAgentModificationPolicy", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.util.BlobHeadersAndQueryParameters", + "name": "com.azure.storage.blob.implementation.util.BuilderHelper", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.util.BlobQueryReader", + "name": "com.azure.storage.blob.implementation.util.ByteBufferBackedOutputStreamUtil", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.util.BlobRequestConditionProperty", + "name": "com.azure.storage.blob.implementation.util.ChunkedDownloadUtils", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.util.BlobSasImplUtil", + "name": "com.azure.storage.blob.implementation.util.ContainerSessionProvider", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.util.BlobUserAgentModificationPolicy", + "name": "com.azure.storage.blob.implementation.util.ModelHelper", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.util.BuilderHelper", + "name": "com.azure.storage.blob.implementation.util.RequestOptionsHelper", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.util.ChunkedDownloadUtils", + "name": "com.azure.storage.blob.implementation.util.SessionAcquirer", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.util.CustomHierarchicalListingDeserializer", + "name": "com.azure.storage.blob.implementation.util.SessionAuthenticationPolicy", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, { - "name": "com.azure.storage.blob.implementation.util.ModelHelper", + "name": "com.azure.storage.blob.implementation.util.SessionAwareLoggingPolicy", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.SessionCredential", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.SessionProvider", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.SessionRequestContext", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true @@ -947,6 +1133,120 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "name": "com.azure.storage.blob.implementation.util.apachearrow.BodyCompression", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.apachearrow.Buffer", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.apachearrow.Endianness", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.apachearrow.Field", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.apachearrow.FieldNode", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.apachearrow.Int", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.apachearrow.KeyValue", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.apachearrow.Message", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.apachearrow.MessageHeader", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.apachearrow.RecordBatch", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.apachearrow.Schema", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.apachearrow.Timestamp", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.apachearrow.TimeUnit", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.apachearrow.Type", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.flatbuffers.Constants", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.flatbuffers.Struct", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.flatbuffers.Table", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.flatbuffers.Utf8", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.implementation.util.flatbuffers.Utf8Safe", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "name": "com.azure.storage.blob.models.AccessTier", "allDeclaredConstructors": true, @@ -989,6 +1289,12 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "name": "com.azure.storage.blob.models.BlobAudience", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "name": "com.azure.storage.blob.models.BlobBeginCopySourceRequestConditions", "allDeclaredConstructors": true, @@ -1241,6 +1547,12 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "name": "com.azure.storage.blob.models.BlobSeekableByteChannelReadResult", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "name": "com.azure.storage.blob.models.BlobServiceProperties", "allDeclaredConstructors": true, @@ -1337,6 +1649,12 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "name": "com.azure.storage.blob.models.DownloadHint", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "name": "com.azure.storage.blob.models.DownloadRetryOptions", "allDeclaredConstructors": true, @@ -1349,6 +1667,12 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "name": "com.azure.storage.blob.models.FileShareTokenIntent", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "name": "com.azure.storage.blob.models.GeoReplication", "allDeclaredConstructors": true, @@ -1451,12 +1775,6 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, - { - "name": "com.azure.storage.blob.models.PageListDeserializer", - "allDeclaredConstructors": true, - "allDeclaredFields": true, - "allDeclaredMethods": true - }, { "name": "com.azure.storage.blob.models.PageRange", "allDeclaredConstructors": true, @@ -1517,6 +1835,12 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "name": "com.azure.storage.blob.models.StorageResponseSerializationFormat", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "name": "com.azure.storage.blob.models.SyncCopyStatusType", "allDeclaredConstructors": true, @@ -1541,12 +1865,24 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "name": "com.azure.storage.blob.options.AppendBlobAppendBlockOptions", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "name": "com.azure.storage.blob.options.AppendBlobCreateOptions", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "name": "com.azure.storage.blob.options.AppendBlobOutputStreamOptions", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "name": "com.azure.storage.blob.options.AppendBlobSealOptions", "allDeclaredConstructors": true, @@ -1595,6 +1931,18 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "name": "com.azure.storage.blob.options.BlobDownloadContentOptions", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.options.BlobDownloadStreamOptions", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "name": "com.azure.storage.blob.options.BlobDownloadToFileOptions", "allDeclaredConstructors": true, @@ -1607,6 +1955,12 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "name": "com.azure.storage.blob.options.BlobGetUserDelegationKeyOptions", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "name": "com.azure.storage.blob.options.BlobInputStreamOptions", "allDeclaredConstructors": true, @@ -1637,6 +1991,12 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "name": "com.azure.storage.blob.options.BlobSeekableByteChannelReadOptions", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "name": "com.azure.storage.blob.options.BlobSetAccessTierOptions", "allDeclaredConstructors": true, @@ -1679,6 +2039,12 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "name": "com.azure.storage.blob.options.BlockBlobSeekableByteChannelWriteOptions", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "name": "com.azure.storage.blob.options.BlockBlobSimpleUploadOptions", "allDeclaredConstructors": true, @@ -1727,12 +2093,24 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "name": "com.azure.storage.blob.options.PageBlobOutputStreamOptions", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "name": "com.azure.storage.blob.options.PageBlobUploadPagesFromUrlOptions", "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "name": "com.azure.storage.blob.options.PageBlobUploadPagesOptions", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "name": "com.azure.storage.blob.options.UndeleteBlobContainerOptions", "allDeclaredConstructors": true, @@ -1858,5 +2236,17 @@ "allDeclaredConstructors": true, "allDeclaredFields": true, "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.specialized.StorageSeekableByteChannelBlobReadBehavior", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "name": "com.azure.storage.blob.specialized.StorageSeekableByteChannelBlockBlobWriteBehavior", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true } -] \ No newline at end of file +] From 2e4e0e8454ce78c39295e205345552e8fb20a2fc Mon Sep 17 00:00:00 2001 From: Isabelle Date: Thu, 19 Nov 2026 16:20:14 -0800 Subject: [PATCH 04/11] Build Blob customization members with JavaParser nodes; drop unneeded fluent restorations - Block's deprecated int size accessors, the deprecated BlobErrorCode constants, the PageList accessor block and the empty Get Blob Layout check are now built from AST nodes instead of parsed source strings. - Deprecated BlobErrorCode constants are placed after the constants that replace them. - BlobAccessPolicy and BlockLookupList already generate in their shipped shape, so they're no longer restored. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../main/java/BlobStorageCustomizations.java | 168 +++++++++++------- .../storage/blob/models/BlobAccessPolicy.java | 20 ++- .../storage/blob/models/BlobErrorCode.java | 34 ++-- .../storage/blob/models/BlockLookupList.java | 20 ++- 4 files changed, 138 insertions(+), 104 deletions(-) diff --git a/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java b/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java index f4345107223dd..9957e17759758 100644 --- a/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java +++ b/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java @@ -12,13 +12,21 @@ import com.github.javaparser.ast.body.BodyDeclaration; import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration; import com.github.javaparser.ast.body.ConstructorDeclaration; +import com.github.javaparser.ast.body.FieldDeclaration; +import com.github.javaparser.ast.body.InitializerDeclaration; import com.github.javaparser.ast.body.MethodDeclaration; import com.github.javaparser.ast.body.Parameter; import com.github.javaparser.ast.body.VariableDeclarator; +import com.github.javaparser.ast.expr.BinaryExpr; +import com.github.javaparser.ast.expr.ConditionalExpr; import com.github.javaparser.ast.expr.Expression; +import com.github.javaparser.ast.expr.IntegerLiteralExpr; import com.github.javaparser.ast.expr.LambdaExpr; import com.github.javaparser.ast.expr.MethodCallExpr; import com.github.javaparser.ast.expr.NameExpr; +import com.github.javaparser.ast.expr.NullLiteralExpr; +import com.github.javaparser.ast.expr.ObjectCreationExpr; +import com.github.javaparser.ast.expr.StringLiteralExpr; import com.github.javaparser.ast.modules.ModuleDirective; import com.github.javaparser.ast.modules.ModuleExportsDirective; import com.github.javaparser.ast.modules.ModuleOpensDirective; @@ -31,6 +39,7 @@ import com.github.javaparser.ast.stmt.TryStmt; import com.github.javaparser.ast.stmt.WhileStmt; import com.github.javaparser.ast.type.ClassOrInterfaceType; +import com.github.javaparser.ast.type.PrimitiveType; import com.github.javaparser.ast.type.Type; import com.github.javaparser.ast.type.UnknownType; import com.github.javaparser.javadoc.Javadoc; @@ -56,13 +65,12 @@ public class BlobStorageCustomizations extends Customization { // Models that shipped as @Fluent (public no-arg ctor + setters) before the TypeSpec migration. With // required-fields-as-ctor-args:true these regenerate as @Immutable with a required-args ctor and no setters -- a - // breaking change. restoreFluentModels restores the shipped fluent shape per-model. Expand this list from the - // RevApi "method removed" report. + // breaking change. restoreFluentModels restores the shipped fluent shape per-model. Models the emitter already + // generates in the shipped shape (BlobAccessPolicy, BlockLookupList) aren't listed. private static final List FLUENT_MODELS_TO_RESTORE = Arrays.asList( - "UserDelegationKey", "BlobCorsRule", "BlobAnalyticsLogging", "BlobRetentionPolicy", "BlobAccessPolicy", - "BlobSignedIdentifier", "BlobMetrics", "BlobServiceStatistics", "KeyInfo", "Block", "BlockList", - "BlobContainerItemProperties", "BlobContainerItem", "PageList", "BlockLookupList", "PageRange", "ClearRange", - "GeoReplication", "StaticWebsite"); + "UserDelegationKey", "BlobCorsRule", "BlobAnalyticsLogging", "BlobRetentionPolicy", "BlobSignedIdentifier", + "BlobMetrics", "BlobServiceStatistics", "KeyInfo", "Block", "BlockList", "BlobContainerItemProperties", + "BlobContainerItem", "PageList", "PageRange", "ClearRange", "GeoReplication", "StaticWebsite"); // Internal list models the hand-written BlobItem, BlobItemProperties and Arrow listing code populate through // setters, as they did before the migration. @@ -401,20 +409,6 @@ private static void restoreShippedEnumOrder(PackageCustomization models, Logger logger.info("Restored shipped enum constant order for {}", SHIPPED_ENUM_ORDER.keySet()); } - /** - * Restores public model members the AutoRest layer shipped that the spec doesn't produce: - *

    - *
  • {@code Block}'s deprecated {@code int} size accessors, alongside the {@code long} ones;
  • - *
  • {@code BlobContainerItemProperties}' primitive {@code boolean} accessors for the encryption scope override, - * which treat an absent value as {@code false};
  • - *
  • two deprecated, misspelled {@code BlobErrorCode} constants kept for compatibility;
  • - *
  • {@code PageList}'s continuation marker, which stays private and is reached by the SDK through - * {@code PageListHelper}.
  • - *
- * - * @param models The models package. - * @param logger The logger. - */ /** * Get Blob Layout answers 204 without a body for an empty blob, but the generated convenience methods deserialize * the body for every success status. A 204 now yields a null layout, which the hand-written paging treats as an @@ -429,46 +423,59 @@ private static void allowEmptyGetLayoutResponse(PackageCustomization implPackage .ifPresent(clazz -> clazz.getMethodsByName("getLayoutWithResponse") .forEach(method -> method .findAll(MethodCallExpr.class, call -> "toObject".equals(call.getNameAsString())) - .forEach(call -> call.replace(StaticJavaParser - .parseExpression("protocolMethodResponse.getStatusCode() == 204 ? null : " + call)))))); + .forEach(call -> call.replace(new ConditionalExpr( + new BinaryExpr( + new MethodCallExpr(new NameExpr("protocolMethodResponse"), "getStatusCode"), + new IntegerLiteralExpr("204"), BinaryExpr.Operator.EQUALS), + new NullLiteralExpr(), call.clone())))))); } } + /** + * Restores public model members the AutoRest layer shipped that the spec doesn't produce: + *
    + *
  • {@code Block}'s deprecated {@code int} size accessors, alongside the {@code long} ones;
  • + *
  • {@code BlobContainerItemProperties}' primitive {@code boolean} accessors for the encryption scope override, + * which treat an absent value as {@code false};
  • + *
  • two deprecated, misspelled {@code BlobErrorCode} constants kept for compatibility;
  • + *
  • {@code PageList}'s continuation marker, which stays private and is reached by the SDK through + * {@code PageListHelper}.
  • + *
+ * + * @param models The models package. + * @param logger The logger. + */ private static void restoreShippedModelMembers(PackageCustomization models, Logger logger) { models.getClass("Block").customizeAst(ast -> ast.getClassByName("Block").ifPresent(clazz -> { - clazz.addMember(StaticJavaParser.parseBodyDeclaration(String.join("\n", - "/**", - " * Get the size property: The block size in bytes.", - " *", - " * @return the size value.", - " * @deprecated Use {@link #getSizeLong()}", - " */", - "@Deprecated", - "public int getSize() {", - " return (int) this.sizeLong;", - "}"))); - clazz.addMember(StaticJavaParser.parseBodyDeclaration(String.join("\n", - "/**", - " * Set the size property: The block size in bytes.", - " *", - " * @param size the size value to set.", - " * @return the Block object itself.", - " * @deprecated Use {@link #setSizeLong(long)}", - " */", - "@Deprecated", - "public Block setSize(int size) {", - " return this.setSizeLong(size);", - "}"))); + MethodDeclaration getSize = clazz.addMethod("getSize", Modifier.Keyword.PUBLIC); + getSize.setType(PrimitiveType.intType()); + getSize.setBody(StaticJavaParser.parseBlock("{ return (int) this.sizeLong; }")); + getSize.addMarkerAnnotation("Deprecated"); + getSize.setJavadocComment( + new Javadoc(JavadocDescription.parseText("Get the size property: The block size in bytes.")) + .addBlockTag("return", "the size value.") + .addBlockTag("deprecated", "Use {@link #getSizeLong()}")); + + MethodDeclaration setSize = clazz.addMethod("setSize", Modifier.Keyword.PUBLIC); + setSize.setType("Block"); + setSize.addParameter(PrimitiveType.intType(), "size"); + setSize.setBody(StaticJavaParser.parseBlock("{ return this.setSizeLong(size); }")); + setSize.addMarkerAnnotation("Deprecated"); + setSize.setJavadocComment( + new Javadoc(JavadocDescription.parseText("Set the size property: The block size in bytes.")) + .addBlockTag("param", "size", "the size value to set.") + .addBlockTag("return", "the Block object itself.") + .addBlockTag("deprecated", "Use {@link #setSizeLong(long)}")); })); models.getClass("BlobContainerItemProperties") .customizeAst(ast -> ast.getClassByName("BlobContainerItemProperties").ifPresent(clazz -> { clazz.getMethodsByName("isEncryptionScopeOverridePrevented").forEach(getter -> getter - .setType("boolean") + .setType(PrimitiveType.booleanType()) .setBody(StaticJavaParser.parseBlock( "{ return Boolean.TRUE.equals(this.encryptionScopeOverridePrevented); }"))); clazz.getMethodsByName("setEncryptionScopeOverridePrevented") - .forEach(setter -> setter.getParameter(0).setType("boolean")); + .forEach(setter -> setter.getParameter(0).setType(PrimitiveType.booleanType())); })); models.getClass("BlobErrorCode").customizeAst(ast -> ast.getClassByName("BlobErrorCode").ifPresent(clazz -> { @@ -482,37 +489,60 @@ private static void restoreShippedModelMembers(PackageCustomization models, Logg ast.addImport("com.azure.storage.blob.implementation.models.PageListHelper"); clazz.getMethodsByName("getNextMarker").forEach(method -> method.setModifiers(Modifier.Keyword.PRIVATE)); clazz.getMethodsByName("setNextMarker").forEach(method -> method.setModifiers(Modifier.Keyword.PRIVATE)); - clazz.getMembers().addFirst(StaticJavaParser.parseBodyDeclaration(String.join("\n", - "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);", - " }", - " });", - "}"))); + + // static { PageListHelper.setAccessor(new PageListHelper.PageListAccessor() { ... }); } + MethodDeclaration getNextMarker = new MethodDeclaration(); + getNextMarker.setName("getNextMarker"); + getNextMarker.setModifiers(Modifier.Keyword.PUBLIC); + getNextMarker.setType("String"); + getNextMarker.addParameter("PageList", "pageList"); + getNextMarker.setBody(StaticJavaParser.parseBlock("{ return pageList.getNextMarker(); }")); + getNextMarker.addMarkerAnnotation("Override"); + + MethodDeclaration setNextMarker = new MethodDeclaration(); + setNextMarker.setName("setNextMarker"); + setNextMarker.setModifiers(Modifier.Keyword.PUBLIC); + setNextMarker.setType("PageList"); + setNextMarker.addParameter("PageList", "pageList"); + setNextMarker.addParameter("String", "marker"); + setNextMarker.setBody(StaticJavaParser.parseBlock("{ return pageList.setNextMarker(marker); }")); + setNextMarker.addMarkerAnnotation("Override"); + + ObjectCreationExpr accessor = new ObjectCreationExpr(null, + StaticJavaParser.parseClassOrInterfaceType("PageListHelper.PageListAccessor"), new NodeList<>()); + accessor.setAnonymousClassBody(new NodeList<>(getNextMarker, setNextMarker)); + BlockStmt setAccessor = new BlockStmt() + .addStatement(new MethodCallExpr(new NameExpr("PageListHelper"), "setAccessor", new NodeList<>(accessor))); + clazz.getMembers().addFirst(new InitializerDeclaration(true, setAccessor)); })); logger.info("Restored shipped members of Block, BlobContainerItemProperties, BlobErrorCode and PageList"); } + /** + * Adds a deprecated {@code BlobErrorCode} constant after the constant that replaces it. + * + * @param clazz The BlobErrorCode class. + * @param constant The deprecated constant name. + * @param wireValue The error code the constant wraps. + * @param replacement The constant to use instead. + */ private static void addDeprecatedErrorCode(ClassOrInterfaceDeclaration clazz, String constant, String wireValue, String replacement) { if (clazz.getFieldByName(constant).isPresent()) { return; } - clazz.addMember(StaticJavaParser.parseBodyDeclaration(String.join("\n", - "/**", - " * Static value " + wireValue + " for BlobErrorCode.", - " *", - " * @deprecated Please use {@link BlobErrorCode#" + replacement + "}", - " */", - "@Deprecated", - "public static final BlobErrorCode " + constant + " = fromString(\"" + wireValue + "\");"))); + FieldDeclaration field = new FieldDeclaration( + new NodeList<>(Modifier.publicModifier(), Modifier.staticModifier(), Modifier.finalModifier()), + new VariableDeclarator(new ClassOrInterfaceType(null, "BlobErrorCode"), constant, + new MethodCallExpr("fromString", new StringLiteralExpr(wireValue)))); + field.addMarkerAnnotation("Deprecated"); + field.setJavadocComment( + new Javadoc(JavadocDescription.parseText("Static value " + wireValue + " for BlobErrorCode.")) + .addBlockTag("deprecated", "Please use {@link BlobErrorCode#" + replacement + "}")); + + NodeList> members = clazz.getMembers(); + int replacementIndex = clazz.getFieldByName(replacement).map(members::indexOf).orElse(members.size() - 1); + members.add(replacementIndex + 1, field); } private static int indexOfFirstConstructor(NodeList> members) { 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 7b302fe6c39a5..05fc676478d97 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,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -20,7 +21,6 @@ */ @Fluent public final class BlobAccessPolicy implements XmlSerializable { - /* * The date-time the policy is active. */ @@ -48,7 +48,7 @@ public BlobAccessPolicy() { /** * Get the startsOn property: The date-time the policy is active. - * + * * @return the startsOn value. */ @Generated @@ -58,7 +58,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. */ @@ -70,7 +70,7 @@ public BlobAccessPolicy setStartsOn(OffsetDateTime startsOn) { /** * Get the expiresOn property: The date-time the policy expires. - * + * * @return the expiresOn value. */ @Generated @@ -80,7 +80,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. */ @@ -92,7 +92,7 @@ public BlobAccessPolicy setExpiresOn(OffsetDateTime expiresOn) { /** * Get the permissions property: The permissions for the policy. - * + * * @return the permissions value. */ @Generated @@ -102,7 +102,7 @@ public String getPermissions() { /** * Set the permissions property: The permissions for the policy. - * + * * @param permissions the permissions value to set. * @return the BlobAccessPolicy object itself. */ @@ -133,7 +133,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. @@ -146,7 +146,7 @@ public static BlobAccessPolicy fromXml(XmlReader xmlReader) throws XMLStreamExce /** * 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. @@ -162,6 +162,7 @@ public static BlobAccessPolicy fromXml(XmlReader xmlReader, String rootElementNa BlobAccessPolicy deserializedBlobAccessPolicy = new BlobAccessPolicy(); while (reader.nextElement() != XmlToken.END_ELEMENT) { QName elementName = reader.getElementName(); + if ("Start".equals(elementName.getLocalPart())) { deserializedBlobAccessPolicy.startsOn = reader.getNullableElement(dateString -> CoreUtils.parseBestOffsetDateTime(dateString)); @@ -174,6 +175,7 @@ public static BlobAccessPolicy fromXml(XmlReader xmlReader, String rootElementNa reader.skipElement(); } } + return deserializedBlobAccessPolicy; }); } 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 28d546e78322d..bfe2cf774288b 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 @@ -67,6 +67,15 @@ public final class BlobErrorCode extends ExpandableStringEnum { public static final BlobErrorCode INCREMENTAL_COPY_OF_EARLIER_SNAPSHOT_NOT_ALLOWED = fromString("IncrementalCopyOfEarlierSnapshotNotAllowed"); + /** + * Static value IncrementalCopyOfEralierVersionSnapshotNotAllowed for BlobErrorCode. + * + * @deprecated Please use {@link BlobErrorCode#INCREMENTAL_COPY_OF_EARLIER_SNAPSHOT_NOT_ALLOWED} + */ + @Deprecated + public static final BlobErrorCode INCREMENTAL_COPY_OF_ERALIER_VERSION_SNAPSHOT_NOT_ALLOWED + = fromString("IncrementalCopyOfEralierVersionSnapshotNotAllowed"); + /** * Insufficient account permissions. */ @@ -650,6 +659,14 @@ public final class BlobErrorCode extends ExpandableStringEnum { @Generated public static final BlobErrorCode SNAPSHOT_OPERATION_RATE_EXCEEDED = fromString("SnapshotOperationRateExceeded"); + /** + * Static value SnapshotOperationRateExceeded for BlobErrorCode. + * + * @deprecated Please use {@link BlobErrorCode#SNAPSHOT_OPERATION_RATE_EXCEEDED} + */ + @Deprecated + public static final BlobErrorCode SNAPHOT_OPERATION_RATE_EXCEEDED = fromString("SnapshotOperationRateExceeded"); + /** * Snapshots present. */ @@ -766,21 +783,4 @@ public static BlobErrorCode fromString(String name) { public static Collection values() { return values(BlobErrorCode.class); } - - /** - * Static value SnapshotOperationRateExceeded for BlobErrorCode. - * - * @deprecated Please use {@link BlobErrorCode#SNAPSHOT_OPERATION_RATE_EXCEEDED} - */ - @Deprecated - public static final BlobErrorCode SNAPHOT_OPERATION_RATE_EXCEEDED = fromString("SnapshotOperationRateExceeded"); - - /** - * Static value IncrementalCopyOfEralierVersionSnapshotNotAllowed for BlobErrorCode. - * - * @deprecated Please use {@link BlobErrorCode#INCREMENTAL_COPY_OF_EARLIER_SNAPSHOT_NOT_ALLOWED} - */ - @Deprecated - public static final BlobErrorCode INCREMENTAL_COPY_OF_ERALIER_VERSION_SNAPSHOT_NOT_ALLOWED - = fromString("IncrementalCopyOfEralierVersionSnapshotNotAllowed"); } 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 51149ef5f73ef..edcfafe9247b7 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 @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.storage.blob.models; import com.azure.core.annotation.Fluent; @@ -19,7 +20,6 @@ */ @Fluent public final class BlockLookupList implements XmlSerializable { - /* * The committed blocks. */ @@ -47,7 +47,7 @@ public BlockLookupList() { /** * Get the committed property: The committed blocks. - * + * * @return the committed value. */ @Generated @@ -57,7 +57,7 @@ public List getCommitted() { /** * Set the committed property: The committed blocks. - * + * * @param committed the committed value to set. * @return the BlockLookupList object itself. */ @@ -69,7 +69,7 @@ public BlockLookupList setCommitted(List committed) { /** * Get the uncommitted property: The uncommitted blocks. - * + * * @return the uncommitted value. */ @Generated @@ -79,7 +79,7 @@ public List getUncommitted() { /** * Set the uncommitted property: The uncommitted blocks. - * + * * @param uncommitted the uncommitted value to set. * @return the BlockLookupList object itself. */ @@ -91,7 +91,7 @@ public BlockLookupList setUncommitted(List uncommitted) { /** * Get the latest property: The latest blocks. - * + * * @return the latest value. */ @Generated @@ -101,7 +101,7 @@ public List getLatest() { /** * Set the latest property: The latest blocks. - * + * * @param latest the latest value to set. * @return the BlockLookupList object itself. */ @@ -142,7 +142,7 @@ public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName) throws XMLSt /** * 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. @@ -155,7 +155,7 @@ public static BlockLookupList fromXml(XmlReader xmlReader) throws XMLStreamExcep /** * 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. @@ -171,6 +171,7 @@ public static BlockLookupList fromXml(XmlReader xmlReader, String rootElementNam 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())) { @@ -181,6 +182,7 @@ public static BlockLookupList fromXml(XmlReader xmlReader, String rootElementNam reader.skipElement(); } } + return deserializedBlockLookupList; }); } From ae61cd1b45f98e9e618df298719e8f1b0a105da9 Mon Sep 17 00:00:00 2001 From: Isabelle Date: Fri, 20 Nov 2026 13:06:05 -0800 Subject: [PATCH 05/11] Fix encrypted ranged downloads with the Range header; keep shipped BlobImmutabilityPolicyMode values - BlobDecryptionPolicy expands whichever range header the request carries (x-ms-range takes precedence, then Range). Blob downloads now send Range, so ranged encrypted downloads were not expanded to whole encryption blocks. - BlobImmutabilityPolicyMode keeps its shipped Mutable/Unlocked/Locked values and order through a Java-only spec enum, which replaces its entry in restoreShippedEnumOrder. - Pin tsp-location to the updated spec commit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../cryptography/BlobDecryptionPolicy.java | 10 ++- .../BlobDecryptionPolicyRangeTests.java | 80 +++++++++++++++++++ .../main/java/BlobStorageCustomizations.java | 1 - .../AppendBlobAsyncClientInternal.java | 2 +- .../AppendBlobClientInternal.java | 2 +- .../blob/implementation/AppendBlobsImpl.java | 4 +- .../BlobAsyncClientInternal.java | 6 +- .../implementation/BlobClientInternal.java | 6 +- .../BlobContainerAsyncClientInternal.java | 4 +- .../BlobContainerClientInternal.java | 4 +- .../blob/implementation/BlobsImpl.java | 12 +-- .../BlockBlobAsyncClientInternal.java | 4 +- .../BlockBlobClientInternal.java | 4 +- .../blob/implementation/BlockBlobsImpl.java | 8 +- .../blob/implementation/ContainersImpl.java | 8 +- .../PageBlobAsyncClientInternal.java | 2 +- .../PageBlobClientInternal.java | 2 +- .../blob/implementation/PageBlobsImpl.java | 4 +- .../models/BlobImmutabilityPolicyMode.java | 14 ++-- .../META-INF/azure-storage-blob_metadata.json | 2 +- .../BlobImmutabilityPolicyModeTests.java | 32 ++++++++ .../azure-storage-blob/tsp-location.yaml | 2 +- 22 files changed, 164 insertions(+), 49 deletions(-) create mode 100644 sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/BlobDecryptionPolicyRangeTests.java create mode 100644 sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/models/BlobImmutabilityPolicyModeTests.java diff --git a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/BlobDecryptionPolicy.java b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/BlobDecryptionPolicy.java index a280823e4842d..2492e3fd691e0 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/BlobDecryptionPolicy.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/BlobDecryptionPolicy.java @@ -85,7 +85,11 @@ public Mono process(HttpPipelineCallContext context, HttpPipelineN } HttpHeaders requestHeaders = context.getHttpRequest().getHeaders(); - String initialRangeHeader = requestHeaders.getValue(RANGE_HEADER); + // Blob clients send the standard Range header. A caller-supplied x-ms-range takes precedence, as it does for + // the service, so the expanded range is written back to whichever header carries it. + HttpHeaderName rangeHeaderName + = requestHeaders.getValue(RANGE_HEADER) != null ? RANGE_HEADER : HttpHeaderName.RANGE; + String initialRangeHeader = requestHeaders.getValue(rangeHeaderName); if (!isRangeRequest(initialRangeHeader)) { // If there is no range, there is nothing to expand, so we can continue with the request @@ -148,9 +152,7 @@ public Mono process(HttpPipelineCallContext context, HttpPipelineN EncryptedBlobRange encryptedRange = EncryptedBlobRange.getEncryptedBlobRangeFromHeader(initialRangeHeader, encryptionData); - if (context.getHttpRequest().getHeaders().getValue(RANGE_HEADER) != null) { - requestHeaders.set(RANGE_HEADER, encryptedRange.toBlobRange().toString()); - } + requestHeaders.set(rangeHeaderName, encryptedRange.toBlobRange().toString()); // Process the request after expanding the range/ return next.process().map(httpResponse -> { diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/BlobDecryptionPolicyRangeTests.java b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/BlobDecryptionPolicyRangeTests.java new file mode 100644 index 0000000000000..a6ea915f9d03a --- /dev/null +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/BlobDecryptionPolicyRangeTests.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.specialized.cryptography; + +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpMethod; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpRequest; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.core.util.Context; +import com.azure.json.JsonProviders; +import com.azure.json.JsonReader; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import reactor.core.publisher.Mono; + +import java.io.IOException; +import java.util.concurrent.atomic.AtomicReference; +import java.util.stream.Stream; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; + +/** + * A ranged download of an encrypted blob must be expanded to whole encryption blocks, whichever range header the + * request carries. + */ +public class BlobDecryptionPolicyRangeTests { + private static final HttpHeaderName X_MS_RANGE = HttpHeaderName.fromString("x-ms-range"); + private static final String ENCRYPTION_DATA_JSON + = "{\"EncryptionMode\":\"FullBlob\",\"EncryptionAgent\":{\"Protocol\":\"1.0\"," + + "\"EncryptionAlgorithm\":\"AES_CBC_256\"}}"; + + @ParameterizedTest + @MethodSource("rangeHeaderSupplier") + public void rangedRequestIsExpandedToEncryptedRange(String range, String xMsRange) throws IOException { + EncryptionData encryptionData; + try (JsonReader jsonReader = JsonProviders.createReader(ENCRYPTION_DATA_JSON)) { + encryptionData = EncryptionData.fromJson(jsonReader); + } + AtomicReference sentRequest = new AtomicReference<>(); + HttpPipeline pipeline = new HttpPipelineBuilder() + .policies(new BlobDecryptionPolicy(new FakeKey("keyId", new byte[256]), null, false)) + .httpClient(request -> { + sentRequest.set(request); + return Mono.just(new MockHttpResponse(request, 404)); + }) + .build(); + + HttpHeaders headers = new HttpHeaders(); + if (range != null) { + headers.set(HttpHeaderName.RANGE, range); + } + if (xMsRange != null) { + headers.set(X_MS_RANGE, xMsRange); + } + HttpRequest request + = new HttpRequest(HttpMethod.GET, "https://account.blob.core.windows.net/c/b").setHeaders(headers); + pipeline.send(request, new Context(CryptographyConstants.ENCRYPTION_DATA_KEY, encryptionData)).block(); + + // x-ms-range takes precedence when both are sent, so only that header is expanded. + String requestedRange = xMsRange != null ? xMsRange : range; + String expandedRange = EncryptedBlobRange.getEncryptedBlobRangeFromHeader(requestedRange, encryptionData) + .toBlobRange() + .toString(); + HttpHeaders sentHeaders = sentRequest.get().getHeaders(); + assertNotEquals(requestedRange, expandedRange); + assertEquals(xMsRange != null ? range : expandedRange, sentHeaders.getValue(HttpHeaderName.RANGE)); + assertEquals(xMsRange != null ? expandedRange : null, sentHeaders.getValue(X_MS_RANGE)); + } + + private static Stream rangeHeaderSupplier() { + return Stream.of(Arguments.of("bytes=20-40", null), Arguments.of(null, "bytes=20-40"), + Arguments.of("bytes=0-10", "bytes=20-40")); + } +} diff --git a/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java b/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java index 9957e17759758..b308a2eceafab 100644 --- a/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java +++ b/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java @@ -386,7 +386,6 @@ private static void restoreFluentModel(PackageCustomization models, String model private static final Map> SHIPPED_ENUM_ORDER = new LinkedHashMap<>(); static { - SHIPPED_ENUM_ORDER.put("BlobImmutabilityPolicyMode", Arrays.asList("MUTABLE", "UNLOCKED", "LOCKED")); SHIPPED_ENUM_ORDER.put("CopyStatusType", Arrays.asList("PENDING", "SUCCESS", "ABORTED", "FAILED")); SHIPPED_ENUM_ORDER.put("DeleteSnapshotsOptionType", Arrays.asList("INCLUDE", "ONLY")); SHIPPED_ENUM_ORDER.put("LeaseStatusType", Arrays.asList("LOCKED", "UNLOCKED")); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobAsyncClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobAsyncClientInternal.java index adec7be050897..b338e21259d1e 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobAsyncClientInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobAsyncClientInternal.java @@ -98,7 +98,7 @@ public AppendBlobAsyncClientInternal(AppendBlobsImpl serviceClient) { * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * * You can add these to a request with {@link RequestOptions#addHeader} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobClientInternal.java index cdae35191b29d..4feddab7d325f 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobClientInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/AppendBlobClientInternal.java @@ -96,7 +96,7 @@ public AppendBlobClientInternal(AppendBlobsImpl serviceClient) { * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * * You can add these to a request with {@link RequestOptions#addHeader} 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 5c6438472086b..c487e7c6df48a 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 @@ -179,7 +179,7 @@ Response sealSync(@HostParam("url") String url, @HeaderParam("x-ms-version * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * * You can add these to a request with {@link RequestOptions#addHeader} @@ -275,7 +275,7 @@ public Mono> createWithResponseInternalAsync(RequestOptions reque * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * * You can add these to a request with {@link RequestOptions#addHeader} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobAsyncClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobAsyncClientInternal.java index 039c36a7a2736..456018fc0d6d3 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobAsyncClientInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobAsyncClientInternal.java @@ -588,7 +588,7 @@ Mono> setHttpHeadersWithResponseInternal(RequestOptions requestOp * If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a * blob if it has not been modified since the specified date-time. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * * You can add these to a request with {@link RequestOptions#addHeader} *

Response Headers

@@ -1178,7 +1178,7 @@ Mono> createSnapshotWithResponseInternal(RequestOptions requestOp * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * * You can add these to a request with {@link RequestOptions#addHeader} @@ -1259,7 +1259,7 @@ Mono> startCopyFromUrlWithResponseInternal(String copySource, Req * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is * supported, and the value must be a valid OAuth access token for the copy source. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobClientInternal.java index 212574ef7c7a6..c08d48be9e1ed 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobClientInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobClientInternal.java @@ -586,7 +586,7 @@ Response setHttpHeadersWithResponseInternal(RequestOptions requestOptions) * If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a * blob if it has not been modified since the specified date-time. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * * You can add these to a request with {@link RequestOptions#addHeader} *

Response Headers

@@ -1175,7 +1175,7 @@ Response createSnapshotWithResponseInternal(RequestOptions requestOptions) * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * * You can add these to a request with {@link RequestOptions#addHeader} @@ -1256,7 +1256,7 @@ Response startCopyFromUrlWithResponseInternal(String copySource, RequestOp * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is * supported, and the value must be a valid OAuth access token for the copy source. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobContainerAsyncClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobContainerAsyncClientInternal.java index 0575162cfe8d9..92cb8debbfefe 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobContainerAsyncClientInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobContainerAsyncClientInternal.java @@ -1060,7 +1060,7 @@ Mono> changeLeaseWithResponseInternal(String leaseId, String prop * RehydratePriority: String(High/Standard) (Optional) * LastAccessTime: DateTimeRfc1123 (Optional) * ImmutabilityPolicyUntilDate: DateTimeRfc1123 (Optional) - * ImmutabilityPolicyMode: String(mutable/locked/unlocked) (Optional) + * ImmutabilityPolicyMode: String(Mutable/Unlocked/Locked) (Optional) * LegalHold: Boolean (Optional) * } * Metadata (Optional): { @@ -1255,7 +1255,7 @@ public Mono> listBlobFlatSegmentApacheArrowWithResponse(Req * RehydratePriority: String(High/Standard) (Optional) * LastAccessTime: DateTimeRfc1123 (Optional) * ImmutabilityPolicyUntilDate: DateTimeRfc1123 (Optional) - * ImmutabilityPolicyMode: String(mutable/locked/unlocked) (Optional) + * ImmutabilityPolicyMode: String(Mutable/Unlocked/Locked) (Optional) * LegalHold: Boolean (Optional) * } * Metadata (Optional): { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobContainerClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobContainerClientInternal.java index 063aa967c8e1a..0113200ee6b17 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobContainerClientInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobContainerClientInternal.java @@ -1055,7 +1055,7 @@ Response changeLeaseWithResponseInternal(String leaseId, String proposedLe * RehydratePriority: String(High/Standard) (Optional) * LastAccessTime: DateTimeRfc1123 (Optional) * ImmutabilityPolicyUntilDate: DateTimeRfc1123 (Optional) - * ImmutabilityPolicyMode: String(mutable/locked/unlocked) (Optional) + * ImmutabilityPolicyMode: String(Mutable/Unlocked/Locked) (Optional) * LegalHold: Boolean (Optional) * } * Metadata (Optional): { @@ -1250,7 +1250,7 @@ public Response listBlobFlatSegmentApacheArrowWithResponse(RequestOp * RehydratePriority: String(High/Standard) (Optional) * LastAccessTime: DateTimeRfc1123 (Optional) * ImmutabilityPolicyUntilDate: DateTimeRfc1123 (Optional) - * ImmutabilityPolicyMode: String(mutable/locked/unlocked) (Optional) + * ImmutabilityPolicyMode: String(Mutable/Unlocked/Locked) (Optional) * LegalHold: Boolean (Optional) * } * Metadata (Optional): { 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 17230e450666e..8779f5374748c 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 @@ -1440,7 +1440,7 @@ public Response setHttpHeadersWithResponseInternal(RequestOptions requestO * If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a * blob if it has not been modified since the specified date-time. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * * You can add these to a request with {@link RequestOptions#addHeader} *

Response Headers

@@ -1497,7 +1497,7 @@ public Mono> setImmutabilityPolicyWithResponseInternalAsync(Offse * If-Unmodified-SinceOffsetDateTimeNoSpecify this value to operate only on a * blob if it has not been modified since the specified date-time. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * * You can add these to a request with {@link RequestOptions#addHeader} *

Response Headers

@@ -2665,7 +2665,7 @@ public Response createSnapshotWithResponseInternal(RequestOptions requestO * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * * You can add these to a request with {@link RequestOptions#addHeader} @@ -2753,7 +2753,7 @@ public Mono> startCopyFromUrlWithResponseInternalAsync(String cop * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * * You can add these to a request with {@link RequestOptions#addHeader} @@ -2838,7 +2838,7 @@ public Response startCopyFromUrlWithResponseInternal(String copySource, Re * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is * supported, and the value must be a valid OAuth access token for the copy source. @@ -2934,7 +2934,7 @@ public Mono> copyFromUrlWithResponseInternalAsync(String copySour * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * x-ms-copy-source-authorizationStringNoOnly the Bearer authorization scheme is * supported, and the value must be a valid OAuth access token for the copy source. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobAsyncClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobAsyncClientInternal.java index 01d4896b39372..2d5ae22bacaaf 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobAsyncClientInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobAsyncClientInternal.java @@ -115,7 +115,7 @@ public BlockBlobAsyncClientInternal(BlockBlobsImpl serviceClient) { * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the * body. @@ -536,7 +536,7 @@ Mono> stageBlockFromUrlWithResponseInternal(String blockId, long * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * * You can add these to a request with {@link RequestOptions#addHeader} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobClientInternal.java index a84c66f9a7b08..c59007d576598 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobClientInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobClientInternal.java @@ -113,7 +113,7 @@ public BlockBlobClientInternal(BlockBlobsImpl serviceClient) { * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the * body. @@ -533,7 +533,7 @@ Response stageBlockFromUrlWithResponseInternal(String blockId, long conten * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * * You can add these to a request with {@link RequestOptions#addHeader} 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 c723c39689399..ebe952d8ca828 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 @@ -225,7 +225,7 @@ Response getBlockListSync(@HostParam("url") String url, * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the * body. @@ -348,7 +348,7 @@ public Mono> uploadWithResponseInternalAsync(long contentLength, * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * x-ms-content-crc64byte[]NoSpecifies the transactional CRC64 hash for the * body. @@ -1102,7 +1102,7 @@ public Response stageBlockFromUrlWithResponseInternal(String blockId, long * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * * You can add these to a request with {@link RequestOptions#addHeader} @@ -1225,7 +1225,7 @@ public Mono> commitBlockListWithResponseInternalAsync(BinaryData * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * * You can add these to a request with {@link RequestOptions#addHeader} 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 2fe0e26208a57..427644040cc0f 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 @@ -2388,7 +2388,7 @@ public Response changeLeaseWithResponseInternal(String leaseId, String pro * RehydratePriority: String(High/Standard) (Optional) * LastAccessTime: DateTimeRfc1123 (Optional) * ImmutabilityPolicyUntilDate: DateTimeRfc1123 (Optional) - * ImmutabilityPolicyMode: String(mutable/locked/unlocked) (Optional) + * ImmutabilityPolicyMode: String(Mutable/Unlocked/Locked) (Optional) * LegalHold: Boolean (Optional) * } * Metadata (Optional): { @@ -2524,7 +2524,7 @@ public Mono> listBlobFlatSegmentWithResponseInternalAsync(R * RehydratePriority: String(High/Standard) (Optional) * LastAccessTime: DateTimeRfc1123 (Optional) * ImmutabilityPolicyUntilDate: DateTimeRfc1123 (Optional) - * ImmutabilityPolicyMode: String(mutable/locked/unlocked) (Optional) + * ImmutabilityPolicyMode: String(Mutable/Unlocked/Locked) (Optional) * LegalHold: Boolean (Optional) * } * Metadata (Optional): { @@ -2791,7 +2791,7 @@ public Response listBlobFlatSegmentApacheArrowWithResponse(RequestOp * RehydratePriority: String(High/Standard) (Optional) * LastAccessTime: DateTimeRfc1123 (Optional) * ImmutabilityPolicyUntilDate: DateTimeRfc1123 (Optional) - * ImmutabilityPolicyMode: String(mutable/locked/unlocked) (Optional) + * ImmutabilityPolicyMode: String(Mutable/Unlocked/Locked) (Optional) * LegalHold: Boolean (Optional) * } * Metadata (Optional): { @@ -2941,7 +2941,7 @@ public Mono> listBlobHierarchySegmentWithResponseInternalAs * RehydratePriority: String(High/Standard) (Optional) * LastAccessTime: DateTimeRfc1123 (Optional) * ImmutabilityPolicyUntilDate: DateTimeRfc1123 (Optional) - * ImmutabilityPolicyMode: String(mutable/locked/unlocked) (Optional) + * ImmutabilityPolicyMode: String(Mutable/Unlocked/Locked) (Optional) * LegalHold: Boolean (Optional) * } * Metadata (Optional): { diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobAsyncClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobAsyncClientInternal.java index 15f0482e6500d..a941a5a460486 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobAsyncClientInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobAsyncClientInternal.java @@ -114,7 +114,7 @@ public PageBlobAsyncClientInternal(PageBlobsImpl serviceClient) { * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * * You can add these to a request with {@link RequestOptions#addHeader} diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobClientInternal.java index ed80f518ed8aa..ba57b85d92fd2 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobClientInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobClientInternal.java @@ -112,7 +112,7 @@ public PageBlobClientInternal(PageBlobsImpl serviceClient) { * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * * You can add these to a request with {@link RequestOptions#addHeader} 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 168c744112033..349779cfbf13b 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 @@ -261,7 +261,7 @@ Response copyIncrementalSync(@HostParam("url") String url, @HeaderParam("x * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * * You can add these to a request with {@link RequestOptions#addHeader} @@ -362,7 +362,7 @@ public Mono> createWithResponseInternalAsync(long size, RequestOp * x-ms-immutability-policy-until-dateOffsetDateTimeNoThe date-time that * indicates the time at which the blob immutability policy will expire. * x-ms-immutability-policy-modeStringNoIndicates the immutability policy mode of - * the blob. Allowed values: "mutable", "locked", "unlocked". + * the blob. Allowed values: "Mutable", "Unlocked", "Locked". * x-ms-legal-holdBooleanNoIndicates whether the blob has a legal hold. * * You can add these to a request with {@link RequestOptions#addHeader} 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 011297a23dc7b..56389b58377ff 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 @@ -1,25 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.storage.blob.models; /** - * The immutability policy mode. + * Defines values for BlobImmutabilityPolicyMode. */ public enum BlobImmutabilityPolicyMode { - /** * Response only. The immutability policy is mutable. */ - MUTABLE("mutable"), + MUTABLE("Mutable"), + /** * The immutability policy is unlocked. */ - UNLOCKED("unlocked"), + UNLOCKED("Unlocked"), + /** * The immutability policy is locked. */ - LOCKED("locked"); + LOCKED("Locked"); /** * The actual serialized value for a BlobImmutabilityPolicyMode instance. @@ -32,7 +34,7 @@ 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. */ diff --git a/sdk/storage/azure-storage-blob/src/main/resources/META-INF/azure-storage-blob_metadata.json b/sdk/storage/azure-storage-blob/src/main/resources/META-INF/azure-storage-blob_metadata.json index a16076568b70f..7d96148df373f 100644 --- a/sdk/storage/azure-storage-blob/src/main/resources/META-INF/azure-storage-blob_metadata.json +++ b/sdk/storage/azure-storage-blob/src/main/resources/META-INF/azure-storage-blob_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Storage.Blob":"2027-03-07"},"crossLanguagePackageId":"Storage.Blob","crossLanguageVersion":"6ff0211f06c6","crossLanguageDefinitions":{"com.azure.storage.blob.AppendBlobAsyncClient":"Storage.Blob.AppendBlob","com.azure.storage.blob.AppendBlobAsyncClient.appendBlock":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrl":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrlWithResponse":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrlWithResponseInternal":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockWithResponse":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockWithResponseInternal":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobAsyncClient.create":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobAsyncClient.createWithResponse":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobAsyncClient.createWithResponseInternal":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobAsyncClient.seal":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobAsyncClient.sealWithResponse":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobAsyncClient.sealWithResponseInternal":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobClient":"Storage.Blob.AppendBlob","com.azure.storage.blob.AppendBlobClient.appendBlock":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobClient.appendBlockFromUrl":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobClient.appendBlockFromUrlWithResponse":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobClient.appendBlockFromUrlWithResponseInternal":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobClient.appendBlockWithResponse":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobClient.appendBlockWithResponseInternal":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobClient.create":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobClient.createWithResponse":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobClient.createWithResponseInternal":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobClient.seal":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobClient.sealWithResponse":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobClient.sealWithResponseInternal":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AzureBlobStorageBuilder":"Storage.Blob","com.azure.storage.blob.BlobAsyncClient":"Storage.Blob.Blob","com.azure.storage.blob.BlobAsyncClient.abortCopyFromUrl":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.abortCopyFromUrlWithResponse":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.abortCopyFromUrlWithResponseInternal":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.acquireLease":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobAsyncClient.acquireLeaseWithResponse":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobAsyncClient.acquireLeaseWithResponseInternal":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobAsyncClient.breakLease":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobAsyncClient.breakLeaseWithResponse":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobAsyncClient.breakLeaseWithResponseInternal":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobAsyncClient.changeLease":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobAsyncClient.changeLeaseWithResponse":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobAsyncClient.changeLeaseWithResponseInternal":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobAsyncClient.copyFromUrl":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobAsyncClient.copyFromUrlWithResponse":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobAsyncClient.copyFromUrlWithResponseInternal":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobAsyncClient.createSnapshot":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobAsyncClient.createSnapshotWithResponse":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobAsyncClient.createSnapshotWithResponseInternal":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobAsyncClient.delete":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobAsyncClient.deleteImmutabilityPolicy":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.deleteImmutabilityPolicyWithResponse":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.deleteImmutabilityPolicyWithResponseInternal":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.deleteWithResponse":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobAsyncClient.deleteWithResponseInternal":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobAsyncClient.download":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobAsyncClient.downloadWithResponse":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobAsyncClient.downloadWithResponseInternal":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobAsyncClient.getAccountInfo":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobAsyncClient.getAccountInfoWithResponse":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobAsyncClient.getAccountInfoWithResponseInternal":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobAsyncClient.getLayout":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobAsyncClient.getLayoutWithResponse":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobAsyncClient.getLayoutWithResponseInternal":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobAsyncClient.getProperties":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobAsyncClient.getPropertiesWithResponse":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobAsyncClient.getPropertiesWithResponseInternal":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobAsyncClient.getTags":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobAsyncClient.getTagsWithResponse":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobAsyncClient.getTagsWithResponseInternal":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobAsyncClient.query":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobAsyncClient.queryWithResponse":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobAsyncClient.queryWithResponseInternal":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobAsyncClient.releaseLease":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobAsyncClient.releaseLeaseWithResponse":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobAsyncClient.releaseLeaseWithResponseInternal":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobAsyncClient.renewLease":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobAsyncClient.renewLeaseWithResponse":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobAsyncClient.renewLeaseWithResponseInternal":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobAsyncClient.setExpiry":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobAsyncClient.setExpiryWithResponse":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobAsyncClient.setExpiryWithResponseInternal":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobAsyncClient.setHttpHeaders":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobAsyncClient.setHttpHeadersWithResponse":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobAsyncClient.setHttpHeadersWithResponseInternal":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobAsyncClient.setImmutabilityPolicy":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.setImmutabilityPolicyWithResponse":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.setImmutabilityPolicyWithResponseInternal":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.setLegalHold":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobAsyncClient.setLegalHoldWithResponse":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobAsyncClient.setLegalHoldWithResponseInternal":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobAsyncClient.setMetadata":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobAsyncClient.setMetadataWithResponse":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobAsyncClient.setMetadataWithResponseInternal":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobAsyncClient.setTags":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobAsyncClient.setTagsWithResponse":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobAsyncClient.setTagsWithResponseInternal":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobAsyncClient.setTier":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobAsyncClient.setTierWithResponse":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobAsyncClient.setTierWithResponseInternal":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobAsyncClient.startCopyFromUrl":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.startCopyFromUrlWithResponse":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.startCopyFromUrlWithResponseInternal":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.undelete":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobAsyncClient.undeleteWithResponse":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobAsyncClient.undeleteWithResponseInternal":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobClient":"Storage.Blob.Blob","com.azure.storage.blob.BlobClient.abortCopyFromUrl":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobClient.abortCopyFromUrlWithResponse":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobClient.abortCopyFromUrlWithResponseInternal":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobClient.acquireLease":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobClient.acquireLeaseWithResponse":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobClient.acquireLeaseWithResponseInternal":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobClient.breakLease":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobClient.breakLeaseWithResponse":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobClient.breakLeaseWithResponseInternal":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobClient.changeLease":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobClient.changeLeaseWithResponse":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobClient.changeLeaseWithResponseInternal":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobClient.copyFromUrl":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobClient.copyFromUrlWithResponse":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobClient.copyFromUrlWithResponseInternal":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobClient.createSnapshot":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobClient.createSnapshotWithResponse":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobClient.createSnapshotWithResponseInternal":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobClient.delete":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobClient.deleteImmutabilityPolicy":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobClient.deleteImmutabilityPolicyWithResponse":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobClient.deleteImmutabilityPolicyWithResponseInternal":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobClient.deleteWithResponse":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobClient.deleteWithResponseInternal":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobClient.download":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobClient.downloadWithResponse":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobClient.downloadWithResponseInternal":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobClient.getAccountInfo":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobClient.getAccountInfoWithResponse":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobClient.getAccountInfoWithResponseInternal":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobClient.getLayout":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobClient.getLayoutWithResponse":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobClient.getLayoutWithResponseInternal":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobClient.getProperties":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobClient.getPropertiesWithResponse":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobClient.getPropertiesWithResponseInternal":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobClient.getTags":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobClient.getTagsWithResponse":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobClient.getTagsWithResponseInternal":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobClient.query":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobClient.queryWithResponse":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobClient.queryWithResponseInternal":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobClient.releaseLease":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobClient.releaseLeaseWithResponse":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobClient.releaseLeaseWithResponseInternal":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobClient.renewLease":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobClient.renewLeaseWithResponse":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobClient.renewLeaseWithResponseInternal":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobClient.setExpiry":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobClient.setExpiryWithResponse":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobClient.setExpiryWithResponseInternal":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobClient.setHttpHeaders":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobClient.setHttpHeadersWithResponse":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobClient.setHttpHeadersWithResponseInternal":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobClient.setImmutabilityPolicy":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobClient.setImmutabilityPolicyWithResponse":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobClient.setImmutabilityPolicyWithResponseInternal":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobClient.setLegalHold":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobClient.setLegalHoldWithResponse":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobClient.setLegalHoldWithResponseInternal":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobClient.setMetadata":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobClient.setMetadataWithResponse":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobClient.setMetadataWithResponseInternal":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobClient.setTags":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobClient.setTagsWithResponse":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobClient.setTagsWithResponseInternal":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobClient.setTier":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobClient.setTierWithResponse":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobClient.setTierWithResponseInternal":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobClient.startCopyFromUrl":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobClient.startCopyFromUrlWithResponse":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobClient.startCopyFromUrlWithResponseInternal":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobClient.undelete":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobClient.undeleteWithResponse":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobClient.undeleteWithResponseInternal":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlockBlobAsyncClient":"Storage.Blob.BlockBlob","com.azure.storage.blob.BlockBlobAsyncClient.commitBlockList":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobAsyncClient.commitBlockListWithResponse":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobAsyncClient.commitBlockListWithResponseInternal":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobAsyncClient.getBlockList":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobAsyncClient.getBlockListWithResponse":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobAsyncClient.getBlockListWithResponseInternal":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobAsyncClient.stageBlock":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromUrl":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromUrlWithResponse":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromUrlWithResponseInternal":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockWithResponse":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockWithResponseInternal":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobAsyncClient.upload":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobAsyncClient.uploadBlobFromUrl":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.uploadBlobFromUrlWithResponse":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.uploadBlobFromUrlWithResponseInternal":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.uploadWithResponse":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobAsyncClient.uploadWithResponseInternal":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobClient":"Storage.Blob.BlockBlob","com.azure.storage.blob.BlockBlobClient.commitBlockList":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobClient.commitBlockListWithResponse":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobClient.commitBlockListWithResponseInternal":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobClient.getBlockList":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobClient.getBlockListWithResponse":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobClient.getBlockListWithResponseInternal":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobClient.stageBlock":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobClient.stageBlockFromUrl":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobClient.stageBlockFromUrlWithResponse":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobClient.stageBlockFromUrlWithResponseInternal":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobClient.stageBlockWithResponse":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobClient.stageBlockWithResponseInternal":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobClient.upload":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobClient.uploadBlobFromUrl":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobClient.uploadBlobFromUrlWithResponse":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobClient.uploadBlobFromUrlWithResponseInternal":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobClient.uploadWithResponse":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobClient.uploadWithResponseInternal":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.ContainerAsyncClient":"Storage.Blob.Container","com.azure.storage.blob.ContainerAsyncClient.acquireLease":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerAsyncClient.acquireLeaseWithResponse":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerAsyncClient.acquireLeaseWithResponseInternal":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerAsyncClient.breakLease":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerAsyncClient.breakLeaseWithResponse":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerAsyncClient.breakLeaseWithResponseInternal":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerAsyncClient.changeLease":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerAsyncClient.changeLeaseWithResponse":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerAsyncClient.changeLeaseWithResponseInternal":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerAsyncClient.create":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerAsyncClient.createSession":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerAsyncClient.createSessionWithResponse":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerAsyncClient.createSessionWithResponseInternal":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerAsyncClient.createWithResponse":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerAsyncClient.createWithResponseInternal":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerAsyncClient.delete":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerAsyncClient.deleteWithResponse":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerAsyncClient.deleteWithResponseInternal":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerAsyncClient.filterBlobs":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerAsyncClient.filterBlobsWithResponse":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerAsyncClient.filterBlobsWithResponseInternal":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerAsyncClient.getAccessPolicy":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.getAccessPolicyWithResponse":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.getAccessPolicyWithResponseInternal":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.getAccountInfo":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerAsyncClient.getAccountInfoWithResponse":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerAsyncClient.getAccountInfoWithResponseInternal":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerAsyncClient.getProperties":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerAsyncClient.getPropertiesWithResponse":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerAsyncClient.getPropertiesWithResponseInternal":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerAsyncClient.listBlobFlatSegment":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerAsyncClient.listBlobFlatSegmentWithResponse":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerAsyncClient.listBlobFlatSegmentWithResponseInternal":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerAsyncClient.listBlobHierarchySegment":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerAsyncClient.listBlobHierarchySegmentWithResponse":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerAsyncClient.listBlobHierarchySegmentWithResponseInternal":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerAsyncClient.releaseLease":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerAsyncClient.releaseLeaseWithResponse":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerAsyncClient.releaseLeaseWithResponseInternal":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerAsyncClient.rename":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerAsyncClient.renameWithResponse":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerAsyncClient.renameWithResponseInternal":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerAsyncClient.renewLease":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerAsyncClient.renewLeaseWithResponse":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerAsyncClient.renewLeaseWithResponseInternal":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerAsyncClient.restore":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerAsyncClient.restoreWithResponse":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerAsyncClient.restoreWithResponseInternal":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerAsyncClient.setAccessPolicy":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.setAccessPolicyWithResponse":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.setAccessPolicyWithResponseInternal":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.setMetadata":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerAsyncClient.setMetadataWithResponse":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerAsyncClient.setMetadataWithResponseInternal":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerClient":"Storage.Blob.Container","com.azure.storage.blob.ContainerClient.acquireLease":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerClient.acquireLeaseWithResponse":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerClient.acquireLeaseWithResponseInternal":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerClient.breakLease":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerClient.breakLeaseWithResponse":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerClient.breakLeaseWithResponseInternal":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerClient.changeLease":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerClient.changeLeaseWithResponse":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerClient.changeLeaseWithResponseInternal":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerClient.create":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerClient.createSession":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerClient.createSessionWithResponse":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerClient.createSessionWithResponseInternal":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerClient.createWithResponse":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerClient.createWithResponseInternal":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerClient.delete":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerClient.deleteWithResponse":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerClient.deleteWithResponseInternal":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerClient.filterBlobs":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerClient.filterBlobsWithResponse":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerClient.filterBlobsWithResponseInternal":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerClient.getAccessPolicy":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerClient.getAccessPolicyWithResponse":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerClient.getAccessPolicyWithResponseInternal":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerClient.getAccountInfo":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerClient.getAccountInfoWithResponse":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerClient.getAccountInfoWithResponseInternal":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerClient.getProperties":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerClient.getPropertiesWithResponse":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerClient.getPropertiesWithResponseInternal":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerClient.listBlobFlatSegment":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerClient.listBlobFlatSegmentWithResponse":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerClient.listBlobFlatSegmentWithResponseInternal":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerClient.listBlobHierarchySegment":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerClient.listBlobHierarchySegmentWithResponse":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerClient.listBlobHierarchySegmentWithResponseInternal":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerClient.releaseLease":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerClient.releaseLeaseWithResponse":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerClient.releaseLeaseWithResponseInternal":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerClient.rename":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerClient.renameWithResponse":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerClient.renameWithResponseInternal":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerClient.renewLease":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerClient.renewLeaseWithResponse":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerClient.renewLeaseWithResponseInternal":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerClient.restore":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerClient.restoreWithResponse":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerClient.restoreWithResponseInternal":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerClient.setAccessPolicy":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerClient.setAccessPolicyWithResponse":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerClient.setAccessPolicyWithResponseInternal":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerClient.setMetadata":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerClient.setMetadataWithResponse":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerClient.setMetadataWithResponseInternal":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.PageBlobAsyncClient":"Storage.Blob.PageBlob","com.azure.storage.blob.PageBlobAsyncClient.clearPages":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobAsyncClient.clearPagesWithResponse":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobAsyncClient.clearPagesWithResponseInternal":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobAsyncClient.copyIncremental":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobAsyncClient.copyIncrementalWithResponse":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobAsyncClient.copyIncrementalWithResponseInternal":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobAsyncClient.create":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobAsyncClient.createWithResponse":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobAsyncClient.createWithResponseInternal":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobAsyncClient.getPageRanges":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiff":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiffWithResponse":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiffWithResponseInternal":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesWithResponse":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesWithResponseInternal":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobAsyncClient.resize":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobAsyncClient.resizeWithResponse":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobAsyncClient.resizeWithResponseInternal":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobAsyncClient.setSequenceNumber":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobAsyncClient.setSequenceNumberWithResponse":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobAsyncClient.setSequenceNumberWithResponseInternal":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobAsyncClient.uploadPages":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromUrl":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromUrlWithResponse":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromUrlWithResponseInternal":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesWithResponse":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesWithResponseInternal":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobClient":"Storage.Blob.PageBlob","com.azure.storage.blob.PageBlobClient.clearPages":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobClient.clearPagesWithResponse":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobClient.clearPagesWithResponseInternal":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobClient.copyIncremental":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobClient.copyIncrementalWithResponse":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobClient.copyIncrementalWithResponseInternal":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobClient.create":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobClient.createWithResponse":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobClient.createWithResponseInternal":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobClient.getPageRanges":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobClient.getPageRangesDiff":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobClient.getPageRangesDiffWithResponse":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobClient.getPageRangesDiffWithResponseInternal":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobClient.getPageRangesWithResponse":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobClient.getPageRangesWithResponseInternal":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobClient.resize":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobClient.resizeWithResponse":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobClient.resizeWithResponseInternal":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobClient.setSequenceNumber":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobClient.setSequenceNumberWithResponse":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobClient.setSequenceNumberWithResponseInternal":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobClient.uploadPages":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobClient.uploadPagesFromUrl":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobClient.uploadPagesFromUrlWithResponse":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobClient.uploadPagesFromUrlWithResponseInternal":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobClient.uploadPagesWithResponse":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobClient.uploadPagesWithResponseInternal":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.ServiceAsyncClient":"Storage.Blob.Service","com.azure.storage.blob.ServiceAsyncClient.filterBlobs":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceAsyncClient.filterBlobsWithResponse":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceAsyncClient.filterBlobsWithResponseInternal":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceAsyncClient.getAccountInfo":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceAsyncClient.getAccountInfoWithResponse":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceAsyncClient.getAccountInfoWithResponseInternal":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceAsyncClient.getProperties":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceAsyncClient.getPropertiesWithResponse":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceAsyncClient.getPropertiesWithResponseInternal":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceAsyncClient.getStatistics":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceAsyncClient.getStatisticsWithResponse":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceAsyncClient.getStatisticsWithResponseInternal":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceAsyncClient.getUserDelegationKey":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceAsyncClient.getUserDelegationKeyWithResponse":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceAsyncClient.getUserDelegationKeyWithResponseInternal":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceAsyncClient.listContainersSegment":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceAsyncClient.listContainersSegmentWithResponse":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceAsyncClient.listContainersSegmentWithResponseInternal":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceAsyncClient.setProperties":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceAsyncClient.setPropertiesWithResponse":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceAsyncClient.setPropertiesWithResponseInternal":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceClient":"Storage.Blob.Service","com.azure.storage.blob.ServiceClient.filterBlobs":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceClient.filterBlobsWithResponse":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceClient.filterBlobsWithResponseInternal":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceClient.getAccountInfo":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceClient.getAccountInfoWithResponse":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceClient.getAccountInfoWithResponseInternal":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceClient.getProperties":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceClient.getPropertiesWithResponse":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceClient.getPropertiesWithResponseInternal":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceClient.getStatistics":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceClient.getStatisticsWithResponse":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceClient.getStatisticsWithResponseInternal":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceClient.getUserDelegationKey":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceClient.getUserDelegationKeyWithResponse":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceClient.getUserDelegationKeyWithResponseInternal":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceClient.listContainersSegment":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceClient.listContainersSegmentWithResponse":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceClient.listContainersSegmentWithResponseInternal":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceClient.setProperties":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceClient.setPropertiesWithResponse":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceClient.setPropertiesWithResponseInternal":"Storage.Blob.Service.setProperties","com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockHeaders":null,"com.azure.storage.blob.implementation.models.AppendBlobsCreateHeaders":null,"com.azure.storage.blob.implementation.models.AppendBlobsSealHeaders":null,"com.azure.storage.blob.implementation.models.ArrowFieldInternal":"Storage.Blob.ArrowField","com.azure.storage.blob.implementation.models.ArrowTextConfigurationInternal":"Storage.Blob.ArrowConfiguration","com.azure.storage.blob.implementation.models.AuthenticationType":"Storage.Blob.AuthenticationType","com.azure.storage.blob.implementation.models.BlobContainersSegment":"Storage.Blob.ListContainersResponse","com.azure.storage.blob.implementation.models.BlobCopySourceTags":"Storage.Blob.BlobCopySourceTags","com.azure.storage.blob.implementation.models.BlobDeleteType":"Storage.Blob.BlobDeleteType","com.azure.storage.blob.implementation.models.BlobExpiryOptions":"Storage.Blob.BlobExpiryOptions","com.azure.storage.blob.implementation.models.BlobHierarchyListSegment":"Customizations.BlobHierarchyListSegmentJava","com.azure.storage.blob.implementation.models.BlobItemInternal":"Storage.Blob.BlobItem","com.azure.storage.blob.implementation.models.BlobItemPropertiesInternal":"Storage.Blob.BlobProperties","com.azure.storage.blob.implementation.models.BlobLayoutEndpoints":"Storage.Blob.BlobLayoutEndpoints","com.azure.storage.blob.implementation.models.BlobLayoutEndpointsEndpointItem":"Storage.Blob.BlobLayoutEndpoint","com.azure.storage.blob.implementation.models.BlobLayoutInternal":"Storage.Blob.BlobLayout","com.azure.storage.blob.implementation.models.BlobLayoutRanges":"Storage.Blob.BlobLayoutRanges","com.azure.storage.blob.implementation.models.BlobLayoutRangesRangeItem":"Storage.Blob.BlobLayoutRange","com.azure.storage.blob.implementation.models.BlobName":"Storage.Blob.BlobName","com.azure.storage.blob.implementation.models.BlobPrefixInternal":"Storage.Blob.BlobPrefix","com.azure.storage.blob.implementation.models.BlobSignedIdentifiers":"Storage.Blob.SignedIdentifiers","com.azure.storage.blob.implementation.models.BlobStorageError":"Customizations.BlobStorageError","com.azure.storage.blob.implementation.models.BlobTag":"Storage.Blob.BlobTag","com.azure.storage.blob.implementation.models.BlobTags":"Storage.Blob.BlobTags","com.azure.storage.blob.implementation.models.BlobsAbortCopyFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlobsAcquireLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsBreakLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsChangeLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsCopyFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlobsCreateSnapshotHeaders":null,"com.azure.storage.blob.implementation.models.BlobsDeleteHeaders":null,"com.azure.storage.blob.implementation.models.BlobsDeleteImmutabilityPolicyHeaders":null,"com.azure.storage.blob.implementation.models.BlobsDownloadHeaders":null,"com.azure.storage.blob.implementation.models.BlobsGetAccountInfoHeaders":null,"com.azure.storage.blob.implementation.models.BlobsGetLayoutHeaders":null,"com.azure.storage.blob.implementation.models.BlobsGetPropertiesHeaders":null,"com.azure.storage.blob.implementation.models.BlobsGetTagsHeaders":null,"com.azure.storage.blob.implementation.models.BlobsQueryHeaders":null,"com.azure.storage.blob.implementation.models.BlobsReleaseLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsRenewLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetExpiryHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetHttpHeadersHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetImmutabilityPolicyHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetLegalHoldHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetMetadataHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetTagsHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetTierHeaders":null,"com.azure.storage.blob.implementation.models.BlobsStartCopyFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlobsUndeleteHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsCommitBlockListHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsGetBlockListHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsStageBlockFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsStageBlockHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsUploadBlobFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsUploadHeaders":null,"com.azure.storage.blob.implementation.models.ContainersAcquireLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersBreakLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersChangeLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersCreateHeaders":null,"com.azure.storage.blob.implementation.models.ContainersCreateSessionHeaders":null,"com.azure.storage.blob.implementation.models.ContainersDeleteHeaders":null,"com.azure.storage.blob.implementation.models.ContainersFilterBlobsHeaders":null,"com.azure.storage.blob.implementation.models.ContainersGetAccessPolicyHeaders":null,"com.azure.storage.blob.implementation.models.ContainersGetAccountInfoHeaders":null,"com.azure.storage.blob.implementation.models.ContainersGetPropertiesHeaders":null,"com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentHeaders":null,"com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentHeaders":null,"com.azure.storage.blob.implementation.models.ContainersReleaseLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersRenameHeaders":null,"com.azure.storage.blob.implementation.models.ContainersRenewLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersRestoreHeaders":null,"com.azure.storage.blob.implementation.models.ContainersSetAccessPolicyHeaders":null,"com.azure.storage.blob.implementation.models.ContainersSetMetadataHeaders":null,"com.azure.storage.blob.implementation.models.CreateSessionConfiguration":"Storage.Blob.CreateSessionConfiguration","com.azure.storage.blob.implementation.models.CreateSessionResponse":"Storage.Blob.CreateSessionResponse","com.azure.storage.blob.implementation.models.DelimitedTextConfiguration":"Storage.Blob.DelimitedTextConfiguration","com.azure.storage.blob.implementation.models.DownloadHint":"Storage.Blob.DownloadHint","com.azure.storage.blob.implementation.models.FilterBlobItem":"Storage.Blob.FilterBlobItem","com.azure.storage.blob.implementation.models.FilterBlobSegment":"Storage.Blob.FilteredBlobResponse","com.azure.storage.blob.implementation.models.FilterBlobsIncludeItem":"Storage.Blob.FilterBlobsIncludeItem","com.azure.storage.blob.implementation.models.JsonTextConfigurationInternal":"Storage.Blob.JsonTextConfiguration","com.azure.storage.blob.implementation.models.ListBlobsFlatSegmentResponse":"Storage.Blob.ListBlobsResponse","com.azure.storage.blob.implementation.models.ListBlobsHierarchySegmentResponse":"Storage.Blob.ListBlobsHierarchicalResponse","com.azure.storage.blob.implementation.models.PageBlobsClearPagesHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsCopyIncrementalHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsCreateHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesDiffHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsResizeHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsSetSequenceNumberHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsUploadPagesFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsUploadPagesHeaders":null,"com.azure.storage.blob.implementation.models.ParquetTextConfiguration":"Customizations.StorageCppParquetConfiguration","com.azure.storage.blob.implementation.models.PremiumPageBlobAccessTier":"Storage.Blob.PremiumPageBlobAccessTier","com.azure.storage.blob.implementation.models.QueryFormat":"Storage.Blob.QueryFormat","com.azure.storage.blob.implementation.models.QueryFormatType":"Storage.Blob.QueryType","com.azure.storage.blob.implementation.models.QueryRequest":"Storage.Blob.QueryRequest","com.azure.storage.blob.implementation.models.QueryRequestType":"Storage.Blob.QueryRequestType","com.azure.storage.blob.implementation.models.QuerySerialization":"Storage.Blob.QuerySerialization","com.azure.storage.blob.implementation.models.ServicesFilterBlobsHeaders":null,"com.azure.storage.blob.implementation.models.ServicesGetAccountInfoHeaders":null,"com.azure.storage.blob.implementation.models.ServicesGetPropertiesHeaders":null,"com.azure.storage.blob.implementation.models.ServicesGetStatisticsHeaders":null,"com.azure.storage.blob.implementation.models.ServicesGetUserDelegationKeyHeaders":null,"com.azure.storage.blob.implementation.models.ServicesListContainersSegmentHeaders":null,"com.azure.storage.blob.implementation.models.ServicesSetPropertiesHeaders":null,"com.azure.storage.blob.implementation.models.SessionCredentials":"Storage.Blob.SessionCredentials","com.azure.storage.blob.models.AccessTier":"Storage.Blob.AccessTier","com.azure.storage.blob.models.AccountKind":"Storage.Blob.AccountKind","com.azure.storage.blob.models.ArchiveStatus":"Storage.Blob.ArchiveStatus","com.azure.storage.blob.models.BlobAccessPolicy":"Storage.Blob.AccessPolicy","com.azure.storage.blob.models.BlobAnalyticsLogging":"Storage.Blob.Logging","com.azure.storage.blob.models.BlobContainerItem":"Storage.Blob.ContainerItem","com.azure.storage.blob.models.BlobContainerItemProperties":"Storage.Blob.ContainerProperties","com.azure.storage.blob.models.BlobCorsRule":"Storage.Blob.CorsRule","com.azure.storage.blob.models.BlobErrorCode":"Storage.Blob.StorageErrorCode","com.azure.storage.blob.models.BlobImmutabilityPolicyMode":"Storage.Blob.ImmutabilityPolicyMode","com.azure.storage.blob.models.BlobMetrics":"Storage.Blob.Metrics","com.azure.storage.blob.models.BlobRetentionPolicy":"Storage.Blob.RetentionPolicy","com.azure.storage.blob.models.BlobServiceProperties":"Storage.Blob.BlobServiceProperties","com.azure.storage.blob.models.BlobServiceStatistics":"Storage.Blob.StorageServiceStats","com.azure.storage.blob.models.BlobSignedIdentifier":"Storage.Blob.SignedIdentifier","com.azure.storage.blob.models.BlobType":"Storage.Blob.BlobType","com.azure.storage.blob.models.Block":"Storage.Blob.Block","com.azure.storage.blob.models.BlockList":"Storage.Blob.BlockList","com.azure.storage.blob.models.BlockListType":"Storage.Blob.BlockListType","com.azure.storage.blob.models.BlockLookupList":"Storage.Blob.BlockLookupList","com.azure.storage.blob.models.ClearRange":"Storage.Blob.ClearRange","com.azure.storage.blob.models.CopyStatusType":"Storage.Blob.CopyStatus","com.azure.storage.blob.models.DeleteSnapshotsOptionType":"Storage.Blob.DeleteSnapshotsOptionType","com.azure.storage.blob.models.EncryptionAlgorithmType":"Storage.Blob.EncryptionAlgorithmType","com.azure.storage.blob.models.FileShareTokenIntent":"Storage.Blob.FileShareTokenIntent","com.azure.storage.blob.models.GeoReplication":"Storage.Blob.GeoReplication","com.azure.storage.blob.models.GeoReplicationStatus":"Storage.Blob.GeoReplicationStatusType","com.azure.storage.blob.models.KeyInfo":"Storage.Blob.KeyInfo","com.azure.storage.blob.models.LeaseDurationType":"Storage.Blob.LeaseDuration","com.azure.storage.blob.models.LeaseStateType":"Storage.Blob.LeaseState","com.azure.storage.blob.models.LeaseStatusType":"Storage.Blob.LeaseStatus","com.azure.storage.blob.models.ListBlobContainersIncludeType":"Storage.Blob.ListContainersIncludeType","com.azure.storage.blob.models.ListBlobsIncludeItem":"Storage.Blob.ListBlobsIncludeItem","com.azure.storage.blob.models.PageList":"Storage.Blob.PageList","com.azure.storage.blob.models.PageRange":"Storage.Blob.PageRange","com.azure.storage.blob.models.PublicAccessType":"Storage.Blob.PublicAccessType","com.azure.storage.blob.models.RehydratePriority":"Storage.Blob.RehydratePriority","com.azure.storage.blob.models.SequenceNumberActionType":"Storage.Blob.SequenceNumberActionType","com.azure.storage.blob.models.SkuName":"Storage.Blob.SkuName","com.azure.storage.blob.models.StaticWebsite":"Storage.Blob.StaticWebsite","com.azure.storage.blob.models.UserDelegationKey":"Storage.Blob.UserDelegationKey"},"generatedFiles":["src/main/java/com/azure/storage/blob/AppendBlobAsyncClient.java","src/main/java/com/azure/storage/blob/AppendBlobClient.java","src/main/java/com/azure/storage/blob/AzureBlobStorageBuilder.java","src/main/java/com/azure/storage/blob/BlobAsyncClient.java","src/main/java/com/azure/storage/blob/BlobClient.java","src/main/java/com/azure/storage/blob/BlobServiceVersion.java","src/main/java/com/azure/storage/blob/BlockBlobAsyncClient.java","src/main/java/com/azure/storage/blob/BlockBlobClient.java","src/main/java/com/azure/storage/blob/ContainerAsyncClient.java","src/main/java/com/azure/storage/blob/ContainerClient.java","src/main/java/com/azure/storage/blob/PageBlobAsyncClient.java","src/main/java/com/azure/storage/blob/PageBlobClient.java","src/main/java/com/azure/storage/blob/ServiceAsyncClient.java","src/main/java/com/azure/storage/blob/ServiceClient.java","src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java","src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java","src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java","src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java","src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java","src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java","src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java","src/main/java/com/azure/storage/blob/implementation/XmlSerializer.java","src/main/java/com/azure/storage/blob/implementation/XmlSerializerProviders.java","src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsCreateHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsSealHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ArrowFieldInternal.java","src/main/java/com/azure/storage/blob/implementation/models/ArrowTextConfigurationInternal.java","src/main/java/com/azure/storage/blob/implementation/models/AuthenticationType.java","src/main/java/com/azure/storage/blob/implementation/models/BlobContainersSegment.java","src/main/java/com/azure/storage/blob/implementation/models/BlobCopySourceTags.java","src/main/java/com/azure/storage/blob/implementation/models/BlobDeleteType.java","src/main/java/com/azure/storage/blob/implementation/models/BlobExpiryOptions.java","src/main/java/com/azure/storage/blob/implementation/models/BlobHierarchyListSegment.java","src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java","src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutEndpoints.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutEndpointsEndpointItem.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutInternal.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutRanges.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutRangesRangeItem.java","src/main/java/com/azure/storage/blob/implementation/models/BlobName.java","src/main/java/com/azure/storage/blob/implementation/models/BlobPrefixInternal.java","src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifiers.java","src/main/java/com/azure/storage/blob/implementation/models/BlobStorageError.java","src/main/java/com/azure/storage/blob/implementation/models/BlobStorageErrorException.java","src/main/java/com/azure/storage/blob/implementation/models/BlobTag.java","src/main/java/com/azure/storage/blob/implementation/models/BlobTags.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsAbortCopyFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsAcquireLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsBreakLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsChangeLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsCopyFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsCreateSnapshotHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteImmutabilityPolicyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsDownloadHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccountInfoHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsGetLayoutHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsGetTagsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsQueryHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsReleaseLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsRenewLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetExpiryHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetHttpHeadersHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetLegalHoldHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetMetadataHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTagsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTierHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsStartCopyFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsUndeleteHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsCommitBlockListHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsGetBlockListHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadBlobFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersAcquireLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersBreakLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersChangeLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateSessionHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersDeleteHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersFilterBlobsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccessPolicyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccountInfoHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersGetPropertiesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersReleaseLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersRenameHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersRenewLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersRestoreHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersSetAccessPolicyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersSetMetadataHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/CreateSessionConfiguration.java","src/main/java/com/azure/storage/blob/implementation/models/CreateSessionResponse.java","src/main/java/com/azure/storage/blob/implementation/models/DelimitedTextConfiguration.java","src/main/java/com/azure/storage/blob/implementation/models/DownloadHint.java","src/main/java/com/azure/storage/blob/implementation/models/FilterBlobItem.java","src/main/java/com/azure/storage/blob/implementation/models/FilterBlobSegment.java","src/main/java/com/azure/storage/blob/implementation/models/FilterBlobsIncludeItem.java","src/main/java/com/azure/storage/blob/implementation/models/JsonTextConfigurationInternal.java","src/main/java/com/azure/storage/blob/implementation/models/ListBlobsFlatSegmentResponse.java","src/main/java/com/azure/storage/blob/implementation/models/ListBlobsHierarchySegmentResponse.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsClearPagesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCopyIncrementalHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCreateHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsResizeHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsSetSequenceNumberHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ParquetTextConfiguration.java","src/main/java/com/azure/storage/blob/implementation/models/PremiumPageBlobAccessTier.java","src/main/java/com/azure/storage/blob/implementation/models/QueryFormat.java","src/main/java/com/azure/storage/blob/implementation/models/QueryFormatType.java","src/main/java/com/azure/storage/blob/implementation/models/QueryRequest.java","src/main/java/com/azure/storage/blob/implementation/models/QueryRequestType.java","src/main/java/com/azure/storage/blob/implementation/models/QuerySerialization.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesFilterBlobsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesGetAccountInfoHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesGetPropertiesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesGetStatisticsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesGetUserDelegationKeyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesListContainersSegmentHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesSetPropertiesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/SessionCredentials.java","src/main/java/com/azure/storage/blob/implementation/models/package-info.java","src/main/java/com/azure/storage/blob/implementation/package-info.java","src/main/java/com/azure/storage/blob/models/AccessTier.java","src/main/java/com/azure/storage/blob/models/AccountKind.java","src/main/java/com/azure/storage/blob/models/ArchiveStatus.java","src/main/java/com/azure/storage/blob/models/BlobAccessPolicy.java","src/main/java/com/azure/storage/blob/models/BlobAnalyticsLogging.java","src/main/java/com/azure/storage/blob/models/BlobContainerItem.java","src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java","src/main/java/com/azure/storage/blob/models/BlobCorsRule.java","src/main/java/com/azure/storage/blob/models/BlobErrorCode.java","src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicyMode.java","src/main/java/com/azure/storage/blob/models/BlobMetrics.java","src/main/java/com/azure/storage/blob/models/BlobRetentionPolicy.java","src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java","src/main/java/com/azure/storage/blob/models/BlobServiceStatistics.java","src/main/java/com/azure/storage/blob/models/BlobSignedIdentifier.java","src/main/java/com/azure/storage/blob/models/BlobType.java","src/main/java/com/azure/storage/blob/models/Block.java","src/main/java/com/azure/storage/blob/models/BlockList.java","src/main/java/com/azure/storage/blob/models/BlockListType.java","src/main/java/com/azure/storage/blob/models/BlockLookupList.java","src/main/java/com/azure/storage/blob/models/ClearRange.java","src/main/java/com/azure/storage/blob/models/CopyStatusType.java","src/main/java/com/azure/storage/blob/models/DeleteSnapshotsOptionType.java","src/main/java/com/azure/storage/blob/models/EncryptionAlgorithmType.java","src/main/java/com/azure/storage/blob/models/FileShareTokenIntent.java","src/main/java/com/azure/storage/blob/models/GeoReplication.java","src/main/java/com/azure/storage/blob/models/GeoReplicationStatus.java","src/main/java/com/azure/storage/blob/models/KeyInfo.java","src/main/java/com/azure/storage/blob/models/LeaseDurationType.java","src/main/java/com/azure/storage/blob/models/LeaseStateType.java","src/main/java/com/azure/storage/blob/models/LeaseStatusType.java","src/main/java/com/azure/storage/blob/models/ListBlobContainersIncludeType.java","src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java","src/main/java/com/azure/storage/blob/models/PageList.java","src/main/java/com/azure/storage/blob/models/PageRange.java","src/main/java/com/azure/storage/blob/models/PublicAccessType.java","src/main/java/com/azure/storage/blob/models/RehydratePriority.java","src/main/java/com/azure/storage/blob/models/SequenceNumberActionType.java","src/main/java/com/azure/storage/blob/models/SkuName.java","src/main/java/com/azure/storage/blob/models/StaticWebsite.java","src/main/java/com/azure/storage/blob/models/UserDelegationKey.java","src/main/java/com/azure/storage/blob/models/package-info.java","src/main/java/com/azure/storage/blob/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Storage.Blob":"2027-03-07"},"crossLanguagePackageId":"Storage.Blob","crossLanguageVersion":"45f6c09b99b5","crossLanguageDefinitions":{"com.azure.storage.blob.AppendBlobAsyncClient":"Storage.Blob.AppendBlob","com.azure.storage.blob.AppendBlobAsyncClient.appendBlock":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrl":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrlWithResponse":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrlWithResponseInternal":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockWithResponse":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockWithResponseInternal":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobAsyncClient.create":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobAsyncClient.createWithResponse":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobAsyncClient.createWithResponseInternal":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobAsyncClient.seal":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobAsyncClient.sealWithResponse":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobAsyncClient.sealWithResponseInternal":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobClient":"Storage.Blob.AppendBlob","com.azure.storage.blob.AppendBlobClient.appendBlock":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobClient.appendBlockFromUrl":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobClient.appendBlockFromUrlWithResponse":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobClient.appendBlockFromUrlWithResponseInternal":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobClient.appendBlockWithResponse":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobClient.appendBlockWithResponseInternal":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobClient.create":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobClient.createWithResponse":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobClient.createWithResponseInternal":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobClient.seal":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobClient.sealWithResponse":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobClient.sealWithResponseInternal":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AzureBlobStorageBuilder":"Storage.Blob","com.azure.storage.blob.BlobAsyncClient":"Storage.Blob.Blob","com.azure.storage.blob.BlobAsyncClient.abortCopyFromUrl":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.abortCopyFromUrlWithResponse":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.abortCopyFromUrlWithResponseInternal":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.acquireLease":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobAsyncClient.acquireLeaseWithResponse":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobAsyncClient.acquireLeaseWithResponseInternal":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobAsyncClient.breakLease":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobAsyncClient.breakLeaseWithResponse":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobAsyncClient.breakLeaseWithResponseInternal":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobAsyncClient.changeLease":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobAsyncClient.changeLeaseWithResponse":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobAsyncClient.changeLeaseWithResponseInternal":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobAsyncClient.copyFromUrl":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobAsyncClient.copyFromUrlWithResponse":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobAsyncClient.copyFromUrlWithResponseInternal":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobAsyncClient.createSnapshot":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobAsyncClient.createSnapshotWithResponse":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobAsyncClient.createSnapshotWithResponseInternal":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobAsyncClient.delete":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobAsyncClient.deleteImmutabilityPolicy":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.deleteImmutabilityPolicyWithResponse":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.deleteImmutabilityPolicyWithResponseInternal":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.deleteWithResponse":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobAsyncClient.deleteWithResponseInternal":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobAsyncClient.download":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobAsyncClient.downloadWithResponse":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobAsyncClient.downloadWithResponseInternal":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobAsyncClient.getAccountInfo":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobAsyncClient.getAccountInfoWithResponse":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobAsyncClient.getAccountInfoWithResponseInternal":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobAsyncClient.getLayout":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobAsyncClient.getLayoutWithResponse":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobAsyncClient.getLayoutWithResponseInternal":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobAsyncClient.getProperties":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobAsyncClient.getPropertiesWithResponse":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobAsyncClient.getPropertiesWithResponseInternal":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobAsyncClient.getTags":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobAsyncClient.getTagsWithResponse":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobAsyncClient.getTagsWithResponseInternal":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobAsyncClient.query":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobAsyncClient.queryWithResponse":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobAsyncClient.queryWithResponseInternal":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobAsyncClient.releaseLease":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobAsyncClient.releaseLeaseWithResponse":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobAsyncClient.releaseLeaseWithResponseInternal":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobAsyncClient.renewLease":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobAsyncClient.renewLeaseWithResponse":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobAsyncClient.renewLeaseWithResponseInternal":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobAsyncClient.setExpiry":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobAsyncClient.setExpiryWithResponse":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobAsyncClient.setExpiryWithResponseInternal":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobAsyncClient.setHttpHeaders":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobAsyncClient.setHttpHeadersWithResponse":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobAsyncClient.setHttpHeadersWithResponseInternal":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobAsyncClient.setImmutabilityPolicy":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.setImmutabilityPolicyWithResponse":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.setImmutabilityPolicyWithResponseInternal":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.setLegalHold":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobAsyncClient.setLegalHoldWithResponse":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobAsyncClient.setLegalHoldWithResponseInternal":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobAsyncClient.setMetadata":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobAsyncClient.setMetadataWithResponse":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobAsyncClient.setMetadataWithResponseInternal":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobAsyncClient.setTags":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobAsyncClient.setTagsWithResponse":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobAsyncClient.setTagsWithResponseInternal":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobAsyncClient.setTier":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobAsyncClient.setTierWithResponse":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobAsyncClient.setTierWithResponseInternal":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobAsyncClient.startCopyFromUrl":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.startCopyFromUrlWithResponse":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.startCopyFromUrlWithResponseInternal":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.undelete":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobAsyncClient.undeleteWithResponse":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobAsyncClient.undeleteWithResponseInternal":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobClient":"Storage.Blob.Blob","com.azure.storage.blob.BlobClient.abortCopyFromUrl":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobClient.abortCopyFromUrlWithResponse":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobClient.abortCopyFromUrlWithResponseInternal":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobClient.acquireLease":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobClient.acquireLeaseWithResponse":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobClient.acquireLeaseWithResponseInternal":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobClient.breakLease":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobClient.breakLeaseWithResponse":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobClient.breakLeaseWithResponseInternal":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobClient.changeLease":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobClient.changeLeaseWithResponse":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobClient.changeLeaseWithResponseInternal":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobClient.copyFromUrl":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobClient.copyFromUrlWithResponse":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobClient.copyFromUrlWithResponseInternal":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobClient.createSnapshot":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobClient.createSnapshotWithResponse":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobClient.createSnapshotWithResponseInternal":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobClient.delete":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobClient.deleteImmutabilityPolicy":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobClient.deleteImmutabilityPolicyWithResponse":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobClient.deleteImmutabilityPolicyWithResponseInternal":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobClient.deleteWithResponse":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobClient.deleteWithResponseInternal":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobClient.download":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobClient.downloadWithResponse":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobClient.downloadWithResponseInternal":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobClient.getAccountInfo":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobClient.getAccountInfoWithResponse":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobClient.getAccountInfoWithResponseInternal":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobClient.getLayout":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobClient.getLayoutWithResponse":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobClient.getLayoutWithResponseInternal":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobClient.getProperties":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobClient.getPropertiesWithResponse":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobClient.getPropertiesWithResponseInternal":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobClient.getTags":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobClient.getTagsWithResponse":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobClient.getTagsWithResponseInternal":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobClient.query":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobClient.queryWithResponse":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobClient.queryWithResponseInternal":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobClient.releaseLease":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobClient.releaseLeaseWithResponse":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobClient.releaseLeaseWithResponseInternal":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobClient.renewLease":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobClient.renewLeaseWithResponse":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobClient.renewLeaseWithResponseInternal":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobClient.setExpiry":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobClient.setExpiryWithResponse":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobClient.setExpiryWithResponseInternal":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobClient.setHttpHeaders":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobClient.setHttpHeadersWithResponse":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobClient.setHttpHeadersWithResponseInternal":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobClient.setImmutabilityPolicy":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobClient.setImmutabilityPolicyWithResponse":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobClient.setImmutabilityPolicyWithResponseInternal":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobClient.setLegalHold":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobClient.setLegalHoldWithResponse":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobClient.setLegalHoldWithResponseInternal":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobClient.setMetadata":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobClient.setMetadataWithResponse":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobClient.setMetadataWithResponseInternal":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobClient.setTags":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobClient.setTagsWithResponse":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobClient.setTagsWithResponseInternal":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobClient.setTier":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobClient.setTierWithResponse":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobClient.setTierWithResponseInternal":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobClient.startCopyFromUrl":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobClient.startCopyFromUrlWithResponse":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobClient.startCopyFromUrlWithResponseInternal":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobClient.undelete":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobClient.undeleteWithResponse":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobClient.undeleteWithResponseInternal":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlockBlobAsyncClient":"Storage.Blob.BlockBlob","com.azure.storage.blob.BlockBlobAsyncClient.commitBlockList":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobAsyncClient.commitBlockListWithResponse":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobAsyncClient.commitBlockListWithResponseInternal":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobAsyncClient.getBlockList":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobAsyncClient.getBlockListWithResponse":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobAsyncClient.getBlockListWithResponseInternal":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobAsyncClient.stageBlock":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromUrl":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromUrlWithResponse":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromUrlWithResponseInternal":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockWithResponse":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockWithResponseInternal":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobAsyncClient.upload":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobAsyncClient.uploadBlobFromUrl":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.uploadBlobFromUrlWithResponse":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.uploadBlobFromUrlWithResponseInternal":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.uploadWithResponse":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobAsyncClient.uploadWithResponseInternal":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobClient":"Storage.Blob.BlockBlob","com.azure.storage.blob.BlockBlobClient.commitBlockList":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobClient.commitBlockListWithResponse":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobClient.commitBlockListWithResponseInternal":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobClient.getBlockList":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobClient.getBlockListWithResponse":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobClient.getBlockListWithResponseInternal":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobClient.stageBlock":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobClient.stageBlockFromUrl":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobClient.stageBlockFromUrlWithResponse":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobClient.stageBlockFromUrlWithResponseInternal":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobClient.stageBlockWithResponse":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobClient.stageBlockWithResponseInternal":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobClient.upload":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobClient.uploadBlobFromUrl":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobClient.uploadBlobFromUrlWithResponse":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobClient.uploadBlobFromUrlWithResponseInternal":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobClient.uploadWithResponse":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobClient.uploadWithResponseInternal":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.ContainerAsyncClient":"Storage.Blob.Container","com.azure.storage.blob.ContainerAsyncClient.acquireLease":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerAsyncClient.acquireLeaseWithResponse":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerAsyncClient.acquireLeaseWithResponseInternal":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerAsyncClient.breakLease":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerAsyncClient.breakLeaseWithResponse":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerAsyncClient.breakLeaseWithResponseInternal":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerAsyncClient.changeLease":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerAsyncClient.changeLeaseWithResponse":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerAsyncClient.changeLeaseWithResponseInternal":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerAsyncClient.create":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerAsyncClient.createSession":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerAsyncClient.createSessionWithResponse":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerAsyncClient.createSessionWithResponseInternal":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerAsyncClient.createWithResponse":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerAsyncClient.createWithResponseInternal":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerAsyncClient.delete":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerAsyncClient.deleteWithResponse":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerAsyncClient.deleteWithResponseInternal":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerAsyncClient.filterBlobs":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerAsyncClient.filterBlobsWithResponse":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerAsyncClient.filterBlobsWithResponseInternal":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerAsyncClient.getAccessPolicy":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.getAccessPolicyWithResponse":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.getAccessPolicyWithResponseInternal":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.getAccountInfo":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerAsyncClient.getAccountInfoWithResponse":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerAsyncClient.getAccountInfoWithResponseInternal":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerAsyncClient.getProperties":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerAsyncClient.getPropertiesWithResponse":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerAsyncClient.getPropertiesWithResponseInternal":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerAsyncClient.listBlobFlatSegment":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerAsyncClient.listBlobFlatSegmentWithResponse":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerAsyncClient.listBlobFlatSegmentWithResponseInternal":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerAsyncClient.listBlobHierarchySegment":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerAsyncClient.listBlobHierarchySegmentWithResponse":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerAsyncClient.listBlobHierarchySegmentWithResponseInternal":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerAsyncClient.releaseLease":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerAsyncClient.releaseLeaseWithResponse":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerAsyncClient.releaseLeaseWithResponseInternal":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerAsyncClient.rename":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerAsyncClient.renameWithResponse":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerAsyncClient.renameWithResponseInternal":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerAsyncClient.renewLease":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerAsyncClient.renewLeaseWithResponse":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerAsyncClient.renewLeaseWithResponseInternal":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerAsyncClient.restore":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerAsyncClient.restoreWithResponse":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerAsyncClient.restoreWithResponseInternal":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerAsyncClient.setAccessPolicy":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.setAccessPolicyWithResponse":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.setAccessPolicyWithResponseInternal":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.setMetadata":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerAsyncClient.setMetadataWithResponse":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerAsyncClient.setMetadataWithResponseInternal":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerClient":"Storage.Blob.Container","com.azure.storage.blob.ContainerClient.acquireLease":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerClient.acquireLeaseWithResponse":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerClient.acquireLeaseWithResponseInternal":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerClient.breakLease":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerClient.breakLeaseWithResponse":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerClient.breakLeaseWithResponseInternal":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerClient.changeLease":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerClient.changeLeaseWithResponse":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerClient.changeLeaseWithResponseInternal":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerClient.create":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerClient.createSession":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerClient.createSessionWithResponse":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerClient.createSessionWithResponseInternal":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerClient.createWithResponse":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerClient.createWithResponseInternal":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerClient.delete":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerClient.deleteWithResponse":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerClient.deleteWithResponseInternal":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerClient.filterBlobs":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerClient.filterBlobsWithResponse":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerClient.filterBlobsWithResponseInternal":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerClient.getAccessPolicy":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerClient.getAccessPolicyWithResponse":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerClient.getAccessPolicyWithResponseInternal":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerClient.getAccountInfo":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerClient.getAccountInfoWithResponse":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerClient.getAccountInfoWithResponseInternal":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerClient.getProperties":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerClient.getPropertiesWithResponse":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerClient.getPropertiesWithResponseInternal":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerClient.listBlobFlatSegment":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerClient.listBlobFlatSegmentWithResponse":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerClient.listBlobFlatSegmentWithResponseInternal":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerClient.listBlobHierarchySegment":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerClient.listBlobHierarchySegmentWithResponse":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerClient.listBlobHierarchySegmentWithResponseInternal":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerClient.releaseLease":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerClient.releaseLeaseWithResponse":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerClient.releaseLeaseWithResponseInternal":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerClient.rename":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerClient.renameWithResponse":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerClient.renameWithResponseInternal":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerClient.renewLease":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerClient.renewLeaseWithResponse":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerClient.renewLeaseWithResponseInternal":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerClient.restore":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerClient.restoreWithResponse":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerClient.restoreWithResponseInternal":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerClient.setAccessPolicy":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerClient.setAccessPolicyWithResponse":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerClient.setAccessPolicyWithResponseInternal":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerClient.setMetadata":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerClient.setMetadataWithResponse":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerClient.setMetadataWithResponseInternal":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.PageBlobAsyncClient":"Storage.Blob.PageBlob","com.azure.storage.blob.PageBlobAsyncClient.clearPages":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobAsyncClient.clearPagesWithResponse":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobAsyncClient.clearPagesWithResponseInternal":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobAsyncClient.copyIncremental":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobAsyncClient.copyIncrementalWithResponse":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobAsyncClient.copyIncrementalWithResponseInternal":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobAsyncClient.create":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobAsyncClient.createWithResponse":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobAsyncClient.createWithResponseInternal":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobAsyncClient.getPageRanges":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiff":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiffWithResponse":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiffWithResponseInternal":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesWithResponse":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesWithResponseInternal":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobAsyncClient.resize":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobAsyncClient.resizeWithResponse":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobAsyncClient.resizeWithResponseInternal":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobAsyncClient.setSequenceNumber":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobAsyncClient.setSequenceNumberWithResponse":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobAsyncClient.setSequenceNumberWithResponseInternal":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobAsyncClient.uploadPages":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromUrl":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromUrlWithResponse":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromUrlWithResponseInternal":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesWithResponse":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesWithResponseInternal":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobClient":"Storage.Blob.PageBlob","com.azure.storage.blob.PageBlobClient.clearPages":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobClient.clearPagesWithResponse":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobClient.clearPagesWithResponseInternal":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobClient.copyIncremental":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobClient.copyIncrementalWithResponse":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobClient.copyIncrementalWithResponseInternal":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobClient.create":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobClient.createWithResponse":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobClient.createWithResponseInternal":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobClient.getPageRanges":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobClient.getPageRangesDiff":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobClient.getPageRangesDiffWithResponse":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobClient.getPageRangesDiffWithResponseInternal":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobClient.getPageRangesWithResponse":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobClient.getPageRangesWithResponseInternal":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobClient.resize":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobClient.resizeWithResponse":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobClient.resizeWithResponseInternal":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobClient.setSequenceNumber":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobClient.setSequenceNumberWithResponse":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobClient.setSequenceNumberWithResponseInternal":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobClient.uploadPages":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobClient.uploadPagesFromUrl":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobClient.uploadPagesFromUrlWithResponse":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobClient.uploadPagesFromUrlWithResponseInternal":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobClient.uploadPagesWithResponse":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobClient.uploadPagesWithResponseInternal":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.ServiceAsyncClient":"Storage.Blob.Service","com.azure.storage.blob.ServiceAsyncClient.filterBlobs":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceAsyncClient.filterBlobsWithResponse":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceAsyncClient.filterBlobsWithResponseInternal":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceAsyncClient.getAccountInfo":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceAsyncClient.getAccountInfoWithResponse":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceAsyncClient.getAccountInfoWithResponseInternal":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceAsyncClient.getProperties":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceAsyncClient.getPropertiesWithResponse":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceAsyncClient.getPropertiesWithResponseInternal":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceAsyncClient.getStatistics":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceAsyncClient.getStatisticsWithResponse":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceAsyncClient.getStatisticsWithResponseInternal":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceAsyncClient.getUserDelegationKey":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceAsyncClient.getUserDelegationKeyWithResponse":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceAsyncClient.getUserDelegationKeyWithResponseInternal":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceAsyncClient.listContainersSegment":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceAsyncClient.listContainersSegmentWithResponse":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceAsyncClient.listContainersSegmentWithResponseInternal":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceAsyncClient.setProperties":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceAsyncClient.setPropertiesWithResponse":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceAsyncClient.setPropertiesWithResponseInternal":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceClient":"Storage.Blob.Service","com.azure.storage.blob.ServiceClient.filterBlobs":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceClient.filterBlobsWithResponse":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceClient.filterBlobsWithResponseInternal":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceClient.getAccountInfo":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceClient.getAccountInfoWithResponse":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceClient.getAccountInfoWithResponseInternal":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceClient.getProperties":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceClient.getPropertiesWithResponse":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceClient.getPropertiesWithResponseInternal":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceClient.getStatistics":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceClient.getStatisticsWithResponse":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceClient.getStatisticsWithResponseInternal":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceClient.getUserDelegationKey":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceClient.getUserDelegationKeyWithResponse":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceClient.getUserDelegationKeyWithResponseInternal":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceClient.listContainersSegment":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceClient.listContainersSegmentWithResponse":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceClient.listContainersSegmentWithResponseInternal":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceClient.setProperties":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceClient.setPropertiesWithResponse":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceClient.setPropertiesWithResponseInternal":"Storage.Blob.Service.setProperties","com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockHeaders":null,"com.azure.storage.blob.implementation.models.AppendBlobsCreateHeaders":null,"com.azure.storage.blob.implementation.models.AppendBlobsSealHeaders":null,"com.azure.storage.blob.implementation.models.ArrowFieldInternal":"Storage.Blob.ArrowField","com.azure.storage.blob.implementation.models.ArrowTextConfigurationInternal":"Storage.Blob.ArrowConfiguration","com.azure.storage.blob.implementation.models.AuthenticationType":"Storage.Blob.AuthenticationType","com.azure.storage.blob.implementation.models.BlobContainersSegment":"Storage.Blob.ListContainersResponse","com.azure.storage.blob.implementation.models.BlobCopySourceTags":"Storage.Blob.BlobCopySourceTags","com.azure.storage.blob.implementation.models.BlobDeleteType":"Storage.Blob.BlobDeleteType","com.azure.storage.blob.implementation.models.BlobExpiryOptions":"Storage.Blob.BlobExpiryOptions","com.azure.storage.blob.implementation.models.BlobHierarchyListSegment":"Customizations.BlobHierarchyListSegmentJava","com.azure.storage.blob.implementation.models.BlobItemInternal":"Storage.Blob.BlobItem","com.azure.storage.blob.implementation.models.BlobItemPropertiesInternal":"Storage.Blob.BlobProperties","com.azure.storage.blob.implementation.models.BlobLayoutEndpoints":"Storage.Blob.BlobLayoutEndpoints","com.azure.storage.blob.implementation.models.BlobLayoutEndpointsEndpointItem":"Storage.Blob.BlobLayoutEndpoint","com.azure.storage.blob.implementation.models.BlobLayoutInternal":"Storage.Blob.BlobLayout","com.azure.storage.blob.implementation.models.BlobLayoutRanges":"Storage.Blob.BlobLayoutRanges","com.azure.storage.blob.implementation.models.BlobLayoutRangesRangeItem":"Storage.Blob.BlobLayoutRange","com.azure.storage.blob.implementation.models.BlobName":"Storage.Blob.BlobName","com.azure.storage.blob.implementation.models.BlobPrefixInternal":"Storage.Blob.BlobPrefix","com.azure.storage.blob.implementation.models.BlobSignedIdentifiers":"Storage.Blob.SignedIdentifiers","com.azure.storage.blob.implementation.models.BlobStorageError":"Customizations.BlobStorageError","com.azure.storage.blob.implementation.models.BlobTag":"Storage.Blob.BlobTag","com.azure.storage.blob.implementation.models.BlobTags":"Storage.Blob.BlobTags","com.azure.storage.blob.implementation.models.BlobsAbortCopyFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlobsAcquireLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsBreakLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsChangeLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsCopyFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlobsCreateSnapshotHeaders":null,"com.azure.storage.blob.implementation.models.BlobsDeleteHeaders":null,"com.azure.storage.blob.implementation.models.BlobsDeleteImmutabilityPolicyHeaders":null,"com.azure.storage.blob.implementation.models.BlobsDownloadHeaders":null,"com.azure.storage.blob.implementation.models.BlobsGetAccountInfoHeaders":null,"com.azure.storage.blob.implementation.models.BlobsGetLayoutHeaders":null,"com.azure.storage.blob.implementation.models.BlobsGetPropertiesHeaders":null,"com.azure.storage.blob.implementation.models.BlobsGetTagsHeaders":null,"com.azure.storage.blob.implementation.models.BlobsQueryHeaders":null,"com.azure.storage.blob.implementation.models.BlobsReleaseLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsRenewLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetExpiryHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetHttpHeadersHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetImmutabilityPolicyHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetLegalHoldHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetMetadataHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetTagsHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetTierHeaders":null,"com.azure.storage.blob.implementation.models.BlobsStartCopyFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlobsUndeleteHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsCommitBlockListHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsGetBlockListHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsStageBlockFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsStageBlockHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsUploadBlobFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsUploadHeaders":null,"com.azure.storage.blob.implementation.models.ContainersAcquireLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersBreakLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersChangeLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersCreateHeaders":null,"com.azure.storage.blob.implementation.models.ContainersCreateSessionHeaders":null,"com.azure.storage.blob.implementation.models.ContainersDeleteHeaders":null,"com.azure.storage.blob.implementation.models.ContainersFilterBlobsHeaders":null,"com.azure.storage.blob.implementation.models.ContainersGetAccessPolicyHeaders":null,"com.azure.storage.blob.implementation.models.ContainersGetAccountInfoHeaders":null,"com.azure.storage.blob.implementation.models.ContainersGetPropertiesHeaders":null,"com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentHeaders":null,"com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentHeaders":null,"com.azure.storage.blob.implementation.models.ContainersReleaseLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersRenameHeaders":null,"com.azure.storage.blob.implementation.models.ContainersRenewLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersRestoreHeaders":null,"com.azure.storage.blob.implementation.models.ContainersSetAccessPolicyHeaders":null,"com.azure.storage.blob.implementation.models.ContainersSetMetadataHeaders":null,"com.azure.storage.blob.implementation.models.CreateSessionConfiguration":"Storage.Blob.CreateSessionConfiguration","com.azure.storage.blob.implementation.models.CreateSessionResponse":"Storage.Blob.CreateSessionResponse","com.azure.storage.blob.implementation.models.DelimitedTextConfiguration":"Storage.Blob.DelimitedTextConfiguration","com.azure.storage.blob.implementation.models.DownloadHint":"Storage.Blob.DownloadHint","com.azure.storage.blob.implementation.models.FilterBlobItem":"Storage.Blob.FilterBlobItem","com.azure.storage.blob.implementation.models.FilterBlobSegment":"Storage.Blob.FilteredBlobResponse","com.azure.storage.blob.implementation.models.FilterBlobsIncludeItem":"Storage.Blob.FilterBlobsIncludeItem","com.azure.storage.blob.implementation.models.JsonTextConfigurationInternal":"Storage.Blob.JsonTextConfiguration","com.azure.storage.blob.implementation.models.ListBlobsFlatSegmentResponse":"Storage.Blob.ListBlobsResponse","com.azure.storage.blob.implementation.models.ListBlobsHierarchySegmentResponse":"Storage.Blob.ListBlobsHierarchicalResponse","com.azure.storage.blob.implementation.models.PageBlobsClearPagesHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsCopyIncrementalHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsCreateHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesDiffHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsResizeHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsSetSequenceNumberHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsUploadPagesFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsUploadPagesHeaders":null,"com.azure.storage.blob.implementation.models.ParquetTextConfiguration":"Customizations.StorageCppParquetConfiguration","com.azure.storage.blob.implementation.models.PremiumPageBlobAccessTier":"Storage.Blob.PremiumPageBlobAccessTier","com.azure.storage.blob.implementation.models.QueryFormat":"Storage.Blob.QueryFormat","com.azure.storage.blob.implementation.models.QueryFormatType":"Storage.Blob.QueryType","com.azure.storage.blob.implementation.models.QueryRequest":"Storage.Blob.QueryRequest","com.azure.storage.blob.implementation.models.QueryRequestType":"Storage.Blob.QueryRequestType","com.azure.storage.blob.implementation.models.QuerySerialization":"Storage.Blob.QuerySerialization","com.azure.storage.blob.implementation.models.ServicesFilterBlobsHeaders":null,"com.azure.storage.blob.implementation.models.ServicesGetAccountInfoHeaders":null,"com.azure.storage.blob.implementation.models.ServicesGetPropertiesHeaders":null,"com.azure.storage.blob.implementation.models.ServicesGetStatisticsHeaders":null,"com.azure.storage.blob.implementation.models.ServicesGetUserDelegationKeyHeaders":null,"com.azure.storage.blob.implementation.models.ServicesListContainersSegmentHeaders":null,"com.azure.storage.blob.implementation.models.ServicesSetPropertiesHeaders":null,"com.azure.storage.blob.implementation.models.SessionCredentials":"Storage.Blob.SessionCredentials","com.azure.storage.blob.models.AccessTier":"Storage.Blob.AccessTier","com.azure.storage.blob.models.AccountKind":"Storage.Blob.AccountKind","com.azure.storage.blob.models.ArchiveStatus":"Storage.Blob.ArchiveStatus","com.azure.storage.blob.models.BlobAccessPolicy":"Storage.Blob.AccessPolicy","com.azure.storage.blob.models.BlobAnalyticsLogging":"Storage.Blob.Logging","com.azure.storage.blob.models.BlobContainerItem":"Storage.Blob.ContainerItem","com.azure.storage.blob.models.BlobContainerItemProperties":"Storage.Blob.ContainerProperties","com.azure.storage.blob.models.BlobCorsRule":"Storage.Blob.CorsRule","com.azure.storage.blob.models.BlobErrorCode":"Storage.Blob.StorageErrorCode","com.azure.storage.blob.models.BlobImmutabilityPolicyMode":"Customizations.BlobImmutabilityPolicyModeJava","com.azure.storage.blob.models.BlobMetrics":"Storage.Blob.Metrics","com.azure.storage.blob.models.BlobRetentionPolicy":"Storage.Blob.RetentionPolicy","com.azure.storage.blob.models.BlobServiceProperties":"Storage.Blob.BlobServiceProperties","com.azure.storage.blob.models.BlobServiceStatistics":"Storage.Blob.StorageServiceStats","com.azure.storage.blob.models.BlobSignedIdentifier":"Storage.Blob.SignedIdentifier","com.azure.storage.blob.models.BlobType":"Storage.Blob.BlobType","com.azure.storage.blob.models.Block":"Storage.Blob.Block","com.azure.storage.blob.models.BlockList":"Storage.Blob.BlockList","com.azure.storage.blob.models.BlockListType":"Storage.Blob.BlockListType","com.azure.storage.blob.models.BlockLookupList":"Storage.Blob.BlockLookupList","com.azure.storage.blob.models.ClearRange":"Storage.Blob.ClearRange","com.azure.storage.blob.models.CopyStatusType":"Storage.Blob.CopyStatus","com.azure.storage.blob.models.DeleteSnapshotsOptionType":"Storage.Blob.DeleteSnapshotsOptionType","com.azure.storage.blob.models.EncryptionAlgorithmType":"Storage.Blob.EncryptionAlgorithmType","com.azure.storage.blob.models.FileShareTokenIntent":"Storage.Blob.FileShareTokenIntent","com.azure.storage.blob.models.GeoReplication":"Storage.Blob.GeoReplication","com.azure.storage.blob.models.GeoReplicationStatus":"Storage.Blob.GeoReplicationStatusType","com.azure.storage.blob.models.KeyInfo":"Storage.Blob.KeyInfo","com.azure.storage.blob.models.LeaseDurationType":"Storage.Blob.LeaseDuration","com.azure.storage.blob.models.LeaseStateType":"Storage.Blob.LeaseState","com.azure.storage.blob.models.LeaseStatusType":"Storage.Blob.LeaseStatus","com.azure.storage.blob.models.ListBlobContainersIncludeType":"Storage.Blob.ListContainersIncludeType","com.azure.storage.blob.models.ListBlobsIncludeItem":"Storage.Blob.ListBlobsIncludeItem","com.azure.storage.blob.models.PageList":"Storage.Blob.PageList","com.azure.storage.blob.models.PageRange":"Storage.Blob.PageRange","com.azure.storage.blob.models.PublicAccessType":"Storage.Blob.PublicAccessType","com.azure.storage.blob.models.RehydratePriority":"Storage.Blob.RehydratePriority","com.azure.storage.blob.models.SequenceNumberActionType":"Storage.Blob.SequenceNumberActionType","com.azure.storage.blob.models.SkuName":"Storage.Blob.SkuName","com.azure.storage.blob.models.StaticWebsite":"Storage.Blob.StaticWebsite","com.azure.storage.blob.models.UserDelegationKey":"Storage.Blob.UserDelegationKey"},"generatedFiles":["src/main/java/com/azure/storage/blob/AppendBlobAsyncClient.java","src/main/java/com/azure/storage/blob/AppendBlobClient.java","src/main/java/com/azure/storage/blob/AzureBlobStorageBuilder.java","src/main/java/com/azure/storage/blob/BlobAsyncClient.java","src/main/java/com/azure/storage/blob/BlobClient.java","src/main/java/com/azure/storage/blob/BlobServiceVersion.java","src/main/java/com/azure/storage/blob/BlockBlobAsyncClient.java","src/main/java/com/azure/storage/blob/BlockBlobClient.java","src/main/java/com/azure/storage/blob/ContainerAsyncClient.java","src/main/java/com/azure/storage/blob/ContainerClient.java","src/main/java/com/azure/storage/blob/PageBlobAsyncClient.java","src/main/java/com/azure/storage/blob/PageBlobClient.java","src/main/java/com/azure/storage/blob/ServiceAsyncClient.java","src/main/java/com/azure/storage/blob/ServiceClient.java","src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java","src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java","src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java","src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java","src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java","src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java","src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java","src/main/java/com/azure/storage/blob/implementation/XmlSerializer.java","src/main/java/com/azure/storage/blob/implementation/XmlSerializerProviders.java","src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsCreateHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsSealHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ArrowFieldInternal.java","src/main/java/com/azure/storage/blob/implementation/models/ArrowTextConfigurationInternal.java","src/main/java/com/azure/storage/blob/implementation/models/AuthenticationType.java","src/main/java/com/azure/storage/blob/implementation/models/BlobContainersSegment.java","src/main/java/com/azure/storage/blob/implementation/models/BlobCopySourceTags.java","src/main/java/com/azure/storage/blob/implementation/models/BlobDeleteType.java","src/main/java/com/azure/storage/blob/implementation/models/BlobExpiryOptions.java","src/main/java/com/azure/storage/blob/implementation/models/BlobHierarchyListSegment.java","src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java","src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutEndpoints.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutEndpointsEndpointItem.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutInternal.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutRanges.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutRangesRangeItem.java","src/main/java/com/azure/storage/blob/implementation/models/BlobName.java","src/main/java/com/azure/storage/blob/implementation/models/BlobPrefixInternal.java","src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifiers.java","src/main/java/com/azure/storage/blob/implementation/models/BlobStorageError.java","src/main/java/com/azure/storage/blob/implementation/models/BlobStorageErrorException.java","src/main/java/com/azure/storage/blob/implementation/models/BlobTag.java","src/main/java/com/azure/storage/blob/implementation/models/BlobTags.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsAbortCopyFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsAcquireLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsBreakLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsChangeLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsCopyFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsCreateSnapshotHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteImmutabilityPolicyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsDownloadHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccountInfoHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsGetLayoutHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsGetTagsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsQueryHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsReleaseLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsRenewLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetExpiryHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetHttpHeadersHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetLegalHoldHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetMetadataHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTagsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTierHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsStartCopyFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsUndeleteHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsCommitBlockListHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsGetBlockListHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadBlobFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersAcquireLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersBreakLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersChangeLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateSessionHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersDeleteHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersFilterBlobsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccessPolicyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccountInfoHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersGetPropertiesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersReleaseLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersRenameHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersRenewLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersRestoreHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersSetAccessPolicyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersSetMetadataHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/CreateSessionConfiguration.java","src/main/java/com/azure/storage/blob/implementation/models/CreateSessionResponse.java","src/main/java/com/azure/storage/blob/implementation/models/DelimitedTextConfiguration.java","src/main/java/com/azure/storage/blob/implementation/models/DownloadHint.java","src/main/java/com/azure/storage/blob/implementation/models/FilterBlobItem.java","src/main/java/com/azure/storage/blob/implementation/models/FilterBlobSegment.java","src/main/java/com/azure/storage/blob/implementation/models/FilterBlobsIncludeItem.java","src/main/java/com/azure/storage/blob/implementation/models/JsonTextConfigurationInternal.java","src/main/java/com/azure/storage/blob/implementation/models/ListBlobsFlatSegmentResponse.java","src/main/java/com/azure/storage/blob/implementation/models/ListBlobsHierarchySegmentResponse.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsClearPagesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCopyIncrementalHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCreateHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsResizeHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsSetSequenceNumberHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ParquetTextConfiguration.java","src/main/java/com/azure/storage/blob/implementation/models/PremiumPageBlobAccessTier.java","src/main/java/com/azure/storage/blob/implementation/models/QueryFormat.java","src/main/java/com/azure/storage/blob/implementation/models/QueryFormatType.java","src/main/java/com/azure/storage/blob/implementation/models/QueryRequest.java","src/main/java/com/azure/storage/blob/implementation/models/QueryRequestType.java","src/main/java/com/azure/storage/blob/implementation/models/QuerySerialization.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesFilterBlobsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesGetAccountInfoHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesGetPropertiesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesGetStatisticsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesGetUserDelegationKeyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesListContainersSegmentHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesSetPropertiesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/SessionCredentials.java","src/main/java/com/azure/storage/blob/implementation/models/package-info.java","src/main/java/com/azure/storage/blob/implementation/package-info.java","src/main/java/com/azure/storage/blob/models/AccessTier.java","src/main/java/com/azure/storage/blob/models/AccountKind.java","src/main/java/com/azure/storage/blob/models/ArchiveStatus.java","src/main/java/com/azure/storage/blob/models/BlobAccessPolicy.java","src/main/java/com/azure/storage/blob/models/BlobAnalyticsLogging.java","src/main/java/com/azure/storage/blob/models/BlobContainerItem.java","src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java","src/main/java/com/azure/storage/blob/models/BlobCorsRule.java","src/main/java/com/azure/storage/blob/models/BlobErrorCode.java","src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicyMode.java","src/main/java/com/azure/storage/blob/models/BlobMetrics.java","src/main/java/com/azure/storage/blob/models/BlobRetentionPolicy.java","src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java","src/main/java/com/azure/storage/blob/models/BlobServiceStatistics.java","src/main/java/com/azure/storage/blob/models/BlobSignedIdentifier.java","src/main/java/com/azure/storage/blob/models/BlobType.java","src/main/java/com/azure/storage/blob/models/Block.java","src/main/java/com/azure/storage/blob/models/BlockList.java","src/main/java/com/azure/storage/blob/models/BlockListType.java","src/main/java/com/azure/storage/blob/models/BlockLookupList.java","src/main/java/com/azure/storage/blob/models/ClearRange.java","src/main/java/com/azure/storage/blob/models/CopyStatusType.java","src/main/java/com/azure/storage/blob/models/DeleteSnapshotsOptionType.java","src/main/java/com/azure/storage/blob/models/EncryptionAlgorithmType.java","src/main/java/com/azure/storage/blob/models/FileShareTokenIntent.java","src/main/java/com/azure/storage/blob/models/GeoReplication.java","src/main/java/com/azure/storage/blob/models/GeoReplicationStatus.java","src/main/java/com/azure/storage/blob/models/KeyInfo.java","src/main/java/com/azure/storage/blob/models/LeaseDurationType.java","src/main/java/com/azure/storage/blob/models/LeaseStateType.java","src/main/java/com/azure/storage/blob/models/LeaseStatusType.java","src/main/java/com/azure/storage/blob/models/ListBlobContainersIncludeType.java","src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java","src/main/java/com/azure/storage/blob/models/PageList.java","src/main/java/com/azure/storage/blob/models/PageRange.java","src/main/java/com/azure/storage/blob/models/PublicAccessType.java","src/main/java/com/azure/storage/blob/models/RehydratePriority.java","src/main/java/com/azure/storage/blob/models/SequenceNumberActionType.java","src/main/java/com/azure/storage/blob/models/SkuName.java","src/main/java/com/azure/storage/blob/models/StaticWebsite.java","src/main/java/com/azure/storage/blob/models/UserDelegationKey.java","src/main/java/com/azure/storage/blob/models/package-info.java","src/main/java/com/azure/storage/blob/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/models/BlobImmutabilityPolicyModeTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/models/BlobImmutabilityPolicyModeTests.java new file mode 100644 index 0000000000000..2ca5b5511ab7a --- /dev/null +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/models/BlobImmutabilityPolicyModeTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.storage.blob.models; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; + +/** + * The immutability policy mode keeps the values and order it shipped with: its toString() is what requests send and + * what callers compare against, and its ordinals are visible through values(). + */ +public class BlobImmutabilityPolicyModeTests { + @Test + public void keepsShippedValuesAndOrder() { + assertArrayEquals(new BlobImmutabilityPolicyMode[] { + BlobImmutabilityPolicyMode.MUTABLE, + BlobImmutabilityPolicyMode.UNLOCKED, + BlobImmutabilityPolicyMode.LOCKED }, BlobImmutabilityPolicyMode.values()); + assertEquals("Mutable", BlobImmutabilityPolicyMode.MUTABLE.toString()); + assertEquals("Unlocked", BlobImmutabilityPolicyMode.UNLOCKED.toString()); + assertEquals("Locked", BlobImmutabilityPolicyMode.LOCKED.toString()); + } + + @Test + public void parsesServiceValuesInAnyCase() { + assertEquals(BlobImmutabilityPolicyMode.UNLOCKED, BlobImmutabilityPolicyMode.fromString("unlocked")); + assertEquals(BlobImmutabilityPolicyMode.LOCKED, BlobImmutabilityPolicyMode.fromString("Locked")); + } +} diff --git a/sdk/storage/azure-storage-blob/tsp-location.yaml b/sdk/storage/azure-storage-blob/tsp-location.yaml index bf6f3b048f538..3aeabb1777de4 100644 --- a/sdk/storage/azure-storage-blob/tsp-location.yaml +++ b/sdk/storage/azure-storage-blob/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/storage/data-plane/BlobStorage -commit: 8aecf95830ba747a9af2aeef3ed5d26af8a7b3d8 +commit: 27f0523ded83fde1600271fedf4f8674ec40fe27 repo: ibrandes/azure-rest-api-specs additionalDirectories: [] From c0705fde1fdec28c6ec2128933daf92b606e7f90 Mon Sep 17 00:00:00 2001 From: Isabelle Date: Sun, 22 Nov 2026 10:19:10 -0800 Subject: [PATCH 06/11] Update Blob, Cryptography, Changefeed and Data Lake recordings for the Range header Blob range operations now send the standard Range header instead of x-ms-range. The recorded request header is renamed accordingly (1,014 requests across 576 recordings); the recorded values are unchanged, so playback still compares the ranges. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- sdk/storage/azure-storage-blob-changefeed/assets.json | 2 +- sdk/storage/azure-storage-blob-cryptography/assets.json | 2 +- sdk/storage/azure-storage-blob/assets.json | 2 +- sdk/storage/azure-storage-file-datalake/assets.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/storage/azure-storage-blob-changefeed/assets.json b/sdk/storage/azure-storage-blob-changefeed/assets.json index e946967cb163f..d3bd99dd09190 100644 --- a/sdk/storage/azure-storage-blob-changefeed/assets.json +++ b/sdk/storage/azure-storage-blob-changefeed/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-blob-changefeed", - "Tag": "java/storage/azure-storage-blob-changefeed_cca9892466" + "Tag": "java/storage/azure-storage-blob-changefeed_20cdfcc4f0" } diff --git a/sdk/storage/azure-storage-blob-cryptography/assets.json b/sdk/storage/azure-storage-blob-cryptography/assets.json index 0e01b67a96d45..49b620f68c939 100644 --- a/sdk/storage/azure-storage-blob-cryptography/assets.json +++ b/sdk/storage/azure-storage-blob-cryptography/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-blob-cryptography", - "Tag": "java/storage/azure-storage-blob-cryptography_38caad2745" + "Tag": "java/storage/azure-storage-blob-cryptography_dc1a558abb" } diff --git a/sdk/storage/azure-storage-blob/assets.json b/sdk/storage/azure-storage-blob/assets.json index 21dd7b20b2769..a92a02aa2e683 100644 --- a/sdk/storage/azure-storage-blob/assets.json +++ b/sdk/storage/azure-storage-blob/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-blob", - "Tag": "java/storage/azure-storage-blob_63b8b1c050" + "Tag": "java/storage/azure-storage-blob_226846434d" } diff --git a/sdk/storage/azure-storage-file-datalake/assets.json b/sdk/storage/azure-storage-file-datalake/assets.json index c1e0f96ca4561..a6ac6fabf8ca1 100644 --- a/sdk/storage/azure-storage-file-datalake/assets.json +++ b/sdk/storage/azure-storage-file-datalake/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-file-datalake", - "Tag": "java/storage/azure-storage-file-datalake_88765f9839" + "Tag": "java/storage/azure-storage-file-datalake_7e5704eea8" } From a2560b346cf48881dd86b7a3fba2e0c1a421c8e2 Mon Sep 17 00:00:00 2001 From: Isabelle Date: Sun, 22 Nov 2026 10:24:44 -0800 Subject: [PATCH 07/11] Allow a null block list type, as the shipped listBlocks did The spec declares blocklisttype required, so the generated convenience methods called listType.toString(). A null type is passed through as null again, which the protocol layer omits from the query; the service then returns committed blocks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../main/java/BlobStorageCustomizations.java | 28 +++++++++ .../BlockBlobAsyncClientInternal.java | 60 ++++++++++--------- .../BlockBlobClientInternal.java | 60 ++++++++++--------- 3 files changed, 90 insertions(+), 58 deletions(-) diff --git a/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java b/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java index b308a2eceafab..c7460738fee34 100644 --- a/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java +++ b/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java @@ -149,6 +149,8 @@ public void customize(LibraryCustomization customization, Logger logger) { allowEmptyGetLayoutResponse(customization.getPackage(IMPL_PACKAGE)); + allowNullBlockListType(customization.getPackage(IMPL_PACKAGE)); + updateImplToMapInternalException(customization.getPackage(IMPL_PACKAGE)); } @@ -430,6 +432,32 @@ private static void allowEmptyGetLayoutResponse(PackageCustomization implPackage } } + /** + * The service defaults Get Block List to committed blocks when {@code blocklisttype} is omitted, and the shipped + * {@code listBlocks} accepted a null type for that. The spec declares the parameter required, so the generated + * convenience methods call {@code listType.toString()}. A null type is now passed through as null, which the + * protocol layer omits from the query, as the shipped client did. + * + * @param implPackage The implementation package holding the relocated convenience clients. + */ + private static void allowNullBlockListType(PackageCustomization implPackage) { + for (String className : Arrays.asList("BlockBlobAsyncClientInternal", "BlockBlobClientInternal")) { + implPackage.getClass(className) + .customizeAst(ast -> ast.getClassByName(className) + .ifPresent(clazz -> clazz.getMethods() + .stream() + .filter(method -> method.getNameAsString().startsWith("getBlockList")) + .forEach(method -> method + .findAll(MethodCallExpr.class, call -> "toString".equals(call.getNameAsString()) + && call.getScope().filter(scope -> scope.isNameExpr() + && "listType".equals(scope.asNameExpr().getNameAsString())).isPresent()) + .forEach(call -> call.replace(new ConditionalExpr( + new BinaryExpr(new NameExpr("listType"), new NullLiteralExpr(), + BinaryExpr.Operator.EQUALS), + new NullLiteralExpr(), call.clone())))))); + } + } + /** * Restores public model members the AutoRest layer shipped that the spec doesn't produce: *
    diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobAsyncClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobAsyncClientInternal.java index 2d5ae22bacaaf..7c942efba311b 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobAsyncClientInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobAsyncClientInternal.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.storage.blob.implementation; import com.azure.core.annotation.Generated; @@ -40,6 +39,7 @@ * Initializes a new instance of the asynchronous AzureBlobStorage type. */ public final class BlockBlobAsyncClientInternal { + @Generated private static final ObjectSerializer XML_SERIALIZER = XmlSerializerProviders.createInstance(); @@ -48,7 +48,7 @@ public final class BlockBlobAsyncClientInternal { /** * Initializes an instance of BlockBlobAsyncClientInternal class. - * + * * @param serviceClient the service client implementation. */ @Generated @@ -161,7 +161,7 @@ public BlockBlobAsyncClientInternal(BlockBlobsImpl serviceClient) { * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param contentLength The length of the request. * @param body The body of the request. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -285,7 +285,7 @@ Mono> uploadWithResponseInternal(long contentLength, BinaryData b * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as * it would appear in a request URI. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -367,7 +367,7 @@ Mono> uploadBlobFromUrlWithResponseInternal(String copySource, Re * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param blockId A Base64 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. @@ -458,7 +458,7 @@ Mono> stageBlockWithResponseInternal(String blockId, long content * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param blockId A Base64 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. @@ -583,7 +583,7 @@ Mono> stageBlockFromUrlWithResponseInternal(String blockId, long * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param blocks Blob blocks. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws BlobStorageErrorException thrown if the request is rejected by server. @@ -652,7 +652,7 @@ Mono> commitBlockListWithResponseInternal(BinaryData blocks, Requ * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both * lists together. Allowed values: "committed", "uncommitted", "all". * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -669,7 +669,7 @@ Mono> getBlockListWithResponseInternal(String listType, Req /** * Uploads the content to the specified block blob. If the blob already exists, the data and any existing metadata * will be overwritten. - * + * * @param contentLength The length of the request. * @param body The body of the request. * @param metadata The metadata headers. @@ -837,7 +837,7 @@ public Mono> uploadWithResponse(long /** * Uploads the content to the specified block blob. If the blob already exists, the data and any existing metadata * will be overwritten. - * + * * @param contentLength The length of the request. * @param body The body of the request. * @param metadata The metadata headers. @@ -998,7 +998,7 @@ public Mono upload(long contentLength, BinaryData body, Map upload(long contentLength, BinaryData body) { /** * Uploads the content from the specified URL to the block blob. If the blob already exists, the data and any * existing metadata will be overwritten. - * + * * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as * it would appear in a request URI. * @param metadata The metadata headers. @@ -1226,7 +1226,7 @@ public Mono> uploadBlobFr /** * Uploads the content from the specified URL to the block blob. If the blob already exists, the data and any * existing metadata will be overwritten. - * + * * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as * it would appear in a request URI. * @param metadata The metadata headers. @@ -1428,7 +1428,7 @@ public Mono uploadBlobFromUrl(String copySource, Map metad /** * Uploads the content from the specified URL to the block blob. If the blob already exists, the data and any * existing metadata will be overwritten. - * + * * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as * it would appear in a request URI. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1446,7 +1446,7 @@ public Mono uploadBlobFromUrl(String copySource) { /** * Creates a new block of data to be committed as part of a blob. - * + * * @param blockId A Base64 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. @@ -1524,7 +1524,7 @@ public Mono> stageBlockWithRespo /** * Creates a new block of data to be committed as part of a blob. - * + * * @param blockId A Base64 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. @@ -1597,7 +1597,7 @@ public Mono stageBlock(String blockId, long contentLength, BinaryData body /** * Creates a new block of data to be committed as part of a blob. - * + * * @param blockId A Base64 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. @@ -1618,7 +1618,7 @@ public Mono stageBlock(String blockId, long contentLength, BinaryData body /** * Creates a new block of data from the specified URL to be committed as part of a blob. - * + * * @param blockId A Base64 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. @@ -1743,7 +1743,7 @@ public Mono> stageBlockFr /** * Creates a new block of data from the specified URL to be committed as part of a blob. - * + * * @param blockId A Base64 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. @@ -1864,7 +1864,7 @@ public Mono stageBlockFromUrl(String blockId, long contentLength, String s /** * Creates a new block of data from the specified URL to be committed as part of a blob. - * + * * @param blockId A Base64 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. @@ -1886,7 +1886,7 @@ public Mono stageBlockFromUrl(String blockId, long contentLength, String s /** * Writes to the block blob by specifying the list of block IDs that make up the blob. - * + * * @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 @@ -2040,7 +2040,7 @@ public Mono> commitBlockLis /** * Writes to the block blob by specifying the list of block IDs that make up the blob. - * + * * @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 @@ -2188,7 +2188,7 @@ public Mono commitBlockList(BlockLookupList blocks, Integer timeout, Strin /** * Writes to the block blob by specifying the list of block IDs that make up the blob. - * + * * @param blocks Blob blocks. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageErrorException thrown if the request is rejected by server. @@ -2206,7 +2206,7 @@ public Mono commitBlockList(BlockLookupList blocks) { /** * Retrieves the list of blocks that have been uploaded as part of the block blob. - * + * * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both * lists together. * @param snapshot Specifies the snapshot of the blob. @@ -2240,7 +2240,7 @@ public Mono> getBlockList if (ifTags != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); } - return getBlockListWithResponseInternal(listType.toString(), requestOptions) + return getBlockListWithResponseInternal(listType == null ? null : listType.toString(), requestOptions) .map(protocolMethodResponse -> new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), protocolMethodResponse.getValue().toObject(BlockList.class, XML_SERIALIZER), @@ -2249,7 +2249,7 @@ public Mono> getBlockList /** * Retrieves the list of blocks that have been uploaded as part of the block blob. - * + * * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both * lists together. * @param snapshot Specifies the snapshot of the blob. @@ -2281,13 +2281,14 @@ public Mono getBlockList(BlockListType listType, String snapshot, Int if (ifTags != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); } - return getBlockListWithResponseInternal(listType.toString(), requestOptions).flatMap(FluxUtil::toMono) + return getBlockListWithResponseInternal(listType == null ? null : listType.toString(), requestOptions) + .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(BlockList.class, XML_SERIALIZER)); } /** * Retrieves the list of blocks that have been uploaded as part of the block blob. - * + * * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both * lists together. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2300,7 +2301,8 @@ public Mono getBlockList(BlockListType listType, String snapshot, Int public Mono getBlockList(BlockListType listType) { // Generated convenience method for getBlockListWithResponseInternal RequestOptions requestOptions = new RequestOptions(); - return getBlockListWithResponseInternal(listType.toString(), requestOptions).flatMap(FluxUtil::toMono) + return getBlockListWithResponseInternal(listType == null ? null : listType.toString(), requestOptions) + .flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(BlockList.class, XML_SERIALIZER)); } } diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobClientInternal.java index c59007d576598..96d6120499467 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobClientInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobClientInternal.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.storage.blob.implementation; import com.azure.core.annotation.Generated; @@ -38,6 +37,7 @@ * Initializes a new instance of the synchronous AzureBlobStorage type. */ public final class BlockBlobClientInternal { + @Generated private static final ObjectSerializer XML_SERIALIZER = XmlSerializerProviders.createInstance(); @@ -46,7 +46,7 @@ public final class BlockBlobClientInternal { /** * Initializes an instance of BlockBlobClientInternal class. - * + * * @param serviceClient the service client implementation. */ @Generated @@ -159,7 +159,7 @@ public BlockBlobClientInternal(BlockBlobsImpl serviceClient) { * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param contentLength The length of the request. * @param body The body of the request. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -282,7 +282,7 @@ Response uploadWithResponseInternal(long contentLength, BinaryData body, R * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as * it would appear in a request URI. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -364,7 +364,7 @@ Response uploadBlobFromUrlWithResponseInternal(String copySource, RequestO * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param blockId A Base64 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. @@ -455,7 +455,7 @@ Response stageBlockWithResponseInternal(String blockId, long contentLength * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param blockId A Base64 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. @@ -580,7 +580,7 @@ Response stageBlockFromUrlWithResponseInternal(String blockId, long conten * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param blocks Blob blocks. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws BlobStorageErrorException thrown if the request is rejected by server. @@ -649,7 +649,7 @@ Response commitBlockListWithResponseInternal(BinaryData blocks, RequestOpt * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both * lists together. Allowed values: "committed", "uncommitted", "all". * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -665,7 +665,7 @@ Response getBlockListWithResponseInternal(String listType, RequestOp /** * Uploads the content to the specified block blob. If the blob already exists, the data and any existing metadata * will be overwritten. - * + * * @param contentLength The length of the request. * @param body The body of the request. * @param metadata The metadata headers. @@ -833,7 +833,7 @@ public ResponseBase uploadWithResponse(long conte /** * Uploads the content to the specified block blob. If the blob already exists, the data and any existing metadata * will be overwritten. - * + * * @param contentLength The length of the request. * @param body The body of the request. * @param metadata The metadata headers. @@ -993,7 +993,7 @@ public void upload(long contentLength, BinaryData body, Map meta /** * Uploads the content to the specified block blob. If the blob already exists, the data and any existing metadata * will be overwritten. - * + * * @param contentLength The length of the request. * @param body The body of the request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1011,7 +1011,7 @@ public void upload(long contentLength, BinaryData body) { /** * Uploads the content from the specified URL to the block blob. If the blob already exists, the data and any * existing metadata will be overwritten. - * + * * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as * it would appear in a request URI. * @param metadata The metadata headers. @@ -1220,7 +1220,7 @@ public ResponseBase uploadBlobFromUrlW /** * Uploads the content from the specified URL to the block blob. If the blob already exists, the data and any * existing metadata will be overwritten. - * + * * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as * it would appear in a request URI. * @param metadata The metadata headers. @@ -1421,7 +1421,7 @@ public void uploadBlobFromUrl(String copySource, Map metadata, I /** * Uploads the content from the specified URL to the block blob. If the blob already exists, the data and any * existing metadata will be overwritten. - * + * * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as * it would appear in a request URI. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1438,7 +1438,7 @@ public void uploadBlobFromUrl(String copySource) { /** * Creates a new block of data to be committed as part of a blob. - * + * * @param blockId A Base64 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. @@ -1517,7 +1517,7 @@ public ResponseBase stageBlockWithResponse(St /** * Creates a new block of data to be committed as part of a blob. - * + * * @param blockId A Base64 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. @@ -1589,7 +1589,7 @@ public void stageBlock(String blockId, long contentLength, BinaryData body, byte /** * Creates a new block of data to be committed as part of a blob. - * + * * @param blockId A Base64 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. @@ -1609,7 +1609,7 @@ public void stageBlock(String blockId, long contentLength, BinaryData body) { /** * Creates a new block of data from the specified URL to be committed as part of a blob. - * + * * @param blockId A Base64 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. @@ -1735,7 +1735,7 @@ public ResponseBase stageBlockFromUrlW /** * Creates a new block of data from the specified URL to be committed as part of a blob. - * + * * @param blockId A Base64 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. @@ -1854,7 +1854,7 @@ public void stageBlockFromUrl(String blockId, long contentLength, String sourceU /** * Creates a new block of data from the specified URL to be committed as part of a blob. - * + * * @param blockId A Base64 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. @@ -1874,7 +1874,7 @@ public void stageBlockFromUrl(String blockId, long contentLength, String sourceU /** * Writes to the block blob by specifying the list of block IDs that make up the blob. - * + * * @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 @@ -2029,7 +2029,7 @@ public ResponseBase commitBlockListWithR /** * Writes to the block blob by specifying the list of block IDs that make up the blob. - * + * * @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 @@ -2175,7 +2175,7 @@ public void commitBlockList(BlockLookupList blocks, Integer timeout, String blob /** * Writes to the block blob by specifying the list of block IDs that make up the blob. - * + * * @param blocks Blob blocks. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageErrorException thrown if the request is rejected by server. @@ -2191,7 +2191,7 @@ public void commitBlockList(BlockLookupList blocks) { /** * Retrieves the list of blocks that have been uploaded as part of the block blob. - * + * * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both * lists together. * @param snapshot Specifies the snapshot of the blob. @@ -2225,7 +2225,7 @@ public ResponseBase getBlockListWithRe requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); } Response protocolMethodResponse - = getBlockListWithResponseInternal(listType.toString(), requestOptions); + = getBlockListWithResponseInternal(listType == null ? null : listType.toString(), requestOptions); return new ResponseBase<>(protocolMethodResponse.getRequest(), protocolMethodResponse.getStatusCode(), protocolMethodResponse.getHeaders(), protocolMethodResponse.getValue().toObject(BlockList.class, XML_SERIALIZER), @@ -2234,7 +2234,7 @@ public ResponseBase getBlockListWithRe /** * Retrieves the list of blocks that have been uploaded as part of the block blob. - * + * * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both * lists together. * @param snapshot Specifies the snapshot of the blob. @@ -2266,13 +2266,14 @@ public BlockList getBlockList(BlockListType listType, String snapshot, Integer t if (ifTags != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-if-tags"), ifTags); } - return getBlockListWithResponseInternal(listType.toString(), requestOptions).getValue() + return getBlockListWithResponseInternal(listType == null ? null : listType.toString(), requestOptions) + .getValue() .toObject(BlockList.class, XML_SERIALIZER); } /** * Retrieves the list of blocks that have been uploaded as part of the block blob. - * + * * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both * lists together. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2285,7 +2286,8 @@ public BlockList getBlockList(BlockListType listType, String snapshot, Integer t public BlockList getBlockList(BlockListType listType) { // Generated convenience method for getBlockListWithResponseInternal RequestOptions requestOptions = new RequestOptions(); - return getBlockListWithResponseInternal(listType.toString(), requestOptions).getValue() + return getBlockListWithResponseInternal(listType == null ? null : listType.toString(), requestOptions) + .getValue() .toObject(BlockList.class, XML_SERIALIZER); } } From 3c45e0755fadd0fbd68d7cb686a6ce97a9f5523e Mon Sep 17 00:00:00 2001 From: Isabelle Date: Sun, 22 Nov 2026 12:31:20 -0800 Subject: [PATCH 08/11] Fix spelling check findings - Rename implsToUpdate in the Blob customization. - Pin tsp-location to Azure/azure-rest-api-specs; the spec commit is reachable through the upstream repository, and regeneration from it is unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../src/main/java/BlobStorageCustomizations.java | 6 +++--- sdk/storage/azure-storage-blob/tsp-location.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java b/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java index c7460738fee34..3f12203faf1ab 100644 --- a/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java +++ b/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java @@ -745,9 +745,9 @@ private static String jsonReadExpression(VariableDeclarator field) { * @param implPackage The implementation package. */ private static void updateImplToMapInternalException(PackageCustomization implPackage) { - List implsToUpdate = Arrays.asList("ServicesImpl", "ContainersImpl", "BlobsImpl", "AppendBlobsImpl", "BlockBlobsImpl", - "PageBlobsImpl"); - for (String implToUpdate : implsToUpdate) { + List implClassesToUpdate = Arrays.asList("ServicesImpl", "ContainersImpl", "BlobsImpl", + "AppendBlobsImpl", "BlockBlobsImpl", "PageBlobsImpl"); + for (String implToUpdate : implClassesToUpdate) { implPackage.getClass(implToUpdate).customizeAst(ast -> { ast.addImport("com.azure.storage.blob.implementation.util.ModelHelper"); ast.addImport("com.azure.storage.blob.models.BlobStorageException"); diff --git a/sdk/storage/azure-storage-blob/tsp-location.yaml b/sdk/storage/azure-storage-blob/tsp-location.yaml index 3aeabb1777de4..5b9f81d702963 100644 --- a/sdk/storage/azure-storage-blob/tsp-location.yaml +++ b/sdk/storage/azure-storage-blob/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/storage/data-plane/BlobStorage commit: 27f0523ded83fde1600271fedf4f8674ec40fe27 -repo: ibrandes/azure-rest-api-specs +repo: Azure/azure-rest-api-specs additionalDirectories: [] From a25c012431f63550a61c67b2addeca41334e9424 Mon Sep 17 00:00:00 2001 From: Isabelle Date: Mon, 23 Nov 2026 10:27:13 -0800 Subject: [PATCH 09/11] Keep sending ranges in x-ms-range, as the shipped client did; restore original recordings The spec uses the standard Range header. A customization renames it back to x-ms-range where the generated code builds the request (6 @HeaderParam values and 16 RequestOptions headers), so every pipeline sends the shipped header, including Data Lake's, Cryptography's and caller-supplied ones. This reverts the Range-specific changes: the renamed recordings (assets.json tags), the test mocks and matchers that read Range, MockRetryRangeResponsePolicy, BlobDecryptionPolicy's Range handling, the logged-header addition and the CHANGELOG entry. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../azure-storage-blob-changefeed/assets.json | 2 +- .../assets.json | 2 +- .../cryptography/BlobDecryptionPolicy.java | 10 +-- .../BlobDecryptionPolicyRangeTests.java | 80 ------------------ .../EncryptedBlockBlobApiTests.java | 2 +- .../EncryptedBlockBlobAsyncApiTests.java | 2 +- .../storage/blob/nio/BlobNioTestBase.java | 4 +- sdk/storage/azure-storage-blob/CHANGELOG.md | 4 - sdk/storage/azure-storage-blob/assets.json | 2 +- .../main/java/BlobStorageCustomizations.java | 48 ++++++++++- .../BlobAsyncClientInternal.java | 8 +- .../implementation/BlobClientInternal.java | 8 +- .../PageBlobAsyncClientInternal.java | 84 +++++++++---------- .../PageBlobClientInternal.java | 84 +++++++++---------- .../blob/implementation/PageBlobsImpl.java | 12 +-- .../util/BlobHeadersAndQueryParameters.java | 33 ++++---- .../com/azure/storage/blob/BlobApiTests.java | 2 +- .../azure/storage/blob/BlobAsyncApiTests.java | 2 +- ...BlobContentValidationAsyncUploadTests.java | 3 +- .../BlobContentValidationUploadTests.java | 3 +- .../com/azure/storage/blob/BlobTestBase.java | 4 +- .../azure/storage/blob/ContainerApiTests.java | 2 +- .../storage/blob/ContainerAsyncApiTests.java | 2 +- .../specialized/BlobAsyncClientBaseTests.java | 8 +- .../blob/specialized/BlobClientBaseTests.java | 12 +-- .../BlobDataLocalityDownloadApiTests.java | 2 +- .../specialized/DownloadResponseMockFlux.java | 2 +- .../policy/MockRetryRangeResponsePolicy.java | 14 +--- .../azure-storage-file-datalake/assets.json | 2 +- .../DataLakeDataLocalityOptionsTests.java | 2 +- 30 files changed, 195 insertions(+), 250 deletions(-) delete mode 100644 sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/BlobDecryptionPolicyRangeTests.java diff --git a/sdk/storage/azure-storage-blob-changefeed/assets.json b/sdk/storage/azure-storage-blob-changefeed/assets.json index d3bd99dd09190..e946967cb163f 100644 --- a/sdk/storage/azure-storage-blob-changefeed/assets.json +++ b/sdk/storage/azure-storage-blob-changefeed/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-blob-changefeed", - "Tag": "java/storage/azure-storage-blob-changefeed_20cdfcc4f0" + "Tag": "java/storage/azure-storage-blob-changefeed_cca9892466" } diff --git a/sdk/storage/azure-storage-blob-cryptography/assets.json b/sdk/storage/azure-storage-blob-cryptography/assets.json index 49b620f68c939..0e01b67a96d45 100644 --- a/sdk/storage/azure-storage-blob-cryptography/assets.json +++ b/sdk/storage/azure-storage-blob-cryptography/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-blob-cryptography", - "Tag": "java/storage/azure-storage-blob-cryptography_dc1a558abb" + "Tag": "java/storage/azure-storage-blob-cryptography_38caad2745" } diff --git a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/BlobDecryptionPolicy.java b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/BlobDecryptionPolicy.java index 2492e3fd691e0..a280823e4842d 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/BlobDecryptionPolicy.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/main/java/com/azure/storage/blob/specialized/cryptography/BlobDecryptionPolicy.java @@ -85,11 +85,7 @@ public Mono process(HttpPipelineCallContext context, HttpPipelineN } HttpHeaders requestHeaders = context.getHttpRequest().getHeaders(); - // Blob clients send the standard Range header. A caller-supplied x-ms-range takes precedence, as it does for - // the service, so the expanded range is written back to whichever header carries it. - HttpHeaderName rangeHeaderName - = requestHeaders.getValue(RANGE_HEADER) != null ? RANGE_HEADER : HttpHeaderName.RANGE; - String initialRangeHeader = requestHeaders.getValue(rangeHeaderName); + String initialRangeHeader = requestHeaders.getValue(RANGE_HEADER); if (!isRangeRequest(initialRangeHeader)) { // If there is no range, there is nothing to expand, so we can continue with the request @@ -152,7 +148,9 @@ public Mono process(HttpPipelineCallContext context, HttpPipelineN EncryptedBlobRange encryptedRange = EncryptedBlobRange.getEncryptedBlobRangeFromHeader(initialRangeHeader, encryptionData); - requestHeaders.set(rangeHeaderName, encryptedRange.toBlobRange().toString()); + if (context.getHttpRequest().getHeaders().getValue(RANGE_HEADER) != null) { + requestHeaders.set(RANGE_HEADER, encryptedRange.toBlobRange().toString()); + } // Process the request after expanding the range/ return next.process().map(httpResponse -> { diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/BlobDecryptionPolicyRangeTests.java b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/BlobDecryptionPolicyRangeTests.java deleted file mode 100644 index a6ea915f9d03a..0000000000000 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/BlobDecryptionPolicyRangeTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.storage.blob.specialized.cryptography; - -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpMethod; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.HttpRequest; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.core.util.Context; -import com.azure.json.JsonProviders; -import com.azure.json.JsonReader; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.Arguments; -import org.junit.jupiter.params.provider.MethodSource; -import reactor.core.publisher.Mono; - -import java.io.IOException; -import java.util.concurrent.atomic.AtomicReference; -import java.util.stream.Stream; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotEquals; - -/** - * A ranged download of an encrypted blob must be expanded to whole encryption blocks, whichever range header the - * request carries. - */ -public class BlobDecryptionPolicyRangeTests { - private static final HttpHeaderName X_MS_RANGE = HttpHeaderName.fromString("x-ms-range"); - private static final String ENCRYPTION_DATA_JSON - = "{\"EncryptionMode\":\"FullBlob\",\"EncryptionAgent\":{\"Protocol\":\"1.0\"," - + "\"EncryptionAlgorithm\":\"AES_CBC_256\"}}"; - - @ParameterizedTest - @MethodSource("rangeHeaderSupplier") - public void rangedRequestIsExpandedToEncryptedRange(String range, String xMsRange) throws IOException { - EncryptionData encryptionData; - try (JsonReader jsonReader = JsonProviders.createReader(ENCRYPTION_DATA_JSON)) { - encryptionData = EncryptionData.fromJson(jsonReader); - } - AtomicReference sentRequest = new AtomicReference<>(); - HttpPipeline pipeline = new HttpPipelineBuilder() - .policies(new BlobDecryptionPolicy(new FakeKey("keyId", new byte[256]), null, false)) - .httpClient(request -> { - sentRequest.set(request); - return Mono.just(new MockHttpResponse(request, 404)); - }) - .build(); - - HttpHeaders headers = new HttpHeaders(); - if (range != null) { - headers.set(HttpHeaderName.RANGE, range); - } - if (xMsRange != null) { - headers.set(X_MS_RANGE, xMsRange); - } - HttpRequest request - = new HttpRequest(HttpMethod.GET, "https://account.blob.core.windows.net/c/b").setHeaders(headers); - pipeline.send(request, new Context(CryptographyConstants.ENCRYPTION_DATA_KEY, encryptionData)).block(); - - // x-ms-range takes precedence when both are sent, so only that header is expanded. - String requestedRange = xMsRange != null ? xMsRange : range; - String expandedRange = EncryptedBlobRange.getEncryptedBlobRangeFromHeader(requestedRange, encryptionData) - .toBlobRange() - .toString(); - HttpHeaders sentHeaders = sentRequest.get().getHeaders(); - assertNotEquals(requestedRange, expandedRange); - assertEquals(xMsRange != null ? range : expandedRange, sentHeaders.getValue(HttpHeaderName.RANGE)); - assertEquals(xMsRange != null ? expandedRange : null, sentHeaders.getValue(X_MS_RANGE)); - } - - private static Stream rangeHeaderSupplier() { - return Stream.of(Arguments.of("bytes=20-40", null), Arguments.of(null, "bytes=20-40"), - Arguments.of("bytes=0-10", "bytes=20-40")); - } -} diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlockBlobApiTests.java b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlockBlobApiTests.java index fba8605409419..aa673f8467d73 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlockBlobApiTests.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlockBlobApiTests.java @@ -2056,7 +2056,7 @@ static class MockRetryRangeResponsePolicy implements HttpPipelinePolicy { public Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { return next.process().flatMap(response -> { if (response.getRequest().getHttpMethod() == HttpMethod.GET - && !expectedRangeHeader.equals(response.getRequest().getHeaders().getValue(HttpHeaderName.RANGE))) { + && !expectedRangeHeader.equals(response.getRequest().getHeaders().getValue("x-ms-range"))) { return Mono.error(new IllegalArgumentException("The range header was not set correctly on retry.")); } else if (response.getRequest().getHttpMethod() == HttpMethod.GET) { // ETag can be a dummy value. It's not validated, but DownloadResponse requires one diff --git a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlockBlobAsyncApiTests.java b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlockBlobAsyncApiTests.java index 06e0227f87f97..4c07292c46fb2 100644 --- a/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlockBlobAsyncApiTests.java +++ b/sdk/storage/azure-storage-blob-cryptography/src/test/java/com/azure/storage/blob/specialized/cryptography/EncryptedBlockBlobAsyncApiTests.java @@ -1880,7 +1880,7 @@ static class MockRetryRangeResponsePolicy implements HttpPipelinePolicy { public Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { return next.process().flatMap(response -> { if (response.getRequest().getHttpMethod() == HttpMethod.GET - && !expectedRangeHeader.equals(response.getRequest().getHeaders().getValue(HttpHeaderName.RANGE))) { + && !expectedRangeHeader.equals(response.getRequest().getHeaders().getValue("x-ms-range"))) { return Mono.error(new IllegalArgumentException("The range header was not set correctly on retry.")); } else if (response.getRequest().getHttpMethod() == HttpMethod.GET) { // ETag can be a dummy value. It's not validated, but DownloadResponse requires one diff --git a/sdk/storage/azure-storage-blob-nio/src/test/java/com/azure/storage/blob/nio/BlobNioTestBase.java b/sdk/storage/azure-storage-blob-nio/src/test/java/com/azure/storage/blob/nio/BlobNioTestBase.java index 4802c67c81a48..c01cda4635de6 100644 --- a/sdk/storage/azure-storage-blob-nio/src/test/java/com/azure/storage/blob/nio/BlobNioTestBase.java +++ b/sdk/storage/azure-storage-blob-nio/src/test/java/com/azure/storage/blob/nio/BlobNioTestBase.java @@ -98,8 +98,8 @@ protected void beforeTest() { // Ignore changes to the order of query parameters and wholly ignore the 'sv' (service version) query parameter // in SAS tokens. interceptorManager.addMatchers(Collections.singletonList(new CustomMatcher().setComparingBodies(false) - .setExcludedHeaders(Arrays.asList("x-ms-copy-source", "If-Match", "x-ms-range", "Range", - "If-Modified-Since", "If-Unmodified-Since", "Accept")) + .setExcludedHeaders(Arrays.asList("x-ms-copy-source", "If-Match", "x-ms-range", "If-Modified-Since", + "If-Unmodified-Since", "Accept")) .setQueryOrderingIgnored(true) .setIgnoredQueryParameters(Arrays.asList("sv")))); } diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md index a7ef43f8cf8f1..e78750671bbdb 100644 --- a/sdk/storage/azure-storage-blob/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob/CHANGELOG.md @@ -23,10 +23,6 @@ ### Other Changes - Migrated code generation from AutoRest (Swagger) to TypeSpec. The public API is unchanged apart from the items listed in this release. -- Range operations (download, uploading and clearing pages, uploading pages from a URL, getting page ranges and page - range diffs, and getting the blob layout) now send the standard `Range` request header instead of `x-ms-range`. The - service treats both the same, so this does not change results. `Range` has been added to the headers logged by - default. ## 12.38.0-beta.1 (2026-11-05) diff --git a/sdk/storage/azure-storage-blob/assets.json b/sdk/storage/azure-storage-blob/assets.json index a92a02aa2e683..21dd7b20b2769 100644 --- a/sdk/storage/azure-storage-blob/assets.json +++ b/sdk/storage/azure-storage-blob/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-blob", - "Tag": "java/storage/azure-storage-blob_226846434d" + "Tag": "java/storage/azure-storage-blob_63b8b1c050" } diff --git a/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java b/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java index 3f12203faf1ab..265a3cd4f1759 100644 --- a/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java +++ b/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java @@ -20,12 +20,14 @@ import com.github.javaparser.ast.expr.BinaryExpr; import com.github.javaparser.ast.expr.ConditionalExpr; import com.github.javaparser.ast.expr.Expression; +import com.github.javaparser.ast.expr.FieldAccessExpr; import com.github.javaparser.ast.expr.IntegerLiteralExpr; import com.github.javaparser.ast.expr.LambdaExpr; import com.github.javaparser.ast.expr.MethodCallExpr; import com.github.javaparser.ast.expr.NameExpr; import com.github.javaparser.ast.expr.NullLiteralExpr; import com.github.javaparser.ast.expr.ObjectCreationExpr; +import com.github.javaparser.ast.expr.SingleMemberAnnotationExpr; import com.github.javaparser.ast.expr.StringLiteralExpr; import com.github.javaparser.ast.modules.ModuleDirective; import com.github.javaparser.ast.modules.ModuleExportsDirective; @@ -52,6 +54,7 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; +import java.util.stream.Stream; /** * Customization class for Blob Storage. @@ -107,6 +110,10 @@ public class BlobStorageCustomizations extends Customization { "ServicesImpl", "ContainersImpl", "BlobsImpl", "AppendBlobsImpl", "BlockBlobsImpl", "PageBlobsImpl", "MultipartFormDataHelper", "XmlSerializerProviders"); + // The generated operation groups that send the service requests. + private static final List OPERATION_GROUP_IMPLS = Arrays.asList( + "ServicesImpl", "ContainersImpl", "BlobsImpl", "AppendBlobsImpl", "BlockBlobsImpl", "PageBlobsImpl"); + private static final String MODULE_INFO_PATH = "src/main/java/module-info.java"; // Directives the hand-written code needs that the generated module-info doesn't declare: the storage-common and @@ -151,6 +158,8 @@ public void customize(LibraryCustomization customization, Logger logger) { allowNullBlockListType(customization.getPackage(IMPL_PACKAGE)); + sendRangesInXMsRangeHeader(customization); + updateImplToMapInternalException(customization.getPackage(IMPL_PACKAGE)); } @@ -432,6 +441,41 @@ private static void allowEmptyGetLayoutResponse(PackageCustomization implPackage } } + /** + * Sends ranges in the {@code x-ms-range} header, as the shipped client did. The spec uses the standard + * {@code Range} header, which the service treats the same, but custom pipeline policies, recorded tests and HTTP + * intermediaries all see the header name. Renaming it where the request is built covers every pipeline, including + * the ones Data Lake, Cryptography and callers supply. + * + * @param customization The library customization. + */ + private static void sendRangesInXMsRangeHeader(LibraryCustomization customization) { + PackageCustomization implPackage = customization.getPackage(IMPL_PACKAGE); + Editor editor = customization.getRawEditor(); + Stream.concat(OPERATION_GROUP_IMPLS.stream(), + CONVENIENCE_CLIENTS_TO_RELOCATE.stream().map(BlobStorageCustomizations::internalClientName)) + // Only reprint the classes that send a range, so the others keep the generator's formatting. + .filter(className -> { + String content = editor.getFileContent(PKG_ROOT + "implementation/" + className + ".java"); + return content.contains("@HeaderParam(\"Range\")") || content.contains("HttpHeaderName.RANGE"); + }) + .forEach(className -> implPackage.getClass(className) + .customizeAst(ast -> ast.getClassByName(className).ifPresent(clazz -> { + // @HeaderParam("Range") on the RestProxy service interface methods. + clazz.findAll(SingleMemberAnnotationExpr.class, + annotation -> "HeaderParam".equals(annotation.getNameAsString()) + && annotation.getMemberValue().isStringLiteralExpr() + && "Range".equals(annotation.getMemberValue().asStringLiteralExpr().getValue())) + .forEach(annotation -> annotation.setMemberValue(new StringLiteralExpr("x-ms-range"))); + // requestOptions.setHeader(HttpHeaderName.RANGE, ...) for optional ranges. + clazz.findAll(FieldAccessExpr.class, + field -> "RANGE".equals(field.getNameAsString()) && field.getScope().isNameExpr() + && "HttpHeaderName".equals(field.getScope().asNameExpr().getNameAsString())) + .forEach(field -> field.replace(new MethodCallExpr(new NameExpr("HttpHeaderName"), + "fromString", new NodeList<>(new StringLiteralExpr("x-ms-range"))))); + }))); + } + /** * The service defaults Get Block List to committed blocks when {@code blocklisttype} is omitted, and the shipped * {@code listBlocks} accepted a null type for that. The spec declares the parameter required, so the generated @@ -745,9 +789,7 @@ private static String jsonReadExpression(VariableDeclarator field) { * @param implPackage The implementation package. */ private static void updateImplToMapInternalException(PackageCustomization implPackage) { - List implClassesToUpdate = Arrays.asList("ServicesImpl", "ContainersImpl", "BlobsImpl", - "AppendBlobsImpl", "BlockBlobsImpl", "PageBlobsImpl"); - for (String implToUpdate : implClassesToUpdate) { + for (String implToUpdate : OPERATION_GROUP_IMPLS) { implPackage.getClass(implToUpdate).customizeAst(ast -> { ast.addImport("com.azure.storage.blob.implementation.util.ModelHelper"); ast.addImport("com.azure.storage.blob.models.BlobStorageException"); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobAsyncClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobAsyncClientInternal.java index 456018fc0d6d3..89de0865be1ec 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobAsyncClientInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobAsyncClientInternal.java @@ -1957,7 +1957,7 @@ public Mono> downloadWithResponse requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); } if (range != null) { - requestOptions.setHeader(HttpHeaderName.RANGE, range); + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range"), range); } if (leaseId != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); @@ -2056,7 +2056,7 @@ public Mono download(String snapshot, String versionId, Integer time requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); } if (range != null) { - requestOptions.setHeader(HttpHeaderName.RANGE, range); + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range"), range); } if (leaseId != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); @@ -5190,7 +5190,7 @@ public Mono> getLayoutWi requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); } if (range != null) { - requestOptions.setHeader(HttpHeaderName.RANGE, range); + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range"), range); } if (leaseId != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); @@ -5284,7 +5284,7 @@ public Mono getLayout(String snapshot, String versionId, Str requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); } if (range != null) { - requestOptions.setHeader(HttpHeaderName.RANGE, range); + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range"), range); } if (leaseId != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobClientInternal.java index c08d48be9e1ed..15cc6bc78d8ef 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobClientInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlobClientInternal.java @@ -1953,7 +1953,7 @@ public ResponseBase downloadWithResponse(Strin requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); } if (range != null) { - requestOptions.setHeader(HttpHeaderName.RANGE, range); + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range"), range); } if (leaseId != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); @@ -2052,7 +2052,7 @@ public BinaryData download(String snapshot, String versionId, Integer timeout, S requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); } if (range != null) { - requestOptions.setHeader(HttpHeaderName.RANGE, range); + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range"), range); } if (leaseId != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); @@ -5130,7 +5130,7 @@ public ResponseBase getLayoutWithResp requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); } if (range != null) { - requestOptions.setHeader(HttpHeaderName.RANGE, range); + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range"), range); } if (leaseId != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); @@ -5224,7 +5224,7 @@ public BlobLayoutInternal getLayout(String snapshot, String versionId, String ma requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); } if (range != null) { - requestOptions.setHeader(HttpHeaderName.RANGE, range); + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range"), range); } if (leaseId != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobAsyncClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobAsyncClientInternal.java index a941a5a460486..186e2b1405e86 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobAsyncClientInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobAsyncClientInternal.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.storage.blob.implementation; import com.azure.core.annotation.Generated; @@ -41,6 +40,7 @@ * Initializes a new instance of the asynchronous AzureBlobStorage type. */ public final class PageBlobAsyncClientInternal { + @Generated private static final ObjectSerializer XML_SERIALIZER = XmlSerializerProviders.createInstance(); @@ -49,7 +49,7 @@ public final class PageBlobAsyncClientInternal { /** * Initializes an instance of PageBlobAsyncClientInternal class. - * + * * @param serviceClient the service client implementation. */ @Generated @@ -142,7 +142,7 @@ public PageBlobAsyncClientInternal(PageBlobsImpl serviceClient) { * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws BlobStorageErrorException thrown if the request is rejected by server. @@ -242,7 +242,7 @@ Mono> createWithResponseInternal(long size, RequestOptions reques * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param contentLength The length of the request. * @param range Specifies the range of the blob to operate on. * @param body The body of the request. @@ -320,7 +320,7 @@ Mono> uploadPagesWithResponseInternal(long contentLength, String * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param range Specifies the range of the blob to operate on. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws BlobStorageErrorException thrown if the request is rejected by server. @@ -424,7 +424,7 @@ Mono> clearPagesWithResponseInternal(String range, RequestOptions * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param sourceUrl Specifies the URL of the source. * @param sourceRange Specifies the bytes of the source. * @param contentLength The length of the request. @@ -516,7 +516,7 @@ Mono> uploadPagesFromUrlWithResponseInternal(String sourceUrl, St * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws BlobStorageErrorException thrown if the request is rejected by server. * @return the result of the Get Pages API along with {@link Response} on successful completion of {@link Mono}. @@ -606,7 +606,7 @@ Mono> getPageRangesWithResponseInternal(RequestOptions requ * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws BlobStorageErrorException thrown if the request is rejected by server. * @return the result of the Get Pages API along with {@link Response} on successful completion of {@link Mono}. @@ -671,7 +671,7 @@ Mono> getPageRangesDiffWithResponseInternal(RequestOptions * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws BlobStorageErrorException thrown if the request is rejected by server. @@ -732,7 +732,7 @@ Mono> resizeWithResponseInternal(long size, RequestOptions reques * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param sequenceNumberAction Required if the blob sequence number is provided. This property indicates how the * service should modify the blob's sequence number. Allowed values: "increment", "max", "update". * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -792,7 +792,7 @@ Mono> setSequenceNumberWithResponseInternal(String sequenceNumber * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as * it would appear in a request URI. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -807,7 +807,7 @@ Mono> copyIncrementalWithResponseInternal(String copySource, Requ /** * Creates a new page blob. - * + * * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. * @param metadata The metadata headers. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -957,7 +957,7 @@ public Mono> createWithResponse(long /** * Creates a new page blob. - * + * * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. * @param metadata The metadata headers. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -1100,7 +1100,7 @@ public Mono create(long size, Map metadata, Integer timeou /** * Creates a new page blob. - * + * * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageErrorException thrown if the request is rejected by server. @@ -1117,7 +1117,7 @@ public Mono create(long size) { /** * Writes a range of pages to the specified page blob. - * + * * @param contentLength The length of the request. * @param range Specifies the range of the blob to operate on. * @param body The body of the request. @@ -1235,7 +1235,7 @@ public Mono> uploadPagesWithResp /** * Writes a range of pages to the specified page blob. - * + * * @param contentLength The length of the request. * @param range Specifies the range of the blob to operate on. * @param body The body of the request. @@ -1348,7 +1348,7 @@ public Mono uploadPages(long contentLength, String range, BinaryData body, /** * Writes a range of pages to the specified page blob. - * + * * @param contentLength The length of the request. * @param range Specifies the range of the blob to operate on. * @param body The body of the request. @@ -1367,7 +1367,7 @@ public Mono uploadPages(long contentLength, String range, BinaryData body) /** * Clears a range of pages from the specified page blob. - * + * * @param range Specifies the range of the blob to operate on. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting @@ -1462,7 +1462,7 @@ public Mono> clearPagesWithRespon /** * Clears a range of pages from the specified page blob. - * + * * @param range Specifies the range of the blob to operate on. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting @@ -1552,7 +1552,7 @@ public Mono clearPages(String range, Integer timeout, String leaseId, Stri /** * Clears a range of pages from the specified page blob. - * + * * @param range Specifies the range of the blob to operate on. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageErrorException thrown if the request is rejected by server. @@ -1569,7 +1569,7 @@ public Mono clearPages(String range) { /** * Writes a range of pages to the specified page blob where the contents are read from a URL. - * + * * @param sourceUrl Specifies the URL of the source. * @param sourceRange Specifies the bytes of the source. * @param contentLength The length of the request. @@ -1731,7 +1731,7 @@ public Mono> uploadPagesF /** * Writes a range of pages to the specified page blob where the contents are read from a URL. - * + * * @param sourceUrl Specifies the URL of the source. * @param sourceRange Specifies the bytes of the source. * @param contentLength The length of the request. @@ -1889,7 +1889,7 @@ public Mono uploadPagesFromUrl(String sourceUrl, String sourceRange, long /** * Writes a range of pages to the specified page blob where the contents are read from a URL. - * + * * @param sourceUrl Specifies the URL of the source. * @param sourceRange Specifies the bytes of the source. * @param contentLength The length of the request. @@ -1910,7 +1910,7 @@ public Mono uploadPagesFromUrl(String sourceUrl, String sourceRange, long /** * Returns the list of valid page ranges for the specified page blob. - * + * * @param snapshot Specifies the snapshot of 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 @@ -1946,7 +1946,7 @@ public Mono> getPageRanges requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); } if (range != null) { - requestOptions.setHeader(HttpHeaderName.RANGE, range); + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range"), range); } if (leaseId != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); @@ -1983,7 +1983,7 @@ public Mono> getPageRanges /** * Returns the list of valid page ranges for the specified page blob. - * + * * @param snapshot Specifies the snapshot of 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 @@ -2017,7 +2017,7 @@ public Mono getPageRanges(String snapshot, Integer timeout, String ran requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); } if (range != null) { - requestOptions.setHeader(HttpHeaderName.RANGE, range); + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range"), range); } if (leaseId != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); @@ -2051,7 +2051,7 @@ public Mono getPageRanges(String snapshot, Integer timeout, String ran /** * Returns the list of valid page ranges for the specified page blob. - * + * * @throws BlobStorageErrorException 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 the Get Pages API on successful completion of {@link Mono}. @@ -2067,7 +2067,7 @@ public Mono getPageRanges() { /** * Returns the list of page ranges in the diff between the specified page blob and the specified previous snapshot. - * + * * @param snapshot Specifies the snapshot of 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 @@ -2112,7 +2112,7 @@ public Mono> getPageRa requestOptions.setHeader(HttpHeaderName.fromString("x-ms-previous-snapshot-url"), prevSnapshotUrl); } if (range != null) { - requestOptions.setHeader(HttpHeaderName.RANGE, range); + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range"), range); } if (leaseId != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); @@ -2149,7 +2149,7 @@ public Mono> getPageRa /** * Returns the list of page ranges in the diff between the specified page blob and the specified previous snapshot. - * + * * @param snapshot Specifies the snapshot of 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 @@ -2192,7 +2192,7 @@ public Mono getPageRangesDiff(String snapshot, Integer timeout, String requestOptions.setHeader(HttpHeaderName.fromString("x-ms-previous-snapshot-url"), prevSnapshotUrl); } if (range != null) { - requestOptions.setHeader(HttpHeaderName.RANGE, range); + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range"), range); } if (leaseId != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); @@ -2226,7 +2226,7 @@ public Mono getPageRangesDiff(String snapshot, Integer timeout, String /** * Returns the list of page ranges in the diff between the specified page blob and the specified previous snapshot. - * + * * @throws BlobStorageErrorException 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 the Get Pages API on successful completion of {@link Mono}. @@ -2242,7 +2242,7 @@ public Mono getPageRangesDiff() { /** * Changes the size of the specified page blob. - * + * * @param size The maximum size for the page blob. 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 @@ -2317,7 +2317,7 @@ public Mono> resizeWithResponse(long /** * Changes the size of the specified page blob. - * + * * @param size The maximum size for the page blob. 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 @@ -2388,7 +2388,7 @@ public Mono resize(long size, Integer timeout, String leaseId, String encr /** * Changes the size of the specified page blob. - * + * * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageErrorException thrown if the request is rejected by server. @@ -2406,7 +2406,7 @@ public Mono resize(long size) { /** * Updates the sequence number of the specified page blob. The operation will fail if the specified sequence number * is less than the current sequence number of the blob. - * + * * @param sequenceNumberAction Required if the blob sequence number is provided. 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 @@ -2470,7 +2470,7 @@ public Mono> setSequenceNu /** * Updates the sequence number of the specified page blob. The operation will fail if the specified sequence number * is less than the current sequence number of the blob. - * + * * @param sequenceNumberAction Required if the blob sequence number is provided. 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 @@ -2530,7 +2530,7 @@ public Mono setSequenceNumber(SequenceNumberActionType sequenceNumberActio /** * Updates the sequence number of the specified page blob. The operation will fail if the specified sequence number * is less than the current sequence number of the blob. - * + * * @param sequenceNumberAction Required if the blob sequence number is provided. This property indicates how the * service should modify the blob's sequence number. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2550,7 +2550,7 @@ public Mono setSequenceNumber(SequenceNumberActionType sequenceNumberActio /** * 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. - * + * * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as * it would appear in a request URI. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -2603,7 +2603,7 @@ public Mono> copyIncremental /** * 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. - * + * * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as * it would appear in a request URI. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -2652,7 +2652,7 @@ public Mono copyIncremental(String copySource, Integer timeout, String ifT /** * 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. - * + * * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as * it would appear in a request URI. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobClientInternal.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobClientInternal.java index ba57b85d92fd2..0c3bb39166db9 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobClientInternal.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/PageBlobClientInternal.java @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. - package com.azure.storage.blob.implementation; import com.azure.core.annotation.Generated; @@ -39,6 +38,7 @@ * Initializes a new instance of the synchronous AzureBlobStorage type. */ public final class PageBlobClientInternal { + @Generated private static final ObjectSerializer XML_SERIALIZER = XmlSerializerProviders.createInstance(); @@ -47,7 +47,7 @@ public final class PageBlobClientInternal { /** * Initializes an instance of PageBlobClientInternal class. - * + * * @param serviceClient the service client implementation. */ @Generated @@ -140,7 +140,7 @@ public PageBlobClientInternal(PageBlobsImpl serviceClient) { * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws BlobStorageErrorException thrown if the request is rejected by server. @@ -240,7 +240,7 @@ Response createWithResponseInternal(long size, RequestOptions requestOptio * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param contentLength The length of the request. * @param range Specifies the range of the blob to operate on. * @param body The body of the request. @@ -318,7 +318,7 @@ Response uploadPagesWithResponseInternal(long contentLength, String range, * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param range Specifies the range of the blob to operate on. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws BlobStorageErrorException thrown if the request is rejected by server. @@ -422,7 +422,7 @@ Response clearPagesWithResponseInternal(String range, RequestOptions reque * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param sourceUrl Specifies the URL of the source. * @param sourceRange Specifies the bytes of the source. * @param contentLength The length of the request. @@ -514,7 +514,7 @@ Response uploadPagesFromUrlWithResponseInternal(String sourceUrl, String s * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws BlobStorageErrorException thrown if the request is rejected by server. * @return the result of the Get Pages API along with {@link Response}. @@ -604,7 +604,7 @@ Response getPageRangesWithResponseInternal(RequestOptions requestOpt * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws BlobStorageErrorException thrown if the request is rejected by server. * @return the result of the Get Pages API along with {@link Response}. @@ -669,7 +669,7 @@ Response getPageRangesDiffWithResponseInternal(RequestOptions reques * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws BlobStorageErrorException thrown if the request is rejected by server. @@ -730,7 +730,7 @@ Response resizeWithResponseInternal(long size, RequestOptions requestOptio * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param sequenceNumberAction Required if the blob sequence number is provided. This property indicates how the * service should modify the blob's sequence number. Allowed values: "increment", "max", "update". * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -789,7 +789,7 @@ Response setSequenceNumberWithResponseInternal(String sequenceNumberAction * x-ms-client-request-idStringAn opaque, globally-unique, client-generated string * identifier for the request. * - * + * * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as * it would appear in a request URI. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. @@ -804,7 +804,7 @@ Response copyIncrementalWithResponseInternal(String copySource, RequestOpt /** * Creates a new page blob. - * + * * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. * @param metadata The metadata headers. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -953,7 +953,7 @@ public ResponseBase createWithResponse(long size, /** * Creates a new page blob. - * + * * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. * @param metadata The metadata headers. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -1095,7 +1095,7 @@ public void create(long size, Map metadata, Integer timeout, Pre /** * Creates a new page blob. - * + * * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageErrorException thrown if the request is rejected by server. @@ -1111,7 +1111,7 @@ public void create(long size) { /** * Writes a range of pages to the specified page blob. - * + * * @param contentLength The length of the request. * @param range Specifies the range of the blob to operate on. * @param body The body of the request. @@ -1230,7 +1230,7 @@ public ResponseBase uploadPagesWithResponse(l /** * Writes a range of pages to the specified page blob. - * + * * @param contentLength The length of the request. * @param range Specifies the range of the blob to operate on. * @param body The body of the request. @@ -1342,7 +1342,7 @@ public void uploadPages(long contentLength, String range, BinaryData body, byte[ /** * Writes a range of pages to the specified page blob. - * + * * @param contentLength The length of the request. * @param range Specifies the range of the blob to operate on. * @param body The body of the request. @@ -1360,7 +1360,7 @@ public void uploadPages(long contentLength, String range, BinaryData body) { /** * Clears a range of pages from the specified page blob. - * + * * @param range Specifies the range of the blob to operate on. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting @@ -1455,7 +1455,7 @@ public ResponseBase clearPagesWithResponse(Str /** * Clears a range of pages from the specified page blob. - * + * * @param range Specifies the range of the blob to operate on. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a * href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations\">Setting @@ -1544,7 +1544,7 @@ public void clearPages(String range, Integer timeout, String leaseId, String enc /** * Clears a range of pages from the specified page blob. - * + * * @param range Specifies the range of the blob to operate on. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageErrorException thrown if the request is rejected by server. @@ -1560,7 +1560,7 @@ public void clearPages(String range) { /** * Writes a range of pages to the specified page blob where the contents are read from a URL. - * + * * @param sourceUrl Specifies the URL of the source. * @param sourceRange Specifies the bytes of the source. * @param contentLength The length of the request. @@ -1723,7 +1723,7 @@ public ResponseBase uploadPagesFromUrl /** * Writes a range of pages to the specified page blob where the contents are read from a URL. - * + * * @param sourceUrl Specifies the URL of the source. * @param sourceRange Specifies the bytes of the source. * @param contentLength The length of the request. @@ -1879,7 +1879,7 @@ public void uploadPagesFromUrl(String sourceUrl, String sourceRange, long conten /** * Writes a range of pages to the specified page blob where the contents are read from a URL. - * + * * @param sourceUrl Specifies the URL of the source. * @param sourceRange Specifies the bytes of the source. * @param contentLength The length of the request. @@ -1898,7 +1898,7 @@ public void uploadPagesFromUrl(String sourceUrl, String sourceRange, long conten /** * Returns the list of valid page ranges for the specified page blob. - * + * * @param snapshot Specifies the snapshot of 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 @@ -1934,7 +1934,7 @@ public ResponseBase getPageRangesWithRe requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); } if (range != null) { - requestOptions.setHeader(HttpHeaderName.RANGE, range); + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range"), range); } if (leaseId != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); @@ -1971,7 +1971,7 @@ public ResponseBase getPageRangesWithRe /** * Returns the list of valid page ranges for the specified page blob. - * + * * @param snapshot Specifies the snapshot of 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 @@ -2005,7 +2005,7 @@ public PageList getPageRanges(String snapshot, Integer timeout, String range, St requestOptions.addQueryParam("timeout", String.valueOf(timeout), false); } if (range != null) { - requestOptions.setHeader(HttpHeaderName.RANGE, range); + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range"), range); } if (leaseId != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); @@ -2038,7 +2038,7 @@ public PageList getPageRanges(String snapshot, Integer timeout, String range, St /** * Returns the list of valid page ranges for the specified page blob. - * + * * @throws BlobStorageErrorException 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 the Get Pages API. @@ -2053,7 +2053,7 @@ public PageList getPageRanges() { /** * Returns the list of page ranges in the diff between the specified page blob and the specified previous snapshot. - * + * * @param snapshot Specifies the snapshot of 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 @@ -2097,7 +2097,7 @@ public ResponseBase getPageRangesDi requestOptions.setHeader(HttpHeaderName.fromString("x-ms-previous-snapshot-url"), prevSnapshotUrl); } if (range != null) { - requestOptions.setHeader(HttpHeaderName.RANGE, range); + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range"), range); } if (leaseId != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); @@ -2134,7 +2134,7 @@ public ResponseBase getPageRangesDi /** * Returns the list of page ranges in the diff between the specified page blob and the specified previous snapshot. - * + * * @param snapshot Specifies the snapshot of 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 @@ -2177,7 +2177,7 @@ public PageList getPageRangesDiff(String snapshot, Integer timeout, String prevs requestOptions.setHeader(HttpHeaderName.fromString("x-ms-previous-snapshot-url"), prevSnapshotUrl); } if (range != null) { - requestOptions.setHeader(HttpHeaderName.RANGE, range); + requestOptions.setHeader(HttpHeaderName.fromString("x-ms-range"), range); } if (leaseId != null) { requestOptions.setHeader(HttpHeaderName.fromString("x-ms-lease-id"), leaseId); @@ -2211,7 +2211,7 @@ public PageList getPageRangesDiff(String snapshot, Integer timeout, String prevs /** * Returns the list of page ranges in the diff between the specified page blob and the specified previous snapshot. - * + * * @throws BlobStorageErrorException 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 the Get Pages API. @@ -2227,7 +2227,7 @@ public PageList getPageRangesDiff() { /** * Changes the size of the specified page blob. - * + * * @param size The maximum size for the page blob. 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 @@ -2301,7 +2301,7 @@ public ResponseBase resizeWithResponse(long size, /** * Changes the size of the specified page blob. - * + * * @param size The maximum size for the page blob. 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 @@ -2371,7 +2371,7 @@ public void resize(long size, Integer timeout, String leaseId, String encryption /** * Changes the size of the specified page blob. - * + * * @param size The maximum size for the page blob. Must be aligned to a 512-byte boundary. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws BlobStorageErrorException thrown if the request is rejected by server. @@ -2388,7 +2388,7 @@ public void resize(long size) { /** * Updates the sequence number of the specified page blob. The operation will fail if the specified sequence number * is less than the current sequence number of the blob. - * + * * @param sequenceNumberAction Required if the blob sequence number is provided. 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 @@ -2453,7 +2453,7 @@ public ResponseBase setSequenceNumberWi /** * Updates the sequence number of the specified page blob. The operation will fail if the specified sequence number * is less than the current sequence number of the blob. - * + * * @param sequenceNumberAction Required if the blob sequence number is provided. 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 @@ -2511,7 +2511,7 @@ public void setSequenceNumber(SequenceNumberActionType sequenceNumberAction, Int /** * Updates the sequence number of the specified page blob. The operation will fail if the specified sequence number * is less than the current sequence number of the blob. - * + * * @param sequenceNumberAction Required if the blob sequence number is provided. This property indicates how the * service should modify the blob's sequence number. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2529,7 +2529,7 @@ public void setSequenceNumber(SequenceNumberActionType sequenceNumberAction) { /** * 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. - * + * * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as * it would appear in a request URI. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -2582,7 +2582,7 @@ public ResponseBase copyIncrementalWithRe /** * 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. - * + * * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as * it would appear in a request URI. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a @@ -2630,7 +2630,7 @@ public void copyIncremental(String copySource, Integer timeout, String ifTags, /** * 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. - * + * * @param copySource Specifies the name of the source URL for the copy operation. The value should be URL-encoded as * it would appear in a request URI. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 349779cfbf13b..9750d0b85c10b 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 @@ -91,7 +91,7 @@ Response createSync(@HostParam("url") String url, @HeaderParam("x-ms-versi @UnexpectedResponseExceptionType(BlobStorageErrorException.class) Mono> uploadPages(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Content-Type") String contentType, @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Range") String range, @HeaderParam("x-ms-page-write") String pageWrite, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-page-write") String pageWrite, @BodyParam("application/octet-stream") BinaryData body, RequestOptions requestOptions, Context context); @Put("?comp=page") @@ -99,21 +99,21 @@ Mono> uploadPages(@HostParam("url") String url, @HeaderParam("x-m @UnexpectedResponseExceptionType(BlobStorageErrorException.class) Response uploadPagesSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("Content-Type") String contentType, @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Range") String range, @HeaderParam("x-ms-page-write") String pageWrite, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-page-write") String pageWrite, @BodyParam("application/octet-stream") BinaryData body, RequestOptions requestOptions, Context context); @Put("?comp=page") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageErrorException.class) Mono> clearPages(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, - @HeaderParam("Content-Length") int contentLength, @HeaderParam("Range") String range, + @HeaderParam("Content-Length") int contentLength, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-page-write") String pageWrite, RequestOptions requestOptions, Context context); @Put("?comp=page") @ExpectedResponses({ 201 }) @UnexpectedResponseExceptionType(BlobStorageErrorException.class) Response clearPagesSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, - @HeaderParam("Content-Length") int contentLength, @HeaderParam("Range") String range, + @HeaderParam("Content-Length") int contentLength, @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-page-write") String pageWrite, RequestOptions requestOptions, Context context); @Put("?comp=page") @@ -122,7 +122,7 @@ Response clearPagesSync(@HostParam("url") String url, @HeaderParam("x-ms-v Mono> uploadPagesFromUrl(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("x-ms-copy-source") String sourceUrl, @HeaderParam("x-ms-source-range") String sourceRange, @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Range") String range, @HeaderParam("x-ms-page-write") String pageWrite, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-page-write") String pageWrite, RequestOptions requestOptions, Context context); @Put("?comp=page") @@ -131,7 +131,7 @@ Mono> uploadPagesFromUrl(@HostParam("url") String url, Response uploadPagesFromUrlSync(@HostParam("url") String url, @HeaderParam("x-ms-version") String xMsVersion, @HeaderParam("x-ms-copy-source") String sourceUrl, @HeaderParam("x-ms-source-range") String sourceRange, @HeaderParam("Content-Length") long contentLength, - @HeaderParam("Range") String range, @HeaderParam("x-ms-page-write") String pageWrite, + @HeaderParam("x-ms-range") String range, @HeaderParam("x-ms-page-write") String pageWrite, RequestOptions requestOptions, Context context); @Get("?comp=pagelist") diff --git a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobHeadersAndQueryParameters.java b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobHeadersAndQueryParameters.java index da57455e65e08..52f28ff4029af 100644 --- a/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobHeadersAndQueryParameters.java +++ b/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/util/BlobHeadersAndQueryParameters.java @@ -18,23 +18,22 @@ public class BlobHeadersAndQueryParameters { "x-ms-version", "Accept-Ranges", "Content-Disposition", "Content-Encoding", "Content-Language", "Content-MD5", "Content-Range", "ETag", "Last-Modified", "Server", "Vary", "x-ms-content-crc64", "x-ms-copy-action", "x-ms-copy-completion-time", "x-ms-copy-id", "x-ms-copy-progress", "x-ms-copy-status", - "x-ms-has-immutability-policy", "x-ms-has-legal-hold", "x-ms-lease-state", "x-ms-lease-status", "Range", - "x-ms-range", "x-ms-request-server-encrypted", "x-ms-server-encrypted", "x-ms-snapshot", "x-ms-source-range", - "If-Match", "If-Modified-Since", "If-None-Match", "If-Unmodified-Since", "x-ms-access-tier", - "x-ms-access-tier-change-time", "x-ms-access-tier-inferred", "x-ms-account-kind", "x-ms-archive-status", - "x-ms-blob-append-offset", "x-ms-blob-cache-control", "x-ms-blob-committed-block-count", - "x-ms-blob-condition-appendpos", "x-ms-blob-condition-maxsize", "x-ms-blob-content-disposition", - "x-ms-blob-content-encoding", "x-ms-blob-content-language", "x-ms-blob-content-length", "x-ms-blob-content-md5", - "x-ms-blob-content-type", "x-ms-blob-public-access", "x-ms-blob-sequence-number", "x-ms-blob-type", - "x-ms-copy-destination-snapshot", "x-ms-creation-time", "x-ms-default-encryption-scope", - "x-ms-delete-snapshots", "x-ms-delete-type-permanent", "x-ms-deny-encryption-scope-override", - "x-ms-encryption-algorithm", "x-ms-if-sequence-number-eq", "x-ms-if-sequence-number-le", - "x-ms-if-sequence-number-lt", "x-ms-incremental-copy", "x-ms-lease-action", "x-ms-lease-break-period", - "x-ms-lease-duration", "x-ms-lease-id", "x-ms-lease-time", "x-ms-page-write", "x-ms-proposed-lease-id", - "x-ms-range-get-content-md5", "x-ms-rehydrate-priority", "x-ms-sequence-number-action", "x-ms-sku-name", - "x-ms-source-content-md5", "x-ms-source-if-match", "x-ms-source-if-modified-since", "x-ms-source-if-none-match", - "x-ms-source-if-unmodified-since", "x-ms-tag-count", "x-ms-encryption-key-sha256") - .collect(Collectors.toCollection(HashSet::new)); + "x-ms-has-immutability-policy", "x-ms-has-legal-hold", "x-ms-lease-state", "x-ms-lease-status", "x-ms-range", + "x-ms-request-server-encrypted", "x-ms-server-encrypted", "x-ms-snapshot", "x-ms-source-range", "If-Match", + "If-Modified-Since", "If-None-Match", "If-Unmodified-Since", "x-ms-access-tier", "x-ms-access-tier-change-time", + "x-ms-access-tier-inferred", "x-ms-account-kind", "x-ms-archive-status", "x-ms-blob-append-offset", + "x-ms-blob-cache-control", "x-ms-blob-committed-block-count", "x-ms-blob-condition-appendpos", + "x-ms-blob-condition-maxsize", "x-ms-blob-content-disposition", "x-ms-blob-content-encoding", + "x-ms-blob-content-language", "x-ms-blob-content-length", "x-ms-blob-content-md5", "x-ms-blob-content-type", + "x-ms-blob-public-access", "x-ms-blob-sequence-number", "x-ms-blob-type", "x-ms-copy-destination-snapshot", + "x-ms-creation-time", "x-ms-default-encryption-scope", "x-ms-delete-snapshots", "x-ms-delete-type-permanent", + "x-ms-deny-encryption-scope-override", "x-ms-encryption-algorithm", "x-ms-if-sequence-number-eq", + "x-ms-if-sequence-number-le", "x-ms-if-sequence-number-lt", "x-ms-incremental-copy", "x-ms-lease-action", + "x-ms-lease-break-period", "x-ms-lease-duration", "x-ms-lease-id", "x-ms-lease-time", "x-ms-page-write", + "x-ms-proposed-lease-id", "x-ms-range-get-content-md5", "x-ms-rehydrate-priority", + "x-ms-sequence-number-action", "x-ms-sku-name", "x-ms-source-content-md5", "x-ms-source-if-match", + "x-ms-source-if-modified-since", "x-ms-source-if-none-match", "x-ms-source-if-unmodified-since", + "x-ms-tag-count", "x-ms-encryption-key-sha256").collect(Collectors.toCollection(HashSet::new)); /** * Gets the Storage Blob whitelist headers for log. diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java index 178e189375b64..b522d206a9f8a 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java @@ -3286,7 +3286,7 @@ public void downloadBlobToFileInChunksOverSessionAuth() throws IOException { && path != null && path.endsWith("/" + blobName) && (query == null || !query.contains("comp="))) { - String range = req.getHeaders().getValue(HttpHeaderName.RANGE); + String range = req.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); if (range == null) { range = req.getHeaders().getValue(HttpHeaderName.fromString("Range")); } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java index ab083f7fd71cb..ca170ca544acd 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java @@ -3053,7 +3053,7 @@ public void downloadBlobToFileInChunksOverSessionAuth() throws IOException { && path != null && path.endsWith("/" + blobName) && (query == null || !query.contains("comp="))) { - String range = req.getHeaders().getValue(HttpHeaderName.RANGE); + String range = req.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); if (range == null) { range = req.getHeaders().getValue(HttpHeaderName.fromString("Range")); } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobContentValidationAsyncUploadTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobContentValidationAsyncUploadTests.java index ba867bfc6c0ef..106ef65de0ed0 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobContentValidationAsyncUploadTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobContentValidationAsyncUploadTests.java @@ -85,6 +85,7 @@ public class BlobContentValidationAsyncUploadTests extends BlobTestBase { private static final HttpHeaderName APPEND_POS = HttpHeaderName.fromString("x-ms-blob-condition-appendpos"); private static final HttpHeaderName MAX_SIZE = HttpHeaderName.fromString("x-ms-blob-condition-maxsize"); private static final HttpHeaderName SEQ_EQ = HttpHeaderName.fromString("x-ms-if-sequence-number-eq"); + private static final HttpHeaderName X_MS_RANGE = HttpHeaderName.fromString("x-ms-range"); private static final int TEN_MB = 10 * Constants.MB; // Generic ">= 4 MiB so the single-shot upload path uses a structured message" payload for the replayable @@ -1431,7 +1432,7 @@ public void uploadPagesAtNonZeroOffsetIsValidatedAndForwardsRange() { assertTrue(allUploadsUseCrc64Header(recorded)); assertCrc64HeaderMatches(upload.getHeaders(), data); assertEquals("bytes=" + start + "-" + (start + UNDER_4MB_PAGE_ALIGNED - 1), - upload.getHeaders().getValue(HttpHeaderName.RANGE), + upload.getHeaders().getValue(X_MS_RANGE), "A non-zero page offset must be forwarded alongside content validation"); } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobContentValidationUploadTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobContentValidationUploadTests.java index 3a1b3d365e3b1..c0f9099c8e025 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobContentValidationUploadTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobContentValidationUploadTests.java @@ -85,6 +85,7 @@ public class BlobContentValidationUploadTests extends BlobTestBase { private static final HttpHeaderName CV_APPEND_POS = HttpHeaderName.fromString("x-ms-blob-condition-appendpos"); private static final HttpHeaderName CV_MAX_SIZE = HttpHeaderName.fromString("x-ms-blob-condition-maxsize"); private static final HttpHeaderName CV_SEQ_EQ = HttpHeaderName.fromString("x-ms-if-sequence-number-eq"); + private static final HttpHeaderName CV_RANGE = HttpHeaderName.fromString("x-ms-range"); private static final int TEN_MB = 10 * Constants.MB; // Generic ">= 4 MiB so the single-shot upload path uses a structured message" payload for the replayable @@ -1536,7 +1537,7 @@ public void uploadPagesAtNonZeroOffsetIsValidatedAndForwardsRange() { assertTrue(allUploadsUseCrc64Header(recorded)); assertCrc64HeaderMatches(upload.getHeaders(), data); assertEquals("bytes=" + start + "-" + (start + UNDER_4MB_PAGE_ALIGNED - 1), - upload.getHeaders().getValue(HttpHeaderName.RANGE), + upload.getHeaders().getValue(CV_RANGE), "A non-zero page offset must be forwarded alongside content validation"); } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java index 6ad82959bfe3c..76c24fdb8161c 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java @@ -561,12 +561,12 @@ protected HttpPipelinePolicy createLayoutResponseLoggingPolicy() { } String clientRequestId = request.getHeaders().getValue(HttpHeaderName.X_MS_CLIENT_REQUEST_ID); - String range = request.getHeaders().getValue(HttpHeaderName.RANGE); + String range = request.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); return next.process() .doOnNext(response -> LOGGER.atInfo() .addKeyValue("test", testName) .addKeyValue("statusCode", response.getStatusCode()) - .addKeyValue("Range", range) + .addKeyValue("x-ms-range", range) .addKeyValue("hasMarker", query.contains("marker=")) .addKeyValue("x-ms-client-request-id", clientRequestId) .addKeyValue("x-ms-request-id", response.getHeaderValue(X_MS_REQUEST_ID)) diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java index 0613548db8a93..2dbfebae566cc 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerApiTests.java @@ -2633,7 +2633,7 @@ public void downloadBlobToFileInChunksOverSessionAuth() throws IOException { && path != null && path.endsWith("/" + blobName) && (query == null || !query.contains("comp="))) { - String range = req.getHeaders().getValue(HttpHeaderName.RANGE); + String range = req.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); if (range == null) { range = req.getHeaders().getValue(HttpHeaderName.fromString("Range")); } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java index a01d6528e39ef..17ccccb0f8b50 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/ContainerAsyncApiTests.java @@ -2660,7 +2660,7 @@ public void downloadBlobToFileInChunksOverSessionAuth() throws IOException { && path != null && path.endsWith("/" + blobName) && (query == null || !query.contains("comp="))) { - String range = req.getHeaders().getValue(HttpHeaderName.RANGE); + String range = req.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); if (range == null) { range = req.getHeaders().getValue(HttpHeaderName.fromString("Range")); } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseTests.java index ceb43b0523581..1bcb38e711ac6 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobAsyncClientBaseTests.java @@ -458,7 +458,7 @@ public void subsequentPagesReuseInitialETagAndRange() { @Test public void getLayoutWithoutRangeSendsNoRangeHeaderOnAnyPage() { - // Contract: when the caller sets no range, continuation pages must also omit the Range header. + // Contract: when the caller sets no range, continuation pages must also omit x-ms-range. LayoutPagesHttpClient httpClient = new LayoutPagesHttpClient(true); BlobAsyncClientBase client = client(httpClient); @@ -469,8 +469,8 @@ public void getLayoutWithoutRangeSendsNoRangeHeaderOnAnyPage() { assertEquals(2, httpClient.captured.size()); CapturedRequest first = httpClient.captured.get(0); CapturedRequest second = httpClient.captured.get(1); - assertNull(first.range, "Initial page must not send the Range header when no range was set"); - assertNull(second.range, "Continuation page must not send the Range header when no range was set"); + assertNull(first.range, "Initial page must not send x-ms-range when no range was set"); + assertNull(second.range, "Continuation page must not send x-ms-range when no range was set"); assertNull(first.ifMatch); assertEquals(FIRST_PAGE_ETAG, second.ifMatch); } @@ -489,7 +489,7 @@ private static final class CapturedRequest { this.ifNoneMatch = request.getHeaders().getValue(HttpHeaderName.IF_NONE_MATCH); this.ifUnmodifiedSince = request.getHeaders().getValue(HttpHeaderName.IF_UNMODIFIED_SINCE); this.leaseId = request.getHeaders().getValue(HttpHeaderName.fromString("x-ms-lease-id")); - this.range = request.getHeaders().getValue(HttpHeaderName.RANGE); + this.range = request.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); } } diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobClientBaseTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobClientBaseTests.java index fcda4f5ea8685..a104fe691c18d 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobClientBaseTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobClientBaseTests.java @@ -852,7 +852,7 @@ public void openSeekableByteChannelReadPropagatesFatalLayoutFetchErrors() throws @DoNotRecord @Test public void getLayoutWithoutRangeSendsNoRangeHeaderOnAnyPage() { - // Contract: when the caller sets no range, continuation pages must also omit the Range header. + // Contract: when the caller sets no range, continuation pages must also omit x-ms-range. LayoutPagesHttpClient httpClient = new LayoutPagesHttpClient(true); BlobClientBase client = client(httpClient); @@ -861,8 +861,8 @@ public void getLayoutWithoutRangeSendsNoRangeHeaderOnAnyPage() { assertEquals(2, httpClient.captured.size()); CapturedRequest first = httpClient.captured.get(0); CapturedRequest second = httpClient.captured.get(1); - assertNull(first.range, "Initial page must not send the Range header when no range was set"); - assertNull(second.range, "Continuation page must not send the Range header when no range was set"); + assertNull(first.range, "Initial page must not send x-ms-range when no range was set"); + assertNull(second.range, "Continuation page must not send x-ms-range when no range was set"); assertNull(first.ifMatch); assertEquals(FIRST_PAGE_ETAG, second.ifMatch); } @@ -954,7 +954,7 @@ private static final class CapturedRequest { this.ifNoneMatch = request.getHeaders().getValue(HttpHeaderName.IF_NONE_MATCH); this.ifUnmodifiedSince = request.getHeaders().getValue(HttpHeaderName.IF_UNMODIFIED_SINCE); this.leaseId = request.getHeaders().getValue(HttpHeaderName.fromString("x-ms-lease-id")); - this.range = request.getHeaders().getValue(HttpHeaderName.RANGE); + this.range = request.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); } } @@ -983,7 +983,7 @@ private SeekableRequestRecord(HttpRequest request) { this.url = request.getUrl().toString(); this.requestHost = request.getUrl().getHost(); this.hostHeader = request.getHeaders().getValue(HttpHeaderName.HOST); - this.rangeHeader = request.getHeaders().getValue(HttpHeaderName.RANGE); + this.rangeHeader = request.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); } } @@ -1120,7 +1120,7 @@ private HttpResponse createLayoutResponse(HttpRequest request) { } private HttpResponse createDataResponse(HttpRequest request) { - String range = request.getHeaders().getValue(HttpHeaderName.RANGE); + String range = request.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); long start = 0L; long end = contentBytes.length - 1L; if (range != null) { diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobDataLocalityDownloadApiTests.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobDataLocalityDownloadApiTests.java index 0227d5a6a37ad..7fae5f7dded2c 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobDataLocalityDownloadApiTests.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobDataLocalityDownloadApiTests.java @@ -1055,7 +1055,7 @@ public Mono send(HttpRequest request) { dataRequestRecords.add(record); - String rangeHeader = request.getHeaders().getValue(HttpHeaderName.RANGE); + String rangeHeader = request.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); int start = 0; int end = contentBytes.length - 1; if (rangeHeader != null) { diff --git a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseMockFlux.java b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseMockFlux.java index de3da4f6c7d30..6d4443433f2d1 100644 --- a/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseMockFlux.java +++ b/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/DownloadResponseMockFlux.java @@ -164,7 +164,7 @@ public HttpPipelinePolicy asPolicy() { if (tryNumber > 1) { retryIfMatch = context.getHttpRequest().getHeaders().getValue(HttpHeaderName.IF_MATCH); } - HttpHeader rangeHeader = context.getHttpRequest().getHeaders().get(HttpHeaderName.RANGE); + HttpHeader rangeHeader = context.getHttpRequest().getHeaders().get("x-ms-range"); long offset = 0L; Long count = null; if (rangeHeader != null) { diff --git a/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/policy/MockRetryRangeResponsePolicy.java b/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/policy/MockRetryRangeResponsePolicy.java index 9a7d44c929032..dacf97f4cda34 100644 --- a/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/policy/MockRetryRangeResponsePolicy.java +++ b/sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/policy/MockRetryRangeResponsePolicy.java @@ -4,7 +4,6 @@ package com.azure.storage.common.test.shared.policy; import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipelineCallContext; import com.azure.core.http.HttpPipelineNextPolicy; import com.azure.core.http.HttpResponse; @@ -15,11 +14,6 @@ import java.io.IOException; import java.util.Objects; -/** - * Fails the download response stream and asserts the retried request asked for the expected range. File share sends - * the standard {@code Range} header while blob sends {@code x-ms-range}; both are accepted, and {@code x-ms-range} wins - * when both are present, matching the service's precedence. - */ public class MockRetryRangeResponsePolicy implements HttpPipelinePolicy { private static final HttpHeaderName X_MS_RANGE = HttpHeaderName.fromString("x-ms-range"); @@ -32,13 +26,7 @@ public MockRetryRangeResponsePolicy(String rangeMatch) { @Override public Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) { return next.process().flatMap(response -> { - HttpHeaders requestHeaders = response.getRequest().getHeaders(); - String range = requestHeaders.getValue(X_MS_RANGE); - if (range == null) { - range = requestHeaders.getValue(HttpHeaderName.RANGE); - } - - if (!Objects.equals(range, rangeMatch)) { + if (!Objects.equals(response.getRequest().getHeaders().getValue(X_MS_RANGE), rangeMatch)) { return Mono.error(new IllegalArgumentException("The range header was not set correctly on retry.")); } else { // ETag can be a dummy value. It's not validated, but DownloadResponse requires one diff --git a/sdk/storage/azure-storage-file-datalake/assets.json b/sdk/storage/azure-storage-file-datalake/assets.json index a6ac6fabf8ca1..c1e0f96ca4561 100644 --- a/sdk/storage/azure-storage-file-datalake/assets.json +++ b/sdk/storage/azure-storage-file-datalake/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/storage/azure-storage-file-datalake", - "Tag": "java/storage/azure-storage-file-datalake_7e5704eea8" + "Tag": "java/storage/azure-storage-file-datalake_88765f9839" } diff --git a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DataLakeDataLocalityOptionsTests.java b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DataLakeDataLocalityOptionsTests.java index 79ecec7e1ed4d..5edfa627e027c 100644 --- a/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DataLakeDataLocalityOptionsTests.java +++ b/sdk/storage/azure-storage-file-datalake/src/test/java/com/azure/storage/file/datalake/DataLakeDataLocalityOptionsTests.java @@ -411,7 +411,7 @@ public Mono send(HttpRequest request) { } dataRequestCount++; - String rangeHeader = request.getHeaders().getValue(HttpHeaderName.RANGE); + String rangeHeader = request.getHeaders().getValue(HttpHeaderName.fromString("x-ms-range")); int start = 0; int end = DOWNLOAD_BODY.length - 1; if (rangeHeader != null) { From c661eb1a2147cf0ce7afff7cad1f24bd1d958648 Mon Sep 17 00:00:00 2001 From: Isabelle Date: Mon, 23 Nov 2026 11:08:52 -0800 Subject: [PATCH 10/11] Rename a customization constant the spelling check flags Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../src/main/java/BlobStorageCustomizations.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java b/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java index 265a3cd4f1759..73ec0a086b8aa 100644 --- a/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java +++ b/sdk/storage/azure-storage-blob/customization/src/main/java/BlobStorageCustomizations.java @@ -111,7 +111,7 @@ public class BlobStorageCustomizations extends Customization { "MultipartFormDataHelper", "XmlSerializerProviders"); // The generated operation groups that send the service requests. - private static final List OPERATION_GROUP_IMPLS = Arrays.asList( + private static final List OPERATION_GROUP_CLASSES = Arrays.asList( "ServicesImpl", "ContainersImpl", "BlobsImpl", "AppendBlobsImpl", "BlockBlobsImpl", "PageBlobsImpl"); private static final String MODULE_INFO_PATH = "src/main/java/module-info.java"; @@ -452,7 +452,7 @@ private static void allowEmptyGetLayoutResponse(PackageCustomization implPackage private static void sendRangesInXMsRangeHeader(LibraryCustomization customization) { PackageCustomization implPackage = customization.getPackage(IMPL_PACKAGE); Editor editor = customization.getRawEditor(); - Stream.concat(OPERATION_GROUP_IMPLS.stream(), + Stream.concat(OPERATION_GROUP_CLASSES.stream(), CONVENIENCE_CLIENTS_TO_RELOCATE.stream().map(BlobStorageCustomizations::internalClientName)) // Only reprint the classes that send a range, so the others keep the generator's formatting. .filter(className -> { @@ -789,7 +789,7 @@ private static String jsonReadExpression(VariableDeclarator field) { * @param implPackage The implementation package. */ private static void updateImplToMapInternalException(PackageCustomization implPackage) { - for (String implToUpdate : OPERATION_GROUP_IMPLS) { + for (String implToUpdate : OPERATION_GROUP_CLASSES) { implPackage.getClass(implToUpdate).customizeAst(ast -> { ast.addImport("com.azure.storage.blob.implementation.util.ModelHelper"); ast.addImport("com.azure.storage.blob.models.BlobStorageException"); From 4efc19fe69d1314b2aa64952424557b45bace323 Mon Sep 17 00:00:00 2001 From: Isabelle Date: Tue, 24 Nov 2026 12:26:21 -0800 Subject: [PATCH 11/11] Regenerate Blob from the spec without redundant Java options Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../main/resources/META-INF/azure-storage-blob_metadata.json | 2 +- sdk/storage/azure-storage-blob/tsp-location.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-blob/src/main/resources/META-INF/azure-storage-blob_metadata.json b/sdk/storage/azure-storage-blob/src/main/resources/META-INF/azure-storage-blob_metadata.json index 7d96148df373f..e59717390d3b6 100644 --- a/sdk/storage/azure-storage-blob/src/main/resources/META-INF/azure-storage-blob_metadata.json +++ b/sdk/storage/azure-storage-blob/src/main/resources/META-INF/azure-storage-blob_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Storage.Blob":"2027-03-07"},"crossLanguagePackageId":"Storage.Blob","crossLanguageVersion":"45f6c09b99b5","crossLanguageDefinitions":{"com.azure.storage.blob.AppendBlobAsyncClient":"Storage.Blob.AppendBlob","com.azure.storage.blob.AppendBlobAsyncClient.appendBlock":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrl":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrlWithResponse":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrlWithResponseInternal":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockWithResponse":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockWithResponseInternal":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobAsyncClient.create":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobAsyncClient.createWithResponse":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobAsyncClient.createWithResponseInternal":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobAsyncClient.seal":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobAsyncClient.sealWithResponse":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobAsyncClient.sealWithResponseInternal":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobClient":"Storage.Blob.AppendBlob","com.azure.storage.blob.AppendBlobClient.appendBlock":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobClient.appendBlockFromUrl":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobClient.appendBlockFromUrlWithResponse":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobClient.appendBlockFromUrlWithResponseInternal":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobClient.appendBlockWithResponse":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobClient.appendBlockWithResponseInternal":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobClient.create":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobClient.createWithResponse":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobClient.createWithResponseInternal":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobClient.seal":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobClient.sealWithResponse":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobClient.sealWithResponseInternal":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AzureBlobStorageBuilder":"Storage.Blob","com.azure.storage.blob.BlobAsyncClient":"Storage.Blob.Blob","com.azure.storage.blob.BlobAsyncClient.abortCopyFromUrl":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.abortCopyFromUrlWithResponse":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.abortCopyFromUrlWithResponseInternal":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.acquireLease":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobAsyncClient.acquireLeaseWithResponse":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobAsyncClient.acquireLeaseWithResponseInternal":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobAsyncClient.breakLease":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobAsyncClient.breakLeaseWithResponse":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobAsyncClient.breakLeaseWithResponseInternal":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobAsyncClient.changeLease":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobAsyncClient.changeLeaseWithResponse":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobAsyncClient.changeLeaseWithResponseInternal":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobAsyncClient.copyFromUrl":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobAsyncClient.copyFromUrlWithResponse":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobAsyncClient.copyFromUrlWithResponseInternal":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobAsyncClient.createSnapshot":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobAsyncClient.createSnapshotWithResponse":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobAsyncClient.createSnapshotWithResponseInternal":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobAsyncClient.delete":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobAsyncClient.deleteImmutabilityPolicy":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.deleteImmutabilityPolicyWithResponse":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.deleteImmutabilityPolicyWithResponseInternal":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.deleteWithResponse":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobAsyncClient.deleteWithResponseInternal":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobAsyncClient.download":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobAsyncClient.downloadWithResponse":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobAsyncClient.downloadWithResponseInternal":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobAsyncClient.getAccountInfo":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobAsyncClient.getAccountInfoWithResponse":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobAsyncClient.getAccountInfoWithResponseInternal":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobAsyncClient.getLayout":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobAsyncClient.getLayoutWithResponse":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobAsyncClient.getLayoutWithResponseInternal":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobAsyncClient.getProperties":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobAsyncClient.getPropertiesWithResponse":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobAsyncClient.getPropertiesWithResponseInternal":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobAsyncClient.getTags":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobAsyncClient.getTagsWithResponse":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobAsyncClient.getTagsWithResponseInternal":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobAsyncClient.query":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobAsyncClient.queryWithResponse":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobAsyncClient.queryWithResponseInternal":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobAsyncClient.releaseLease":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobAsyncClient.releaseLeaseWithResponse":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobAsyncClient.releaseLeaseWithResponseInternal":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobAsyncClient.renewLease":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobAsyncClient.renewLeaseWithResponse":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobAsyncClient.renewLeaseWithResponseInternal":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobAsyncClient.setExpiry":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobAsyncClient.setExpiryWithResponse":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobAsyncClient.setExpiryWithResponseInternal":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobAsyncClient.setHttpHeaders":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobAsyncClient.setHttpHeadersWithResponse":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobAsyncClient.setHttpHeadersWithResponseInternal":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobAsyncClient.setImmutabilityPolicy":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.setImmutabilityPolicyWithResponse":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.setImmutabilityPolicyWithResponseInternal":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.setLegalHold":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobAsyncClient.setLegalHoldWithResponse":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobAsyncClient.setLegalHoldWithResponseInternal":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobAsyncClient.setMetadata":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobAsyncClient.setMetadataWithResponse":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobAsyncClient.setMetadataWithResponseInternal":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobAsyncClient.setTags":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobAsyncClient.setTagsWithResponse":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobAsyncClient.setTagsWithResponseInternal":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobAsyncClient.setTier":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobAsyncClient.setTierWithResponse":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobAsyncClient.setTierWithResponseInternal":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobAsyncClient.startCopyFromUrl":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.startCopyFromUrlWithResponse":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.startCopyFromUrlWithResponseInternal":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.undelete":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobAsyncClient.undeleteWithResponse":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobAsyncClient.undeleteWithResponseInternal":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobClient":"Storage.Blob.Blob","com.azure.storage.blob.BlobClient.abortCopyFromUrl":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobClient.abortCopyFromUrlWithResponse":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobClient.abortCopyFromUrlWithResponseInternal":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobClient.acquireLease":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobClient.acquireLeaseWithResponse":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobClient.acquireLeaseWithResponseInternal":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobClient.breakLease":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobClient.breakLeaseWithResponse":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobClient.breakLeaseWithResponseInternal":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobClient.changeLease":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobClient.changeLeaseWithResponse":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobClient.changeLeaseWithResponseInternal":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobClient.copyFromUrl":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobClient.copyFromUrlWithResponse":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobClient.copyFromUrlWithResponseInternal":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobClient.createSnapshot":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobClient.createSnapshotWithResponse":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobClient.createSnapshotWithResponseInternal":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobClient.delete":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobClient.deleteImmutabilityPolicy":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobClient.deleteImmutabilityPolicyWithResponse":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobClient.deleteImmutabilityPolicyWithResponseInternal":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobClient.deleteWithResponse":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobClient.deleteWithResponseInternal":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobClient.download":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobClient.downloadWithResponse":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobClient.downloadWithResponseInternal":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobClient.getAccountInfo":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobClient.getAccountInfoWithResponse":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobClient.getAccountInfoWithResponseInternal":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobClient.getLayout":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobClient.getLayoutWithResponse":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobClient.getLayoutWithResponseInternal":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobClient.getProperties":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobClient.getPropertiesWithResponse":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobClient.getPropertiesWithResponseInternal":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobClient.getTags":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobClient.getTagsWithResponse":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobClient.getTagsWithResponseInternal":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobClient.query":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobClient.queryWithResponse":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobClient.queryWithResponseInternal":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobClient.releaseLease":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobClient.releaseLeaseWithResponse":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobClient.releaseLeaseWithResponseInternal":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobClient.renewLease":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobClient.renewLeaseWithResponse":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobClient.renewLeaseWithResponseInternal":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobClient.setExpiry":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobClient.setExpiryWithResponse":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobClient.setExpiryWithResponseInternal":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobClient.setHttpHeaders":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobClient.setHttpHeadersWithResponse":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobClient.setHttpHeadersWithResponseInternal":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobClient.setImmutabilityPolicy":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobClient.setImmutabilityPolicyWithResponse":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobClient.setImmutabilityPolicyWithResponseInternal":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobClient.setLegalHold":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobClient.setLegalHoldWithResponse":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobClient.setLegalHoldWithResponseInternal":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobClient.setMetadata":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobClient.setMetadataWithResponse":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobClient.setMetadataWithResponseInternal":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobClient.setTags":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobClient.setTagsWithResponse":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobClient.setTagsWithResponseInternal":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobClient.setTier":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobClient.setTierWithResponse":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobClient.setTierWithResponseInternal":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobClient.startCopyFromUrl":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobClient.startCopyFromUrlWithResponse":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobClient.startCopyFromUrlWithResponseInternal":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobClient.undelete":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobClient.undeleteWithResponse":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobClient.undeleteWithResponseInternal":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlockBlobAsyncClient":"Storage.Blob.BlockBlob","com.azure.storage.blob.BlockBlobAsyncClient.commitBlockList":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobAsyncClient.commitBlockListWithResponse":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobAsyncClient.commitBlockListWithResponseInternal":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobAsyncClient.getBlockList":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobAsyncClient.getBlockListWithResponse":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobAsyncClient.getBlockListWithResponseInternal":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobAsyncClient.stageBlock":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromUrl":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromUrlWithResponse":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromUrlWithResponseInternal":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockWithResponse":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockWithResponseInternal":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobAsyncClient.upload":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobAsyncClient.uploadBlobFromUrl":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.uploadBlobFromUrlWithResponse":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.uploadBlobFromUrlWithResponseInternal":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.uploadWithResponse":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobAsyncClient.uploadWithResponseInternal":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobClient":"Storage.Blob.BlockBlob","com.azure.storage.blob.BlockBlobClient.commitBlockList":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobClient.commitBlockListWithResponse":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobClient.commitBlockListWithResponseInternal":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobClient.getBlockList":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobClient.getBlockListWithResponse":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobClient.getBlockListWithResponseInternal":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobClient.stageBlock":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobClient.stageBlockFromUrl":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobClient.stageBlockFromUrlWithResponse":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobClient.stageBlockFromUrlWithResponseInternal":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobClient.stageBlockWithResponse":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobClient.stageBlockWithResponseInternal":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobClient.upload":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobClient.uploadBlobFromUrl":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobClient.uploadBlobFromUrlWithResponse":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobClient.uploadBlobFromUrlWithResponseInternal":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobClient.uploadWithResponse":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobClient.uploadWithResponseInternal":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.ContainerAsyncClient":"Storage.Blob.Container","com.azure.storage.blob.ContainerAsyncClient.acquireLease":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerAsyncClient.acquireLeaseWithResponse":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerAsyncClient.acquireLeaseWithResponseInternal":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerAsyncClient.breakLease":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerAsyncClient.breakLeaseWithResponse":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerAsyncClient.breakLeaseWithResponseInternal":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerAsyncClient.changeLease":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerAsyncClient.changeLeaseWithResponse":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerAsyncClient.changeLeaseWithResponseInternal":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerAsyncClient.create":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerAsyncClient.createSession":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerAsyncClient.createSessionWithResponse":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerAsyncClient.createSessionWithResponseInternal":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerAsyncClient.createWithResponse":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerAsyncClient.createWithResponseInternal":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerAsyncClient.delete":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerAsyncClient.deleteWithResponse":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerAsyncClient.deleteWithResponseInternal":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerAsyncClient.filterBlobs":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerAsyncClient.filterBlobsWithResponse":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerAsyncClient.filterBlobsWithResponseInternal":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerAsyncClient.getAccessPolicy":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.getAccessPolicyWithResponse":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.getAccessPolicyWithResponseInternal":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.getAccountInfo":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerAsyncClient.getAccountInfoWithResponse":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerAsyncClient.getAccountInfoWithResponseInternal":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerAsyncClient.getProperties":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerAsyncClient.getPropertiesWithResponse":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerAsyncClient.getPropertiesWithResponseInternal":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerAsyncClient.listBlobFlatSegment":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerAsyncClient.listBlobFlatSegmentWithResponse":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerAsyncClient.listBlobFlatSegmentWithResponseInternal":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerAsyncClient.listBlobHierarchySegment":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerAsyncClient.listBlobHierarchySegmentWithResponse":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerAsyncClient.listBlobHierarchySegmentWithResponseInternal":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerAsyncClient.releaseLease":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerAsyncClient.releaseLeaseWithResponse":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerAsyncClient.releaseLeaseWithResponseInternal":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerAsyncClient.rename":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerAsyncClient.renameWithResponse":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerAsyncClient.renameWithResponseInternal":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerAsyncClient.renewLease":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerAsyncClient.renewLeaseWithResponse":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerAsyncClient.renewLeaseWithResponseInternal":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerAsyncClient.restore":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerAsyncClient.restoreWithResponse":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerAsyncClient.restoreWithResponseInternal":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerAsyncClient.setAccessPolicy":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.setAccessPolicyWithResponse":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.setAccessPolicyWithResponseInternal":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.setMetadata":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerAsyncClient.setMetadataWithResponse":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerAsyncClient.setMetadataWithResponseInternal":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerClient":"Storage.Blob.Container","com.azure.storage.blob.ContainerClient.acquireLease":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerClient.acquireLeaseWithResponse":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerClient.acquireLeaseWithResponseInternal":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerClient.breakLease":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerClient.breakLeaseWithResponse":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerClient.breakLeaseWithResponseInternal":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerClient.changeLease":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerClient.changeLeaseWithResponse":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerClient.changeLeaseWithResponseInternal":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerClient.create":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerClient.createSession":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerClient.createSessionWithResponse":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerClient.createSessionWithResponseInternal":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerClient.createWithResponse":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerClient.createWithResponseInternal":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerClient.delete":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerClient.deleteWithResponse":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerClient.deleteWithResponseInternal":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerClient.filterBlobs":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerClient.filterBlobsWithResponse":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerClient.filterBlobsWithResponseInternal":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerClient.getAccessPolicy":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerClient.getAccessPolicyWithResponse":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerClient.getAccessPolicyWithResponseInternal":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerClient.getAccountInfo":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerClient.getAccountInfoWithResponse":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerClient.getAccountInfoWithResponseInternal":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerClient.getProperties":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerClient.getPropertiesWithResponse":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerClient.getPropertiesWithResponseInternal":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerClient.listBlobFlatSegment":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerClient.listBlobFlatSegmentWithResponse":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerClient.listBlobFlatSegmentWithResponseInternal":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerClient.listBlobHierarchySegment":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerClient.listBlobHierarchySegmentWithResponse":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerClient.listBlobHierarchySegmentWithResponseInternal":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerClient.releaseLease":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerClient.releaseLeaseWithResponse":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerClient.releaseLeaseWithResponseInternal":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerClient.rename":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerClient.renameWithResponse":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerClient.renameWithResponseInternal":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerClient.renewLease":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerClient.renewLeaseWithResponse":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerClient.renewLeaseWithResponseInternal":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerClient.restore":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerClient.restoreWithResponse":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerClient.restoreWithResponseInternal":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerClient.setAccessPolicy":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerClient.setAccessPolicyWithResponse":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerClient.setAccessPolicyWithResponseInternal":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerClient.setMetadata":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerClient.setMetadataWithResponse":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerClient.setMetadataWithResponseInternal":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.PageBlobAsyncClient":"Storage.Blob.PageBlob","com.azure.storage.blob.PageBlobAsyncClient.clearPages":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobAsyncClient.clearPagesWithResponse":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobAsyncClient.clearPagesWithResponseInternal":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobAsyncClient.copyIncremental":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobAsyncClient.copyIncrementalWithResponse":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobAsyncClient.copyIncrementalWithResponseInternal":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobAsyncClient.create":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobAsyncClient.createWithResponse":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobAsyncClient.createWithResponseInternal":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobAsyncClient.getPageRanges":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiff":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiffWithResponse":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiffWithResponseInternal":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesWithResponse":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesWithResponseInternal":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobAsyncClient.resize":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobAsyncClient.resizeWithResponse":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobAsyncClient.resizeWithResponseInternal":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobAsyncClient.setSequenceNumber":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobAsyncClient.setSequenceNumberWithResponse":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobAsyncClient.setSequenceNumberWithResponseInternal":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobAsyncClient.uploadPages":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromUrl":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromUrlWithResponse":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromUrlWithResponseInternal":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesWithResponse":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesWithResponseInternal":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobClient":"Storage.Blob.PageBlob","com.azure.storage.blob.PageBlobClient.clearPages":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobClient.clearPagesWithResponse":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobClient.clearPagesWithResponseInternal":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobClient.copyIncremental":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobClient.copyIncrementalWithResponse":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobClient.copyIncrementalWithResponseInternal":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobClient.create":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobClient.createWithResponse":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobClient.createWithResponseInternal":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobClient.getPageRanges":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobClient.getPageRangesDiff":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobClient.getPageRangesDiffWithResponse":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobClient.getPageRangesDiffWithResponseInternal":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobClient.getPageRangesWithResponse":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobClient.getPageRangesWithResponseInternal":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobClient.resize":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobClient.resizeWithResponse":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobClient.resizeWithResponseInternal":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobClient.setSequenceNumber":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobClient.setSequenceNumberWithResponse":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobClient.setSequenceNumberWithResponseInternal":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobClient.uploadPages":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobClient.uploadPagesFromUrl":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobClient.uploadPagesFromUrlWithResponse":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobClient.uploadPagesFromUrlWithResponseInternal":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobClient.uploadPagesWithResponse":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobClient.uploadPagesWithResponseInternal":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.ServiceAsyncClient":"Storage.Blob.Service","com.azure.storage.blob.ServiceAsyncClient.filterBlobs":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceAsyncClient.filterBlobsWithResponse":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceAsyncClient.filterBlobsWithResponseInternal":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceAsyncClient.getAccountInfo":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceAsyncClient.getAccountInfoWithResponse":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceAsyncClient.getAccountInfoWithResponseInternal":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceAsyncClient.getProperties":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceAsyncClient.getPropertiesWithResponse":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceAsyncClient.getPropertiesWithResponseInternal":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceAsyncClient.getStatistics":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceAsyncClient.getStatisticsWithResponse":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceAsyncClient.getStatisticsWithResponseInternal":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceAsyncClient.getUserDelegationKey":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceAsyncClient.getUserDelegationKeyWithResponse":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceAsyncClient.getUserDelegationKeyWithResponseInternal":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceAsyncClient.listContainersSegment":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceAsyncClient.listContainersSegmentWithResponse":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceAsyncClient.listContainersSegmentWithResponseInternal":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceAsyncClient.setProperties":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceAsyncClient.setPropertiesWithResponse":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceAsyncClient.setPropertiesWithResponseInternal":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceClient":"Storage.Blob.Service","com.azure.storage.blob.ServiceClient.filterBlobs":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceClient.filterBlobsWithResponse":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceClient.filterBlobsWithResponseInternal":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceClient.getAccountInfo":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceClient.getAccountInfoWithResponse":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceClient.getAccountInfoWithResponseInternal":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceClient.getProperties":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceClient.getPropertiesWithResponse":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceClient.getPropertiesWithResponseInternal":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceClient.getStatistics":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceClient.getStatisticsWithResponse":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceClient.getStatisticsWithResponseInternal":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceClient.getUserDelegationKey":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceClient.getUserDelegationKeyWithResponse":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceClient.getUserDelegationKeyWithResponseInternal":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceClient.listContainersSegment":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceClient.listContainersSegmentWithResponse":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceClient.listContainersSegmentWithResponseInternal":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceClient.setProperties":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceClient.setPropertiesWithResponse":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceClient.setPropertiesWithResponseInternal":"Storage.Blob.Service.setProperties","com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockHeaders":null,"com.azure.storage.blob.implementation.models.AppendBlobsCreateHeaders":null,"com.azure.storage.blob.implementation.models.AppendBlobsSealHeaders":null,"com.azure.storage.blob.implementation.models.ArrowFieldInternal":"Storage.Blob.ArrowField","com.azure.storage.blob.implementation.models.ArrowTextConfigurationInternal":"Storage.Blob.ArrowConfiguration","com.azure.storage.blob.implementation.models.AuthenticationType":"Storage.Blob.AuthenticationType","com.azure.storage.blob.implementation.models.BlobContainersSegment":"Storage.Blob.ListContainersResponse","com.azure.storage.blob.implementation.models.BlobCopySourceTags":"Storage.Blob.BlobCopySourceTags","com.azure.storage.blob.implementation.models.BlobDeleteType":"Storage.Blob.BlobDeleteType","com.azure.storage.blob.implementation.models.BlobExpiryOptions":"Storage.Blob.BlobExpiryOptions","com.azure.storage.blob.implementation.models.BlobHierarchyListSegment":"Customizations.BlobHierarchyListSegmentJava","com.azure.storage.blob.implementation.models.BlobItemInternal":"Storage.Blob.BlobItem","com.azure.storage.blob.implementation.models.BlobItemPropertiesInternal":"Storage.Blob.BlobProperties","com.azure.storage.blob.implementation.models.BlobLayoutEndpoints":"Storage.Blob.BlobLayoutEndpoints","com.azure.storage.blob.implementation.models.BlobLayoutEndpointsEndpointItem":"Storage.Blob.BlobLayoutEndpoint","com.azure.storage.blob.implementation.models.BlobLayoutInternal":"Storage.Blob.BlobLayout","com.azure.storage.blob.implementation.models.BlobLayoutRanges":"Storage.Blob.BlobLayoutRanges","com.azure.storage.blob.implementation.models.BlobLayoutRangesRangeItem":"Storage.Blob.BlobLayoutRange","com.azure.storage.blob.implementation.models.BlobName":"Storage.Blob.BlobName","com.azure.storage.blob.implementation.models.BlobPrefixInternal":"Storage.Blob.BlobPrefix","com.azure.storage.blob.implementation.models.BlobSignedIdentifiers":"Storage.Blob.SignedIdentifiers","com.azure.storage.blob.implementation.models.BlobStorageError":"Customizations.BlobStorageError","com.azure.storage.blob.implementation.models.BlobTag":"Storage.Blob.BlobTag","com.azure.storage.blob.implementation.models.BlobTags":"Storage.Blob.BlobTags","com.azure.storage.blob.implementation.models.BlobsAbortCopyFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlobsAcquireLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsBreakLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsChangeLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsCopyFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlobsCreateSnapshotHeaders":null,"com.azure.storage.blob.implementation.models.BlobsDeleteHeaders":null,"com.azure.storage.blob.implementation.models.BlobsDeleteImmutabilityPolicyHeaders":null,"com.azure.storage.blob.implementation.models.BlobsDownloadHeaders":null,"com.azure.storage.blob.implementation.models.BlobsGetAccountInfoHeaders":null,"com.azure.storage.blob.implementation.models.BlobsGetLayoutHeaders":null,"com.azure.storage.blob.implementation.models.BlobsGetPropertiesHeaders":null,"com.azure.storage.blob.implementation.models.BlobsGetTagsHeaders":null,"com.azure.storage.blob.implementation.models.BlobsQueryHeaders":null,"com.azure.storage.blob.implementation.models.BlobsReleaseLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsRenewLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetExpiryHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetHttpHeadersHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetImmutabilityPolicyHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetLegalHoldHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetMetadataHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetTagsHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetTierHeaders":null,"com.azure.storage.blob.implementation.models.BlobsStartCopyFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlobsUndeleteHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsCommitBlockListHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsGetBlockListHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsStageBlockFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsStageBlockHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsUploadBlobFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsUploadHeaders":null,"com.azure.storage.blob.implementation.models.ContainersAcquireLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersBreakLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersChangeLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersCreateHeaders":null,"com.azure.storage.blob.implementation.models.ContainersCreateSessionHeaders":null,"com.azure.storage.blob.implementation.models.ContainersDeleteHeaders":null,"com.azure.storage.blob.implementation.models.ContainersFilterBlobsHeaders":null,"com.azure.storage.blob.implementation.models.ContainersGetAccessPolicyHeaders":null,"com.azure.storage.blob.implementation.models.ContainersGetAccountInfoHeaders":null,"com.azure.storage.blob.implementation.models.ContainersGetPropertiesHeaders":null,"com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentHeaders":null,"com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentHeaders":null,"com.azure.storage.blob.implementation.models.ContainersReleaseLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersRenameHeaders":null,"com.azure.storage.blob.implementation.models.ContainersRenewLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersRestoreHeaders":null,"com.azure.storage.blob.implementation.models.ContainersSetAccessPolicyHeaders":null,"com.azure.storage.blob.implementation.models.ContainersSetMetadataHeaders":null,"com.azure.storage.blob.implementation.models.CreateSessionConfiguration":"Storage.Blob.CreateSessionConfiguration","com.azure.storage.blob.implementation.models.CreateSessionResponse":"Storage.Blob.CreateSessionResponse","com.azure.storage.blob.implementation.models.DelimitedTextConfiguration":"Storage.Blob.DelimitedTextConfiguration","com.azure.storage.blob.implementation.models.DownloadHint":"Storage.Blob.DownloadHint","com.azure.storage.blob.implementation.models.FilterBlobItem":"Storage.Blob.FilterBlobItem","com.azure.storage.blob.implementation.models.FilterBlobSegment":"Storage.Blob.FilteredBlobResponse","com.azure.storage.blob.implementation.models.FilterBlobsIncludeItem":"Storage.Blob.FilterBlobsIncludeItem","com.azure.storage.blob.implementation.models.JsonTextConfigurationInternal":"Storage.Blob.JsonTextConfiguration","com.azure.storage.blob.implementation.models.ListBlobsFlatSegmentResponse":"Storage.Blob.ListBlobsResponse","com.azure.storage.blob.implementation.models.ListBlobsHierarchySegmentResponse":"Storage.Blob.ListBlobsHierarchicalResponse","com.azure.storage.blob.implementation.models.PageBlobsClearPagesHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsCopyIncrementalHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsCreateHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesDiffHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsResizeHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsSetSequenceNumberHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsUploadPagesFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsUploadPagesHeaders":null,"com.azure.storage.blob.implementation.models.ParquetTextConfiguration":"Customizations.StorageCppParquetConfiguration","com.azure.storage.blob.implementation.models.PremiumPageBlobAccessTier":"Storage.Blob.PremiumPageBlobAccessTier","com.azure.storage.blob.implementation.models.QueryFormat":"Storage.Blob.QueryFormat","com.azure.storage.blob.implementation.models.QueryFormatType":"Storage.Blob.QueryType","com.azure.storage.blob.implementation.models.QueryRequest":"Storage.Blob.QueryRequest","com.azure.storage.blob.implementation.models.QueryRequestType":"Storage.Blob.QueryRequestType","com.azure.storage.blob.implementation.models.QuerySerialization":"Storage.Blob.QuerySerialization","com.azure.storage.blob.implementation.models.ServicesFilterBlobsHeaders":null,"com.azure.storage.blob.implementation.models.ServicesGetAccountInfoHeaders":null,"com.azure.storage.blob.implementation.models.ServicesGetPropertiesHeaders":null,"com.azure.storage.blob.implementation.models.ServicesGetStatisticsHeaders":null,"com.azure.storage.blob.implementation.models.ServicesGetUserDelegationKeyHeaders":null,"com.azure.storage.blob.implementation.models.ServicesListContainersSegmentHeaders":null,"com.azure.storage.blob.implementation.models.ServicesSetPropertiesHeaders":null,"com.azure.storage.blob.implementation.models.SessionCredentials":"Storage.Blob.SessionCredentials","com.azure.storage.blob.models.AccessTier":"Storage.Blob.AccessTier","com.azure.storage.blob.models.AccountKind":"Storage.Blob.AccountKind","com.azure.storage.blob.models.ArchiveStatus":"Storage.Blob.ArchiveStatus","com.azure.storage.blob.models.BlobAccessPolicy":"Storage.Blob.AccessPolicy","com.azure.storage.blob.models.BlobAnalyticsLogging":"Storage.Blob.Logging","com.azure.storage.blob.models.BlobContainerItem":"Storage.Blob.ContainerItem","com.azure.storage.blob.models.BlobContainerItemProperties":"Storage.Blob.ContainerProperties","com.azure.storage.blob.models.BlobCorsRule":"Storage.Blob.CorsRule","com.azure.storage.blob.models.BlobErrorCode":"Storage.Blob.StorageErrorCode","com.azure.storage.blob.models.BlobImmutabilityPolicyMode":"Customizations.BlobImmutabilityPolicyModeJava","com.azure.storage.blob.models.BlobMetrics":"Storage.Blob.Metrics","com.azure.storage.blob.models.BlobRetentionPolicy":"Storage.Blob.RetentionPolicy","com.azure.storage.blob.models.BlobServiceProperties":"Storage.Blob.BlobServiceProperties","com.azure.storage.blob.models.BlobServiceStatistics":"Storage.Blob.StorageServiceStats","com.azure.storage.blob.models.BlobSignedIdentifier":"Storage.Blob.SignedIdentifier","com.azure.storage.blob.models.BlobType":"Storage.Blob.BlobType","com.azure.storage.blob.models.Block":"Storage.Blob.Block","com.azure.storage.blob.models.BlockList":"Storage.Blob.BlockList","com.azure.storage.blob.models.BlockListType":"Storage.Blob.BlockListType","com.azure.storage.blob.models.BlockLookupList":"Storage.Blob.BlockLookupList","com.azure.storage.blob.models.ClearRange":"Storage.Blob.ClearRange","com.azure.storage.blob.models.CopyStatusType":"Storage.Blob.CopyStatus","com.azure.storage.blob.models.DeleteSnapshotsOptionType":"Storage.Blob.DeleteSnapshotsOptionType","com.azure.storage.blob.models.EncryptionAlgorithmType":"Storage.Blob.EncryptionAlgorithmType","com.azure.storage.blob.models.FileShareTokenIntent":"Storage.Blob.FileShareTokenIntent","com.azure.storage.blob.models.GeoReplication":"Storage.Blob.GeoReplication","com.azure.storage.blob.models.GeoReplicationStatus":"Storage.Blob.GeoReplicationStatusType","com.azure.storage.blob.models.KeyInfo":"Storage.Blob.KeyInfo","com.azure.storage.blob.models.LeaseDurationType":"Storage.Blob.LeaseDuration","com.azure.storage.blob.models.LeaseStateType":"Storage.Blob.LeaseState","com.azure.storage.blob.models.LeaseStatusType":"Storage.Blob.LeaseStatus","com.azure.storage.blob.models.ListBlobContainersIncludeType":"Storage.Blob.ListContainersIncludeType","com.azure.storage.blob.models.ListBlobsIncludeItem":"Storage.Blob.ListBlobsIncludeItem","com.azure.storage.blob.models.PageList":"Storage.Blob.PageList","com.azure.storage.blob.models.PageRange":"Storage.Blob.PageRange","com.azure.storage.blob.models.PublicAccessType":"Storage.Blob.PublicAccessType","com.azure.storage.blob.models.RehydratePriority":"Storage.Blob.RehydratePriority","com.azure.storage.blob.models.SequenceNumberActionType":"Storage.Blob.SequenceNumberActionType","com.azure.storage.blob.models.SkuName":"Storage.Blob.SkuName","com.azure.storage.blob.models.StaticWebsite":"Storage.Blob.StaticWebsite","com.azure.storage.blob.models.UserDelegationKey":"Storage.Blob.UserDelegationKey"},"generatedFiles":["src/main/java/com/azure/storage/blob/AppendBlobAsyncClient.java","src/main/java/com/azure/storage/blob/AppendBlobClient.java","src/main/java/com/azure/storage/blob/AzureBlobStorageBuilder.java","src/main/java/com/azure/storage/blob/BlobAsyncClient.java","src/main/java/com/azure/storage/blob/BlobClient.java","src/main/java/com/azure/storage/blob/BlobServiceVersion.java","src/main/java/com/azure/storage/blob/BlockBlobAsyncClient.java","src/main/java/com/azure/storage/blob/BlockBlobClient.java","src/main/java/com/azure/storage/blob/ContainerAsyncClient.java","src/main/java/com/azure/storage/blob/ContainerClient.java","src/main/java/com/azure/storage/blob/PageBlobAsyncClient.java","src/main/java/com/azure/storage/blob/PageBlobClient.java","src/main/java/com/azure/storage/blob/ServiceAsyncClient.java","src/main/java/com/azure/storage/blob/ServiceClient.java","src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java","src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java","src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java","src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java","src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java","src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java","src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java","src/main/java/com/azure/storage/blob/implementation/XmlSerializer.java","src/main/java/com/azure/storage/blob/implementation/XmlSerializerProviders.java","src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsCreateHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsSealHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ArrowFieldInternal.java","src/main/java/com/azure/storage/blob/implementation/models/ArrowTextConfigurationInternal.java","src/main/java/com/azure/storage/blob/implementation/models/AuthenticationType.java","src/main/java/com/azure/storage/blob/implementation/models/BlobContainersSegment.java","src/main/java/com/azure/storage/blob/implementation/models/BlobCopySourceTags.java","src/main/java/com/azure/storage/blob/implementation/models/BlobDeleteType.java","src/main/java/com/azure/storage/blob/implementation/models/BlobExpiryOptions.java","src/main/java/com/azure/storage/blob/implementation/models/BlobHierarchyListSegment.java","src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java","src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutEndpoints.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutEndpointsEndpointItem.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutInternal.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutRanges.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutRangesRangeItem.java","src/main/java/com/azure/storage/blob/implementation/models/BlobName.java","src/main/java/com/azure/storage/blob/implementation/models/BlobPrefixInternal.java","src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifiers.java","src/main/java/com/azure/storage/blob/implementation/models/BlobStorageError.java","src/main/java/com/azure/storage/blob/implementation/models/BlobStorageErrorException.java","src/main/java/com/azure/storage/blob/implementation/models/BlobTag.java","src/main/java/com/azure/storage/blob/implementation/models/BlobTags.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsAbortCopyFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsAcquireLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsBreakLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsChangeLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsCopyFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsCreateSnapshotHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteImmutabilityPolicyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsDownloadHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccountInfoHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsGetLayoutHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsGetTagsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsQueryHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsReleaseLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsRenewLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetExpiryHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetHttpHeadersHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetLegalHoldHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetMetadataHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTagsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTierHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsStartCopyFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsUndeleteHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsCommitBlockListHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsGetBlockListHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadBlobFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersAcquireLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersBreakLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersChangeLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateSessionHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersDeleteHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersFilterBlobsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccessPolicyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccountInfoHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersGetPropertiesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersReleaseLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersRenameHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersRenewLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersRestoreHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersSetAccessPolicyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersSetMetadataHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/CreateSessionConfiguration.java","src/main/java/com/azure/storage/blob/implementation/models/CreateSessionResponse.java","src/main/java/com/azure/storage/blob/implementation/models/DelimitedTextConfiguration.java","src/main/java/com/azure/storage/blob/implementation/models/DownloadHint.java","src/main/java/com/azure/storage/blob/implementation/models/FilterBlobItem.java","src/main/java/com/azure/storage/blob/implementation/models/FilterBlobSegment.java","src/main/java/com/azure/storage/blob/implementation/models/FilterBlobsIncludeItem.java","src/main/java/com/azure/storage/blob/implementation/models/JsonTextConfigurationInternal.java","src/main/java/com/azure/storage/blob/implementation/models/ListBlobsFlatSegmentResponse.java","src/main/java/com/azure/storage/blob/implementation/models/ListBlobsHierarchySegmentResponse.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsClearPagesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCopyIncrementalHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCreateHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsResizeHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsSetSequenceNumberHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ParquetTextConfiguration.java","src/main/java/com/azure/storage/blob/implementation/models/PremiumPageBlobAccessTier.java","src/main/java/com/azure/storage/blob/implementation/models/QueryFormat.java","src/main/java/com/azure/storage/blob/implementation/models/QueryFormatType.java","src/main/java/com/azure/storage/blob/implementation/models/QueryRequest.java","src/main/java/com/azure/storage/blob/implementation/models/QueryRequestType.java","src/main/java/com/azure/storage/blob/implementation/models/QuerySerialization.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesFilterBlobsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesGetAccountInfoHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesGetPropertiesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesGetStatisticsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesGetUserDelegationKeyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesListContainersSegmentHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesSetPropertiesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/SessionCredentials.java","src/main/java/com/azure/storage/blob/implementation/models/package-info.java","src/main/java/com/azure/storage/blob/implementation/package-info.java","src/main/java/com/azure/storage/blob/models/AccessTier.java","src/main/java/com/azure/storage/blob/models/AccountKind.java","src/main/java/com/azure/storage/blob/models/ArchiveStatus.java","src/main/java/com/azure/storage/blob/models/BlobAccessPolicy.java","src/main/java/com/azure/storage/blob/models/BlobAnalyticsLogging.java","src/main/java/com/azure/storage/blob/models/BlobContainerItem.java","src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java","src/main/java/com/azure/storage/blob/models/BlobCorsRule.java","src/main/java/com/azure/storage/blob/models/BlobErrorCode.java","src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicyMode.java","src/main/java/com/azure/storage/blob/models/BlobMetrics.java","src/main/java/com/azure/storage/blob/models/BlobRetentionPolicy.java","src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java","src/main/java/com/azure/storage/blob/models/BlobServiceStatistics.java","src/main/java/com/azure/storage/blob/models/BlobSignedIdentifier.java","src/main/java/com/azure/storage/blob/models/BlobType.java","src/main/java/com/azure/storage/blob/models/Block.java","src/main/java/com/azure/storage/blob/models/BlockList.java","src/main/java/com/azure/storage/blob/models/BlockListType.java","src/main/java/com/azure/storage/blob/models/BlockLookupList.java","src/main/java/com/azure/storage/blob/models/ClearRange.java","src/main/java/com/azure/storage/blob/models/CopyStatusType.java","src/main/java/com/azure/storage/blob/models/DeleteSnapshotsOptionType.java","src/main/java/com/azure/storage/blob/models/EncryptionAlgorithmType.java","src/main/java/com/azure/storage/blob/models/FileShareTokenIntent.java","src/main/java/com/azure/storage/blob/models/GeoReplication.java","src/main/java/com/azure/storage/blob/models/GeoReplicationStatus.java","src/main/java/com/azure/storage/blob/models/KeyInfo.java","src/main/java/com/azure/storage/blob/models/LeaseDurationType.java","src/main/java/com/azure/storage/blob/models/LeaseStateType.java","src/main/java/com/azure/storage/blob/models/LeaseStatusType.java","src/main/java/com/azure/storage/blob/models/ListBlobContainersIncludeType.java","src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java","src/main/java/com/azure/storage/blob/models/PageList.java","src/main/java/com/azure/storage/blob/models/PageRange.java","src/main/java/com/azure/storage/blob/models/PublicAccessType.java","src/main/java/com/azure/storage/blob/models/RehydratePriority.java","src/main/java/com/azure/storage/blob/models/SequenceNumberActionType.java","src/main/java/com/azure/storage/blob/models/SkuName.java","src/main/java/com/azure/storage/blob/models/StaticWebsite.java","src/main/java/com/azure/storage/blob/models/UserDelegationKey.java","src/main/java/com/azure/storage/blob/models/package-info.java","src/main/java/com/azure/storage/blob/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Storage.Blob":"2027-03-07"},"crossLanguagePackageId":"Storage.Blob","crossLanguageVersion":"3c3332d0864e","crossLanguageDefinitions":{"com.azure.storage.blob.AppendBlobAsyncClient":"Storage.Blob.AppendBlob","com.azure.storage.blob.AppendBlobAsyncClient.appendBlock":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrl":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrlWithResponse":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockFromUrlWithResponseInternal":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockWithResponse":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobAsyncClient.appendBlockWithResponseInternal":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobAsyncClient.create":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobAsyncClient.createWithResponse":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobAsyncClient.createWithResponseInternal":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobAsyncClient.seal":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobAsyncClient.sealWithResponse":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobAsyncClient.sealWithResponseInternal":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobClient":"Storage.Blob.AppendBlob","com.azure.storage.blob.AppendBlobClient.appendBlock":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobClient.appendBlockFromUrl":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobClient.appendBlockFromUrlWithResponse":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobClient.appendBlockFromUrlWithResponseInternal":"Storage.Blob.AppendBlob.appendBlockFromUrl","com.azure.storage.blob.AppendBlobClient.appendBlockWithResponse":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobClient.appendBlockWithResponseInternal":"Storage.Blob.AppendBlob.appendBlock","com.azure.storage.blob.AppendBlobClient.create":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobClient.createWithResponse":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobClient.createWithResponseInternal":"Storage.Blob.AppendBlob.create","com.azure.storage.blob.AppendBlobClient.seal":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobClient.sealWithResponse":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AppendBlobClient.sealWithResponseInternal":"Storage.Blob.AppendBlob.seal","com.azure.storage.blob.AzureBlobStorageBuilder":"Storage.Blob","com.azure.storage.blob.BlobAsyncClient":"Storage.Blob.Blob","com.azure.storage.blob.BlobAsyncClient.abortCopyFromUrl":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.abortCopyFromUrlWithResponse":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.abortCopyFromUrlWithResponseInternal":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.acquireLease":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobAsyncClient.acquireLeaseWithResponse":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobAsyncClient.acquireLeaseWithResponseInternal":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobAsyncClient.breakLease":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobAsyncClient.breakLeaseWithResponse":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobAsyncClient.breakLeaseWithResponseInternal":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobAsyncClient.changeLease":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobAsyncClient.changeLeaseWithResponse":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobAsyncClient.changeLeaseWithResponseInternal":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobAsyncClient.copyFromUrl":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobAsyncClient.copyFromUrlWithResponse":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobAsyncClient.copyFromUrlWithResponseInternal":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobAsyncClient.createSnapshot":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobAsyncClient.createSnapshotWithResponse":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobAsyncClient.createSnapshotWithResponseInternal":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobAsyncClient.delete":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobAsyncClient.deleteImmutabilityPolicy":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.deleteImmutabilityPolicyWithResponse":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.deleteImmutabilityPolicyWithResponseInternal":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.deleteWithResponse":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobAsyncClient.deleteWithResponseInternal":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobAsyncClient.download":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobAsyncClient.downloadWithResponse":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobAsyncClient.downloadWithResponseInternal":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobAsyncClient.getAccountInfo":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobAsyncClient.getAccountInfoWithResponse":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobAsyncClient.getAccountInfoWithResponseInternal":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobAsyncClient.getLayout":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobAsyncClient.getLayoutWithResponse":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobAsyncClient.getLayoutWithResponseInternal":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobAsyncClient.getProperties":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobAsyncClient.getPropertiesWithResponse":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobAsyncClient.getPropertiesWithResponseInternal":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobAsyncClient.getTags":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobAsyncClient.getTagsWithResponse":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobAsyncClient.getTagsWithResponseInternal":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobAsyncClient.query":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobAsyncClient.queryWithResponse":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobAsyncClient.queryWithResponseInternal":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobAsyncClient.releaseLease":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobAsyncClient.releaseLeaseWithResponse":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobAsyncClient.releaseLeaseWithResponseInternal":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobAsyncClient.renewLease":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobAsyncClient.renewLeaseWithResponse":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobAsyncClient.renewLeaseWithResponseInternal":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobAsyncClient.setExpiry":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobAsyncClient.setExpiryWithResponse":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobAsyncClient.setExpiryWithResponseInternal":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobAsyncClient.setHttpHeaders":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobAsyncClient.setHttpHeadersWithResponse":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobAsyncClient.setHttpHeadersWithResponseInternal":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobAsyncClient.setImmutabilityPolicy":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.setImmutabilityPolicyWithResponse":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.setImmutabilityPolicyWithResponseInternal":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobAsyncClient.setLegalHold":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobAsyncClient.setLegalHoldWithResponse":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobAsyncClient.setLegalHoldWithResponseInternal":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobAsyncClient.setMetadata":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobAsyncClient.setMetadataWithResponse":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobAsyncClient.setMetadataWithResponseInternal":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobAsyncClient.setTags":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobAsyncClient.setTagsWithResponse":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobAsyncClient.setTagsWithResponseInternal":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobAsyncClient.setTier":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobAsyncClient.setTierWithResponse":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobAsyncClient.setTierWithResponseInternal":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobAsyncClient.startCopyFromUrl":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.startCopyFromUrlWithResponse":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.startCopyFromUrlWithResponseInternal":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobAsyncClient.undelete":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobAsyncClient.undeleteWithResponse":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobAsyncClient.undeleteWithResponseInternal":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobClient":"Storage.Blob.Blob","com.azure.storage.blob.BlobClient.abortCopyFromUrl":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobClient.abortCopyFromUrlWithResponse":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobClient.abortCopyFromUrlWithResponseInternal":"Storage.Blob.Blob.abortCopyFromUrl","com.azure.storage.blob.BlobClient.acquireLease":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobClient.acquireLeaseWithResponse":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobClient.acquireLeaseWithResponseInternal":"Storage.Blob.Blob.acquireLease","com.azure.storage.blob.BlobClient.breakLease":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobClient.breakLeaseWithResponse":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobClient.breakLeaseWithResponseInternal":"Storage.Blob.Blob.breakLease","com.azure.storage.blob.BlobClient.changeLease":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobClient.changeLeaseWithResponse":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobClient.changeLeaseWithResponseInternal":"Storage.Blob.Blob.changeLease","com.azure.storage.blob.BlobClient.copyFromUrl":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobClient.copyFromUrlWithResponse":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobClient.copyFromUrlWithResponseInternal":"Storage.Blob.Blob.copyFromUrl","com.azure.storage.blob.BlobClient.createSnapshot":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobClient.createSnapshotWithResponse":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobClient.createSnapshotWithResponseInternal":"Storage.Blob.Blob.createSnapshot","com.azure.storage.blob.BlobClient.delete":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobClient.deleteImmutabilityPolicy":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobClient.deleteImmutabilityPolicyWithResponse":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobClient.deleteImmutabilityPolicyWithResponseInternal":"Storage.Blob.Blob.deleteImmutabilityPolicy","com.azure.storage.blob.BlobClient.deleteWithResponse":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobClient.deleteWithResponseInternal":"Storage.Blob.Blob.delete","com.azure.storage.blob.BlobClient.download":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobClient.downloadWithResponse":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobClient.downloadWithResponseInternal":"Storage.Blob.Blob.download","com.azure.storage.blob.BlobClient.getAccountInfo":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobClient.getAccountInfoWithResponse":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobClient.getAccountInfoWithResponseInternal":"Storage.Blob.Blob.getAccountInfo","com.azure.storage.blob.BlobClient.getLayout":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobClient.getLayoutWithResponse":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobClient.getLayoutWithResponseInternal":"Storage.Blob.Blob.getLayout","com.azure.storage.blob.BlobClient.getProperties":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobClient.getPropertiesWithResponse":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobClient.getPropertiesWithResponseInternal":"Storage.Blob.Blob.getProperties","com.azure.storage.blob.BlobClient.getTags":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobClient.getTagsWithResponse":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobClient.getTagsWithResponseInternal":"Storage.Blob.Blob.getTags","com.azure.storage.blob.BlobClient.query":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobClient.queryWithResponse":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobClient.queryWithResponseInternal":"Storage.Blob.BlockBlob.query","com.azure.storage.blob.BlobClient.releaseLease":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobClient.releaseLeaseWithResponse":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobClient.releaseLeaseWithResponseInternal":"Storage.Blob.Blob.releaseLease","com.azure.storage.blob.BlobClient.renewLease":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobClient.renewLeaseWithResponse":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobClient.renewLeaseWithResponseInternal":"Storage.Blob.Blob.renewLease","com.azure.storage.blob.BlobClient.setExpiry":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobClient.setExpiryWithResponse":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobClient.setExpiryWithResponseInternal":"Storage.Blob.Blob.setExpiry","com.azure.storage.blob.BlobClient.setHttpHeaders":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobClient.setHttpHeadersWithResponse":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobClient.setHttpHeadersWithResponseInternal":"Storage.Blob.Blob.setProperties","com.azure.storage.blob.BlobClient.setImmutabilityPolicy":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobClient.setImmutabilityPolicyWithResponse":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobClient.setImmutabilityPolicyWithResponseInternal":"Storage.Blob.Blob.setImmutabilityPolicy","com.azure.storage.blob.BlobClient.setLegalHold":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobClient.setLegalHoldWithResponse":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobClient.setLegalHoldWithResponseInternal":"Storage.Blob.Blob.setLegalHold","com.azure.storage.blob.BlobClient.setMetadata":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobClient.setMetadataWithResponse":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobClient.setMetadataWithResponseInternal":"Storage.Blob.Blob.setMetadata","com.azure.storage.blob.BlobClient.setTags":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobClient.setTagsWithResponse":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobClient.setTagsWithResponseInternal":"Storage.Blob.Blob.setTags","com.azure.storage.blob.BlobClient.setTier":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobClient.setTierWithResponse":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobClient.setTierWithResponseInternal":"Storage.Blob.Blob.setTier","com.azure.storage.blob.BlobClient.startCopyFromUrl":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobClient.startCopyFromUrlWithResponse":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobClient.startCopyFromUrlWithResponseInternal":"Storage.Blob.Blob.startCopyFromUrl","com.azure.storage.blob.BlobClient.undelete":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobClient.undeleteWithResponse":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlobClient.undeleteWithResponseInternal":"Storage.Blob.Blob.undelete","com.azure.storage.blob.BlockBlobAsyncClient":"Storage.Blob.BlockBlob","com.azure.storage.blob.BlockBlobAsyncClient.commitBlockList":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobAsyncClient.commitBlockListWithResponse":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobAsyncClient.commitBlockListWithResponseInternal":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobAsyncClient.getBlockList":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobAsyncClient.getBlockListWithResponse":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobAsyncClient.getBlockListWithResponseInternal":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobAsyncClient.stageBlock":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromUrl":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromUrlWithResponse":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockFromUrlWithResponseInternal":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockWithResponse":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobAsyncClient.stageBlockWithResponseInternal":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobAsyncClient.upload":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobAsyncClient.uploadBlobFromUrl":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.uploadBlobFromUrlWithResponse":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.uploadBlobFromUrlWithResponseInternal":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobAsyncClient.uploadWithResponse":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobAsyncClient.uploadWithResponseInternal":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobClient":"Storage.Blob.BlockBlob","com.azure.storage.blob.BlockBlobClient.commitBlockList":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobClient.commitBlockListWithResponse":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobClient.commitBlockListWithResponseInternal":"Storage.Blob.BlockBlob.commitBlockList","com.azure.storage.blob.BlockBlobClient.getBlockList":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobClient.getBlockListWithResponse":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobClient.getBlockListWithResponseInternal":"Storage.Blob.BlockBlob.getBlockList","com.azure.storage.blob.BlockBlobClient.stageBlock":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobClient.stageBlockFromUrl":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobClient.stageBlockFromUrlWithResponse":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobClient.stageBlockFromUrlWithResponseInternal":"Storage.Blob.BlockBlob.stageBlockFromUrl","com.azure.storage.blob.BlockBlobClient.stageBlockWithResponse":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobClient.stageBlockWithResponseInternal":"Storage.Blob.BlockBlob.stageBlock","com.azure.storage.blob.BlockBlobClient.upload":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobClient.uploadBlobFromUrl":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobClient.uploadBlobFromUrlWithResponse":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobClient.uploadBlobFromUrlWithResponseInternal":"Storage.Blob.BlockBlob.uploadBlobFromUrl","com.azure.storage.blob.BlockBlobClient.uploadWithResponse":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.BlockBlobClient.uploadWithResponseInternal":"Storage.Blob.BlockBlob.upload","com.azure.storage.blob.ContainerAsyncClient":"Storage.Blob.Container","com.azure.storage.blob.ContainerAsyncClient.acquireLease":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerAsyncClient.acquireLeaseWithResponse":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerAsyncClient.acquireLeaseWithResponseInternal":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerAsyncClient.breakLease":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerAsyncClient.breakLeaseWithResponse":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerAsyncClient.breakLeaseWithResponseInternal":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerAsyncClient.changeLease":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerAsyncClient.changeLeaseWithResponse":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerAsyncClient.changeLeaseWithResponseInternal":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerAsyncClient.create":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerAsyncClient.createSession":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerAsyncClient.createSessionWithResponse":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerAsyncClient.createSessionWithResponseInternal":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerAsyncClient.createWithResponse":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerAsyncClient.createWithResponseInternal":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerAsyncClient.delete":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerAsyncClient.deleteWithResponse":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerAsyncClient.deleteWithResponseInternal":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerAsyncClient.filterBlobs":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerAsyncClient.filterBlobsWithResponse":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerAsyncClient.filterBlobsWithResponseInternal":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerAsyncClient.getAccessPolicy":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.getAccessPolicyWithResponse":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.getAccessPolicyWithResponseInternal":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.getAccountInfo":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerAsyncClient.getAccountInfoWithResponse":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerAsyncClient.getAccountInfoWithResponseInternal":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerAsyncClient.getProperties":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerAsyncClient.getPropertiesWithResponse":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerAsyncClient.getPropertiesWithResponseInternal":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerAsyncClient.listBlobFlatSegment":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerAsyncClient.listBlobFlatSegmentWithResponse":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerAsyncClient.listBlobFlatSegmentWithResponseInternal":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerAsyncClient.listBlobHierarchySegment":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerAsyncClient.listBlobHierarchySegmentWithResponse":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerAsyncClient.listBlobHierarchySegmentWithResponseInternal":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerAsyncClient.releaseLease":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerAsyncClient.releaseLeaseWithResponse":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerAsyncClient.releaseLeaseWithResponseInternal":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerAsyncClient.rename":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerAsyncClient.renameWithResponse":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerAsyncClient.renameWithResponseInternal":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerAsyncClient.renewLease":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerAsyncClient.renewLeaseWithResponse":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerAsyncClient.renewLeaseWithResponseInternal":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerAsyncClient.restore":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerAsyncClient.restoreWithResponse":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerAsyncClient.restoreWithResponseInternal":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerAsyncClient.setAccessPolicy":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.setAccessPolicyWithResponse":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.setAccessPolicyWithResponseInternal":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerAsyncClient.setMetadata":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerAsyncClient.setMetadataWithResponse":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerAsyncClient.setMetadataWithResponseInternal":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerClient":"Storage.Blob.Container","com.azure.storage.blob.ContainerClient.acquireLease":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerClient.acquireLeaseWithResponse":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerClient.acquireLeaseWithResponseInternal":"Storage.Blob.Container.acquireLease","com.azure.storage.blob.ContainerClient.breakLease":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerClient.breakLeaseWithResponse":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerClient.breakLeaseWithResponseInternal":"Storage.Blob.Container.breakLease","com.azure.storage.blob.ContainerClient.changeLease":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerClient.changeLeaseWithResponse":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerClient.changeLeaseWithResponseInternal":"Storage.Blob.Container.changeLease","com.azure.storage.blob.ContainerClient.create":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerClient.createSession":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerClient.createSessionWithResponse":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerClient.createSessionWithResponseInternal":"Storage.Blob.Container.createSession","com.azure.storage.blob.ContainerClient.createWithResponse":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerClient.createWithResponseInternal":"Storage.Blob.Container.create","com.azure.storage.blob.ContainerClient.delete":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerClient.deleteWithResponse":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerClient.deleteWithResponseInternal":"Storage.Blob.Container.delete","com.azure.storage.blob.ContainerClient.filterBlobs":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerClient.filterBlobsWithResponse":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerClient.filterBlobsWithResponseInternal":"Storage.Blob.Container.findBlobsByTags","com.azure.storage.blob.ContainerClient.getAccessPolicy":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerClient.getAccessPolicyWithResponse":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerClient.getAccessPolicyWithResponseInternal":"Storage.Blob.Container.getAccessPolicy","com.azure.storage.blob.ContainerClient.getAccountInfo":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerClient.getAccountInfoWithResponse":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerClient.getAccountInfoWithResponseInternal":"Storage.Blob.Container.getAccountInfo","com.azure.storage.blob.ContainerClient.getProperties":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerClient.getPropertiesWithResponse":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerClient.getPropertiesWithResponseInternal":"Storage.Blob.Container.getProperties","com.azure.storage.blob.ContainerClient.listBlobFlatSegment":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerClient.listBlobFlatSegmentWithResponse":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerClient.listBlobFlatSegmentWithResponseInternal":"Storage.Blob.Container.listBlobs","com.azure.storage.blob.ContainerClient.listBlobHierarchySegment":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerClient.listBlobHierarchySegmentWithResponse":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerClient.listBlobHierarchySegmentWithResponseInternal":"Storage.Blob.Container.listBlobHierarchySegment","com.azure.storage.blob.ContainerClient.releaseLease":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerClient.releaseLeaseWithResponse":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerClient.releaseLeaseWithResponseInternal":"Storage.Blob.Container.releaseLease","com.azure.storage.blob.ContainerClient.rename":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerClient.renameWithResponse":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerClient.renameWithResponseInternal":"Storage.Blob.Container.rename","com.azure.storage.blob.ContainerClient.renewLease":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerClient.renewLeaseWithResponse":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerClient.renewLeaseWithResponseInternal":"Storage.Blob.Container.renewLease","com.azure.storage.blob.ContainerClient.restore":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerClient.restoreWithResponse":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerClient.restoreWithResponseInternal":"Storage.Blob.Container.restore","com.azure.storage.blob.ContainerClient.setAccessPolicy":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerClient.setAccessPolicyWithResponse":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerClient.setAccessPolicyWithResponseInternal":"Storage.Blob.Container.setAccessPolicy","com.azure.storage.blob.ContainerClient.setMetadata":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerClient.setMetadataWithResponse":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.ContainerClient.setMetadataWithResponseInternal":"Storage.Blob.Container.setMetadata","com.azure.storage.blob.PageBlobAsyncClient":"Storage.Blob.PageBlob","com.azure.storage.blob.PageBlobAsyncClient.clearPages":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobAsyncClient.clearPagesWithResponse":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobAsyncClient.clearPagesWithResponseInternal":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobAsyncClient.copyIncremental":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobAsyncClient.copyIncrementalWithResponse":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobAsyncClient.copyIncrementalWithResponseInternal":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobAsyncClient.create":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobAsyncClient.createWithResponse":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobAsyncClient.createWithResponseInternal":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobAsyncClient.getPageRanges":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiff":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiffWithResponse":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesDiffWithResponseInternal":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesWithResponse":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobAsyncClient.getPageRangesWithResponseInternal":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobAsyncClient.resize":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobAsyncClient.resizeWithResponse":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobAsyncClient.resizeWithResponseInternal":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobAsyncClient.setSequenceNumber":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobAsyncClient.setSequenceNumberWithResponse":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobAsyncClient.setSequenceNumberWithResponseInternal":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobAsyncClient.uploadPages":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromUrl":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromUrlWithResponse":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesFromUrlWithResponseInternal":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesWithResponse":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobAsyncClient.uploadPagesWithResponseInternal":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobClient":"Storage.Blob.PageBlob","com.azure.storage.blob.PageBlobClient.clearPages":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobClient.clearPagesWithResponse":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobClient.clearPagesWithResponseInternal":"Storage.Blob.PageBlob.clearPages","com.azure.storage.blob.PageBlobClient.copyIncremental":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobClient.copyIncrementalWithResponse":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobClient.copyIncrementalWithResponseInternal":"Storage.Blob.PageBlob.copyIncremental","com.azure.storage.blob.PageBlobClient.create":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobClient.createWithResponse":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobClient.createWithResponseInternal":"Storage.Blob.PageBlob.create","com.azure.storage.blob.PageBlobClient.getPageRanges":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobClient.getPageRangesDiff":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobClient.getPageRangesDiffWithResponse":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobClient.getPageRangesDiffWithResponseInternal":"Storage.Blob.PageBlob.getPageRangesDiff","com.azure.storage.blob.PageBlobClient.getPageRangesWithResponse":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobClient.getPageRangesWithResponseInternal":"Storage.Blob.PageBlob.getPageRanges","com.azure.storage.blob.PageBlobClient.resize":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobClient.resizeWithResponse":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobClient.resizeWithResponseInternal":"Storage.Blob.PageBlob.resize","com.azure.storage.blob.PageBlobClient.setSequenceNumber":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobClient.setSequenceNumberWithResponse":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobClient.setSequenceNumberWithResponseInternal":"Storage.Blob.PageBlob.setSequenceNumber","com.azure.storage.blob.PageBlobClient.uploadPages":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobClient.uploadPagesFromUrl":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobClient.uploadPagesFromUrlWithResponse":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobClient.uploadPagesFromUrlWithResponseInternal":"Storage.Blob.PageBlob.uploadPagesFromUrl","com.azure.storage.blob.PageBlobClient.uploadPagesWithResponse":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.PageBlobClient.uploadPagesWithResponseInternal":"Storage.Blob.PageBlob.uploadPages","com.azure.storage.blob.ServiceAsyncClient":"Storage.Blob.Service","com.azure.storage.blob.ServiceAsyncClient.filterBlobs":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceAsyncClient.filterBlobsWithResponse":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceAsyncClient.filterBlobsWithResponseInternal":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceAsyncClient.getAccountInfo":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceAsyncClient.getAccountInfoWithResponse":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceAsyncClient.getAccountInfoWithResponseInternal":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceAsyncClient.getProperties":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceAsyncClient.getPropertiesWithResponse":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceAsyncClient.getPropertiesWithResponseInternal":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceAsyncClient.getStatistics":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceAsyncClient.getStatisticsWithResponse":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceAsyncClient.getStatisticsWithResponseInternal":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceAsyncClient.getUserDelegationKey":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceAsyncClient.getUserDelegationKeyWithResponse":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceAsyncClient.getUserDelegationKeyWithResponseInternal":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceAsyncClient.listContainersSegment":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceAsyncClient.listContainersSegmentWithResponse":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceAsyncClient.listContainersSegmentWithResponseInternal":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceAsyncClient.setProperties":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceAsyncClient.setPropertiesWithResponse":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceAsyncClient.setPropertiesWithResponseInternal":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceClient":"Storage.Blob.Service","com.azure.storage.blob.ServiceClient.filterBlobs":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceClient.filterBlobsWithResponse":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceClient.filterBlobsWithResponseInternal":"Storage.Blob.Service.findBlobsByTags","com.azure.storage.blob.ServiceClient.getAccountInfo":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceClient.getAccountInfoWithResponse":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceClient.getAccountInfoWithResponseInternal":"Storage.Blob.Service.getAccountInfo","com.azure.storage.blob.ServiceClient.getProperties":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceClient.getPropertiesWithResponse":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceClient.getPropertiesWithResponseInternal":"Storage.Blob.Service.getProperties","com.azure.storage.blob.ServiceClient.getStatistics":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceClient.getStatisticsWithResponse":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceClient.getStatisticsWithResponseInternal":"Storage.Blob.Service.getStatistics","com.azure.storage.blob.ServiceClient.getUserDelegationKey":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceClient.getUserDelegationKeyWithResponse":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceClient.getUserDelegationKeyWithResponseInternal":"Storage.Blob.Service.getUserDelegationKey","com.azure.storage.blob.ServiceClient.listContainersSegment":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceClient.listContainersSegmentWithResponse":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceClient.listContainersSegmentWithResponseInternal":"Storage.Blob.Service.listContainers","com.azure.storage.blob.ServiceClient.setProperties":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceClient.setPropertiesWithResponse":"Storage.Blob.Service.setProperties","com.azure.storage.blob.ServiceClient.setPropertiesWithResponseInternal":"Storage.Blob.Service.setProperties","com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.AppendBlobsAppendBlockHeaders":null,"com.azure.storage.blob.implementation.models.AppendBlobsCreateHeaders":null,"com.azure.storage.blob.implementation.models.AppendBlobsSealHeaders":null,"com.azure.storage.blob.implementation.models.ArrowFieldInternal":"Storage.Blob.ArrowField","com.azure.storage.blob.implementation.models.ArrowTextConfigurationInternal":"Storage.Blob.ArrowConfiguration","com.azure.storage.blob.implementation.models.AuthenticationType":"Storage.Blob.AuthenticationType","com.azure.storage.blob.implementation.models.BlobContainersSegment":"Storage.Blob.ListContainersResponse","com.azure.storage.blob.implementation.models.BlobCopySourceTags":"Storage.Blob.BlobCopySourceTags","com.azure.storage.blob.implementation.models.BlobDeleteType":"Storage.Blob.BlobDeleteType","com.azure.storage.blob.implementation.models.BlobExpiryOptions":"Storage.Blob.BlobExpiryOptions","com.azure.storage.blob.implementation.models.BlobHierarchyListSegment":"Customizations.BlobHierarchyListSegmentJava","com.azure.storage.blob.implementation.models.BlobItemInternal":"Storage.Blob.BlobItem","com.azure.storage.blob.implementation.models.BlobItemPropertiesInternal":"Storage.Blob.BlobProperties","com.azure.storage.blob.implementation.models.BlobLayoutEndpoints":"Storage.Blob.BlobLayoutEndpoints","com.azure.storage.blob.implementation.models.BlobLayoutEndpointsEndpointItem":"Storage.Blob.BlobLayoutEndpoint","com.azure.storage.blob.implementation.models.BlobLayoutInternal":"Storage.Blob.BlobLayout","com.azure.storage.blob.implementation.models.BlobLayoutRanges":"Storage.Blob.BlobLayoutRanges","com.azure.storage.blob.implementation.models.BlobLayoutRangesRangeItem":"Storage.Blob.BlobLayoutRange","com.azure.storage.blob.implementation.models.BlobName":"Storage.Blob.BlobName","com.azure.storage.blob.implementation.models.BlobPrefixInternal":"Storage.Blob.BlobPrefix","com.azure.storage.blob.implementation.models.BlobSignedIdentifiers":"Storage.Blob.SignedIdentifiers","com.azure.storage.blob.implementation.models.BlobStorageError":"Customizations.BlobStorageError","com.azure.storage.blob.implementation.models.BlobTag":"Storage.Blob.BlobTag","com.azure.storage.blob.implementation.models.BlobTags":"Storage.Blob.BlobTags","com.azure.storage.blob.implementation.models.BlobsAbortCopyFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlobsAcquireLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsBreakLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsChangeLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsCopyFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlobsCreateSnapshotHeaders":null,"com.azure.storage.blob.implementation.models.BlobsDeleteHeaders":null,"com.azure.storage.blob.implementation.models.BlobsDeleteImmutabilityPolicyHeaders":null,"com.azure.storage.blob.implementation.models.BlobsDownloadHeaders":null,"com.azure.storage.blob.implementation.models.BlobsGetAccountInfoHeaders":null,"com.azure.storage.blob.implementation.models.BlobsGetLayoutHeaders":null,"com.azure.storage.blob.implementation.models.BlobsGetPropertiesHeaders":null,"com.azure.storage.blob.implementation.models.BlobsGetTagsHeaders":null,"com.azure.storage.blob.implementation.models.BlobsQueryHeaders":null,"com.azure.storage.blob.implementation.models.BlobsReleaseLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsRenewLeaseHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetExpiryHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetHttpHeadersHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetImmutabilityPolicyHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetLegalHoldHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetMetadataHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetTagsHeaders":null,"com.azure.storage.blob.implementation.models.BlobsSetTierHeaders":null,"com.azure.storage.blob.implementation.models.BlobsStartCopyFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlobsUndeleteHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsCommitBlockListHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsGetBlockListHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsStageBlockFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsStageBlockHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsUploadBlobFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.BlockBlobsUploadHeaders":null,"com.azure.storage.blob.implementation.models.ContainersAcquireLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersBreakLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersChangeLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersCreateHeaders":null,"com.azure.storage.blob.implementation.models.ContainersCreateSessionHeaders":null,"com.azure.storage.blob.implementation.models.ContainersDeleteHeaders":null,"com.azure.storage.blob.implementation.models.ContainersFilterBlobsHeaders":null,"com.azure.storage.blob.implementation.models.ContainersGetAccessPolicyHeaders":null,"com.azure.storage.blob.implementation.models.ContainersGetAccountInfoHeaders":null,"com.azure.storage.blob.implementation.models.ContainersGetPropertiesHeaders":null,"com.azure.storage.blob.implementation.models.ContainersListBlobFlatSegmentHeaders":null,"com.azure.storage.blob.implementation.models.ContainersListBlobHierarchySegmentHeaders":null,"com.azure.storage.blob.implementation.models.ContainersReleaseLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersRenameHeaders":null,"com.azure.storage.blob.implementation.models.ContainersRenewLeaseHeaders":null,"com.azure.storage.blob.implementation.models.ContainersRestoreHeaders":null,"com.azure.storage.blob.implementation.models.ContainersSetAccessPolicyHeaders":null,"com.azure.storage.blob.implementation.models.ContainersSetMetadataHeaders":null,"com.azure.storage.blob.implementation.models.CreateSessionConfiguration":"Storage.Blob.CreateSessionConfiguration","com.azure.storage.blob.implementation.models.CreateSessionResponse":"Storage.Blob.CreateSessionResponse","com.azure.storage.blob.implementation.models.DelimitedTextConfiguration":"Storage.Blob.DelimitedTextConfiguration","com.azure.storage.blob.implementation.models.DownloadHint":"Storage.Blob.DownloadHint","com.azure.storage.blob.implementation.models.FilterBlobItem":"Storage.Blob.FilterBlobItem","com.azure.storage.blob.implementation.models.FilterBlobSegment":"Storage.Blob.FilteredBlobResponse","com.azure.storage.blob.implementation.models.FilterBlobsIncludeItem":"Storage.Blob.FilterBlobsIncludeItem","com.azure.storage.blob.implementation.models.JsonTextConfigurationInternal":"Storage.Blob.JsonTextConfiguration","com.azure.storage.blob.implementation.models.ListBlobsFlatSegmentResponse":"Storage.Blob.ListBlobsResponse","com.azure.storage.blob.implementation.models.ListBlobsHierarchySegmentResponse":"Storage.Blob.ListBlobsHierarchicalResponse","com.azure.storage.blob.implementation.models.PageBlobsClearPagesHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsCopyIncrementalHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsCreateHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesDiffHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsGetPageRangesHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsResizeHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsSetSequenceNumberHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsUploadPagesFromUrlHeaders":null,"com.azure.storage.blob.implementation.models.PageBlobsUploadPagesHeaders":null,"com.azure.storage.blob.implementation.models.ParquetTextConfiguration":"Customizations.StorageCppParquetConfiguration","com.azure.storage.blob.implementation.models.PremiumPageBlobAccessTier":"Storage.Blob.PremiumPageBlobAccessTier","com.azure.storage.blob.implementation.models.QueryFormat":"Storage.Blob.QueryFormat","com.azure.storage.blob.implementation.models.QueryFormatType":"Storage.Blob.QueryType","com.azure.storage.blob.implementation.models.QueryRequest":"Storage.Blob.QueryRequest","com.azure.storage.blob.implementation.models.QueryRequestType":"Storage.Blob.QueryRequestType","com.azure.storage.blob.implementation.models.QuerySerialization":"Storage.Blob.QuerySerialization","com.azure.storage.blob.implementation.models.ServicesFilterBlobsHeaders":null,"com.azure.storage.blob.implementation.models.ServicesGetAccountInfoHeaders":null,"com.azure.storage.blob.implementation.models.ServicesGetPropertiesHeaders":null,"com.azure.storage.blob.implementation.models.ServicesGetStatisticsHeaders":null,"com.azure.storage.blob.implementation.models.ServicesGetUserDelegationKeyHeaders":null,"com.azure.storage.blob.implementation.models.ServicesListContainersSegmentHeaders":null,"com.azure.storage.blob.implementation.models.ServicesSetPropertiesHeaders":null,"com.azure.storage.blob.implementation.models.SessionCredentials":"Storage.Blob.SessionCredentials","com.azure.storage.blob.models.AccessTier":"Storage.Blob.AccessTier","com.azure.storage.blob.models.AccountKind":"Storage.Blob.AccountKind","com.azure.storage.blob.models.ArchiveStatus":"Storage.Blob.ArchiveStatus","com.azure.storage.blob.models.BlobAccessPolicy":"Storage.Blob.AccessPolicy","com.azure.storage.blob.models.BlobAnalyticsLogging":"Storage.Blob.Logging","com.azure.storage.blob.models.BlobContainerItem":"Storage.Blob.ContainerItem","com.azure.storage.blob.models.BlobContainerItemProperties":"Storage.Blob.ContainerProperties","com.azure.storage.blob.models.BlobCorsRule":"Storage.Blob.CorsRule","com.azure.storage.blob.models.BlobErrorCode":"Storage.Blob.StorageErrorCode","com.azure.storage.blob.models.BlobImmutabilityPolicyMode":"Customizations.BlobImmutabilityPolicyModeJava","com.azure.storage.blob.models.BlobMetrics":"Storage.Blob.Metrics","com.azure.storage.blob.models.BlobRetentionPolicy":"Storage.Blob.RetentionPolicy","com.azure.storage.blob.models.BlobServiceProperties":"Storage.Blob.BlobServiceProperties","com.azure.storage.blob.models.BlobServiceStatistics":"Storage.Blob.StorageServiceStats","com.azure.storage.blob.models.BlobSignedIdentifier":"Storage.Blob.SignedIdentifier","com.azure.storage.blob.models.BlobType":"Storage.Blob.BlobType","com.azure.storage.blob.models.Block":"Storage.Blob.Block","com.azure.storage.blob.models.BlockList":"Storage.Blob.BlockList","com.azure.storage.blob.models.BlockListType":"Storage.Blob.BlockListType","com.azure.storage.blob.models.BlockLookupList":"Storage.Blob.BlockLookupList","com.azure.storage.blob.models.ClearRange":"Storage.Blob.ClearRange","com.azure.storage.blob.models.CopyStatusType":"Storage.Blob.CopyStatus","com.azure.storage.blob.models.DeleteSnapshotsOptionType":"Storage.Blob.DeleteSnapshotsOptionType","com.azure.storage.blob.models.EncryptionAlgorithmType":"Storage.Blob.EncryptionAlgorithmType","com.azure.storage.blob.models.FileShareTokenIntent":"Storage.Blob.FileShareTokenIntent","com.azure.storage.blob.models.GeoReplication":"Storage.Blob.GeoReplication","com.azure.storage.blob.models.GeoReplicationStatus":"Storage.Blob.GeoReplicationStatusType","com.azure.storage.blob.models.KeyInfo":"Storage.Blob.KeyInfo","com.azure.storage.blob.models.LeaseDurationType":"Storage.Blob.LeaseDuration","com.azure.storage.blob.models.LeaseStateType":"Storage.Blob.LeaseState","com.azure.storage.blob.models.LeaseStatusType":"Storage.Blob.LeaseStatus","com.azure.storage.blob.models.ListBlobContainersIncludeType":"Storage.Blob.ListContainersIncludeType","com.azure.storage.blob.models.ListBlobsIncludeItem":"Storage.Blob.ListBlobsIncludeItem","com.azure.storage.blob.models.PageList":"Storage.Blob.PageList","com.azure.storage.blob.models.PageRange":"Storage.Blob.PageRange","com.azure.storage.blob.models.PublicAccessType":"Storage.Blob.PublicAccessType","com.azure.storage.blob.models.RehydratePriority":"Storage.Blob.RehydratePriority","com.azure.storage.blob.models.SequenceNumberActionType":"Storage.Blob.SequenceNumberActionType","com.azure.storage.blob.models.SkuName":"Storage.Blob.SkuName","com.azure.storage.blob.models.StaticWebsite":"Storage.Blob.StaticWebsite","com.azure.storage.blob.models.UserDelegationKey":"Storage.Blob.UserDelegationKey"},"generatedFiles":["src/main/java/com/azure/storage/blob/AppendBlobAsyncClient.java","src/main/java/com/azure/storage/blob/AppendBlobClient.java","src/main/java/com/azure/storage/blob/AzureBlobStorageBuilder.java","src/main/java/com/azure/storage/blob/BlobAsyncClient.java","src/main/java/com/azure/storage/blob/BlobClient.java","src/main/java/com/azure/storage/blob/BlobServiceVersion.java","src/main/java/com/azure/storage/blob/BlockBlobAsyncClient.java","src/main/java/com/azure/storage/blob/BlockBlobClient.java","src/main/java/com/azure/storage/blob/ContainerAsyncClient.java","src/main/java/com/azure/storage/blob/ContainerClient.java","src/main/java/com/azure/storage/blob/PageBlobAsyncClient.java","src/main/java/com/azure/storage/blob/PageBlobClient.java","src/main/java/com/azure/storage/blob/ServiceAsyncClient.java","src/main/java/com/azure/storage/blob/ServiceClient.java","src/main/java/com/azure/storage/blob/implementation/AppendBlobsImpl.java","src/main/java/com/azure/storage/blob/implementation/AzureBlobStorageImpl.java","src/main/java/com/azure/storage/blob/implementation/BlobsImpl.java","src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java","src/main/java/com/azure/storage/blob/implementation/ContainersImpl.java","src/main/java/com/azure/storage/blob/implementation/PageBlobsImpl.java","src/main/java/com/azure/storage/blob/implementation/ServicesImpl.java","src/main/java/com/azure/storage/blob/implementation/XmlSerializer.java","src/main/java/com/azure/storage/blob/implementation/XmlSerializerProviders.java","src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsAppendBlockHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsCreateHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/AppendBlobsSealHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ArrowFieldInternal.java","src/main/java/com/azure/storage/blob/implementation/models/ArrowTextConfigurationInternal.java","src/main/java/com/azure/storage/blob/implementation/models/AuthenticationType.java","src/main/java/com/azure/storage/blob/implementation/models/BlobContainersSegment.java","src/main/java/com/azure/storage/blob/implementation/models/BlobCopySourceTags.java","src/main/java/com/azure/storage/blob/implementation/models/BlobDeleteType.java","src/main/java/com/azure/storage/blob/implementation/models/BlobExpiryOptions.java","src/main/java/com/azure/storage/blob/implementation/models/BlobHierarchyListSegment.java","src/main/java/com/azure/storage/blob/implementation/models/BlobItemInternal.java","src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutEndpoints.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutEndpointsEndpointItem.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutInternal.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutRanges.java","src/main/java/com/azure/storage/blob/implementation/models/BlobLayoutRangesRangeItem.java","src/main/java/com/azure/storage/blob/implementation/models/BlobName.java","src/main/java/com/azure/storage/blob/implementation/models/BlobPrefixInternal.java","src/main/java/com/azure/storage/blob/implementation/models/BlobSignedIdentifiers.java","src/main/java/com/azure/storage/blob/implementation/models/BlobStorageError.java","src/main/java/com/azure/storage/blob/implementation/models/BlobStorageErrorException.java","src/main/java/com/azure/storage/blob/implementation/models/BlobTag.java","src/main/java/com/azure/storage/blob/implementation/models/BlobTags.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsAbortCopyFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsAcquireLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsBreakLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsChangeLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsCopyFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsCreateSnapshotHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteImmutabilityPolicyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsDownloadHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsGetAccountInfoHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsGetLayoutHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsGetTagsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsQueryHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsReleaseLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsRenewLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetExpiryHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetHttpHeadersHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetImmutabilityPolicyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetLegalHoldHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetMetadataHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTagsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsSetTierHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsStartCopyFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlobsUndeleteHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsCommitBlockListHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsGetBlockListHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsStageBlockHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadBlobFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/BlockBlobsUploadHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersAcquireLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersBreakLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersChangeLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersCreateSessionHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersDeleteHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersFilterBlobsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccessPolicyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersGetAccountInfoHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersGetPropertiesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobFlatSegmentHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersListBlobHierarchySegmentHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersReleaseLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersRenameHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersRenewLeaseHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersRestoreHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersSetAccessPolicyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ContainersSetMetadataHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/CreateSessionConfiguration.java","src/main/java/com/azure/storage/blob/implementation/models/CreateSessionResponse.java","src/main/java/com/azure/storage/blob/implementation/models/DelimitedTextConfiguration.java","src/main/java/com/azure/storage/blob/implementation/models/DownloadHint.java","src/main/java/com/azure/storage/blob/implementation/models/FilterBlobItem.java","src/main/java/com/azure/storage/blob/implementation/models/FilterBlobSegment.java","src/main/java/com/azure/storage/blob/implementation/models/FilterBlobsIncludeItem.java","src/main/java/com/azure/storage/blob/implementation/models/JsonTextConfigurationInternal.java","src/main/java/com/azure/storage/blob/implementation/models/ListBlobsFlatSegmentResponse.java","src/main/java/com/azure/storage/blob/implementation/models/ListBlobsHierarchySegmentResponse.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsClearPagesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCopyIncrementalHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsCreateHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesDiffHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsGetPageRangesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsResizeHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsSetSequenceNumberHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesFromUrlHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/PageBlobsUploadPagesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ParquetTextConfiguration.java","src/main/java/com/azure/storage/blob/implementation/models/PremiumPageBlobAccessTier.java","src/main/java/com/azure/storage/blob/implementation/models/QueryFormat.java","src/main/java/com/azure/storage/blob/implementation/models/QueryFormatType.java","src/main/java/com/azure/storage/blob/implementation/models/QueryRequest.java","src/main/java/com/azure/storage/blob/implementation/models/QueryRequestType.java","src/main/java/com/azure/storage/blob/implementation/models/QuerySerialization.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesFilterBlobsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesGetAccountInfoHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesGetPropertiesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesGetStatisticsHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesGetUserDelegationKeyHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesListContainersSegmentHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/ServicesSetPropertiesHeaders.java","src/main/java/com/azure/storage/blob/implementation/models/SessionCredentials.java","src/main/java/com/azure/storage/blob/implementation/models/package-info.java","src/main/java/com/azure/storage/blob/implementation/package-info.java","src/main/java/com/azure/storage/blob/models/AccessTier.java","src/main/java/com/azure/storage/blob/models/AccountKind.java","src/main/java/com/azure/storage/blob/models/ArchiveStatus.java","src/main/java/com/azure/storage/blob/models/BlobAccessPolicy.java","src/main/java/com/azure/storage/blob/models/BlobAnalyticsLogging.java","src/main/java/com/azure/storage/blob/models/BlobContainerItem.java","src/main/java/com/azure/storage/blob/models/BlobContainerItemProperties.java","src/main/java/com/azure/storage/blob/models/BlobCorsRule.java","src/main/java/com/azure/storage/blob/models/BlobErrorCode.java","src/main/java/com/azure/storage/blob/models/BlobImmutabilityPolicyMode.java","src/main/java/com/azure/storage/blob/models/BlobMetrics.java","src/main/java/com/azure/storage/blob/models/BlobRetentionPolicy.java","src/main/java/com/azure/storage/blob/models/BlobServiceProperties.java","src/main/java/com/azure/storage/blob/models/BlobServiceStatistics.java","src/main/java/com/azure/storage/blob/models/BlobSignedIdentifier.java","src/main/java/com/azure/storage/blob/models/BlobType.java","src/main/java/com/azure/storage/blob/models/Block.java","src/main/java/com/azure/storage/blob/models/BlockList.java","src/main/java/com/azure/storage/blob/models/BlockListType.java","src/main/java/com/azure/storage/blob/models/BlockLookupList.java","src/main/java/com/azure/storage/blob/models/ClearRange.java","src/main/java/com/azure/storage/blob/models/CopyStatusType.java","src/main/java/com/azure/storage/blob/models/DeleteSnapshotsOptionType.java","src/main/java/com/azure/storage/blob/models/EncryptionAlgorithmType.java","src/main/java/com/azure/storage/blob/models/FileShareTokenIntent.java","src/main/java/com/azure/storage/blob/models/GeoReplication.java","src/main/java/com/azure/storage/blob/models/GeoReplicationStatus.java","src/main/java/com/azure/storage/blob/models/KeyInfo.java","src/main/java/com/azure/storage/blob/models/LeaseDurationType.java","src/main/java/com/azure/storage/blob/models/LeaseStateType.java","src/main/java/com/azure/storage/blob/models/LeaseStatusType.java","src/main/java/com/azure/storage/blob/models/ListBlobContainersIncludeType.java","src/main/java/com/azure/storage/blob/models/ListBlobsIncludeItem.java","src/main/java/com/azure/storage/blob/models/PageList.java","src/main/java/com/azure/storage/blob/models/PageRange.java","src/main/java/com/azure/storage/blob/models/PublicAccessType.java","src/main/java/com/azure/storage/blob/models/RehydratePriority.java","src/main/java/com/azure/storage/blob/models/SequenceNumberActionType.java","src/main/java/com/azure/storage/blob/models/SkuName.java","src/main/java/com/azure/storage/blob/models/StaticWebsite.java","src/main/java/com/azure/storage/blob/models/UserDelegationKey.java","src/main/java/com/azure/storage/blob/models/package-info.java","src/main/java/com/azure/storage/blob/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/tsp-location.yaml b/sdk/storage/azure-storage-blob/tsp-location.yaml index 5b9f81d702963..48cf5b24062f1 100644 --- a/sdk/storage/azure-storage-blob/tsp-location.yaml +++ b/sdk/storage/azure-storage-blob/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/storage/data-plane/BlobStorage -commit: 27f0523ded83fde1600271fedf4f8674ec40fe27 +commit: 7463f1d824ed2a3a86553ab1a866d299253cf13f repo: Azure/azure-rest-api-specs additionalDirectories: []